Current-Users archive

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

Building -current under OS X 10.5



If you have a 64-bit-capable x86 Mac that's still running MacOS 10.5
for some reason, there is at least one way to build NetBSD-current
with no source patches.

        1) Obtain and install Xcode 3.1.4, the last version that will
           run on 10.5.  This includes gcc 4.2.  Consider replacing your
           /usr/bin/gcc and /usr/bin/g++ symlinks with ones pointing at
           gcc-4.2 and g++-4.2 -- I did, though this is not strictly
           necessary.

           This version of Xcode can be obtained from the Apple developer
           website, most of the way down the page of all developer downloads.

        2) Invoke build.sh with -V HOST_CC=gcc-4.2 -V HOST_CXX=g++-4.2
           -V HOST_CFLAGS="-O2 -pipe -m64" -V HOST_CXXFLAGS="-O2 -pipe -m64"
           -V HOST_LDFLAGS="-m64"

This works around the idiocy in the gmp build system that adds -m64 to
the GCC flags *even if -m32 is already there*.  Unfortunately if you're
on a 32 bit only machine, this method won't work for you, though setting
ABI=32 in the environment and using gcc-4.2 probably will.


-- 
Thor Lancelot Simon                                    tls%panix.com@localhost
  "All of my opinions are consistent, but I cannot present them all
   at once."    -Jean-Jacques Rousseau, On The Social Contract


Home | Main Index | Thread Index | Old Index