tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Notes for building NetBSD on OS X 10.7.4



Thanks Adam. I'll give that a try next time I build the tool chain. Your 
solution is simpler.

Thanks,
Frank

On Aug 21, 2012, at 4:10 AM, Adam Ciarciński wrote:

>> To any who may have had a problem building on OS X Lion.
>> 
>> As has been noted elsewhere, the latest Apple compiler that is installed 
>> with xcode 4.4.1, llvm-gcc-4.2.1 is no longer able to build NetBSD 
>> toolchain. 
>> 
>> Solution: install MacPorts gcc43 (gcc version 4.3.6 -/ MacPorts 4.3.6_3).
>> 
>>      Set in /etc/mk.conf file
>>              HOST_CC?=       gcc-mp-4.3
>>              HOST_CPP?=      gcc-mp-4.3
>> 
>> No need to set HOST_CXX as the llvm-g++-4.2.1 works fine.
>> 
>> You should now be good to go.
>> 
>> --
>> Frank Zerangue
>> frank.zerangue%gmail.com@localhost
> 
> I strongly disagree. Clang works excellently. Here's my way to build NetBSD 
> (does not need command line tools being installed, Xcode in /Applications is 
> sufficient):
> 
> #!/bin/csh
> set   MACHINE=amd64
> set     DIST=${cwd}
> set     SRCDIR=${cwd}/src
> set     TOOLDIR=${cwd}/tools
> set     X11SRCDIR=${cwd}/xsrc
> set     OBJDIR=obj.${MACHINE}
> set     JOBS=`sysctl -n hw.ncpu`
> set     BUILD="./build.sh -j${JOBS} -U -N0 -u -x -X${X11SRCDIR} -m${MACHINE} 
> -T${TOOLDIR} -O${OBJDIR}"
> set     XCODE=/Applications/Xcode.app/Contents/Developer
> set     HOST_CFLAGS=-O2\ -pipe\ -march=core2\ -fomit-frame-pointer\ 
> -fno-stack-protector
> set     HOST_CPPFLAGS=-isysroot\ 
> ${XCODE}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
> set     
> HOST_LDFLAGS=-Wl,-syslibroot,${XCODE}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
> set     HOST_CC=${XCODE}/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
> set     HOST_CXX=${XCODE}/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
> cd    ${SRCDIR}
> ${BUILD} -V HOST_CC="${HOST_CC} ${HOST_CPPFLAGS}" -V HOST_CXX="${HOST_CXX} 
> ${HOST_CPPFLAGS}" -V HOST_CPPFLAGS="${HOST_CPPFLAGS}" -V 
> HOST_CFLAGS="${HOST_CFLAGS}" -V HOST_CXXFLAGS="${HOST_CFLAGS}" -V 
> HOST_LDFLAGS="${HOST_LDFLAGS}" release
> 
> Kind regards,
> Adam

--
Frank Zerangue
frank.zerangue%gmail.com@localhost





Home | Main Index | Thread Index | Old Index