This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Snow Leopard build


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]