This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Snow Leopard build
- From: Jack Howarth <howarth at bromo dot med dot uc dot edu>
- To: FX <fxcoudert at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org, IainS <developer at sandoe-acoustics dot co dot uk>
- Date: Thu, 25 Feb 2010 09:50:15 -0500
- Subject: Re: Snow Leopard build
- References: <26FAD4F7-D86D-4551-A518-EA84E8E00969@gmail.com>
On Thu, Feb 25, 2010 at 10:57:59AM +0100, FX wrote:
> A very short query: what is the recommended way to build GCC as a 32-bit binary on Snow Leopard (where the system compiler defaults to -m64)?
>
> FX
FX,
I normally build the i686 native FSF gcc compiler under i386 fink which
uses compiler wrappers to force the 32-bit code generation from the system
compiler. However...
CC='gcc -m32' CXX='g++ -m32' ./configure -with-arch=nocona --with-tune=generic --build=i686-apple-darwin10 --host=i686-apple-darwin10 --target=i686-apple-darwin10
should work. You also could use just...
CC='gcc -m32' CXX='g++ -m32' ./configure -with-arch=nocona --with-tune=generic
since config.guess would detect the target as i386-apple-darwin10 but would likely
be less optimized.
Jack