Sorry if this has been answered before -- a quick search didn't dig up an answer for me. I'd like to use the llvm-gg4 front-end for cross-compilation (ppc/x86 and vice versa) on Mac OS X. I built it (e.g. on ppc) from source with a configure like this: configure --with-gxx-include-dir=/usr/include/c++/4.0.0 -- build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 -- target=powerpc-apple-darwin8 --enable-llvm=/usr/src/llvm/obj/ -- enable-languages=c,c++,objc,obj-c++ --prefix=/opt/llvm-gcc The back-end was built with all targets enabled. Built like this, llvm-gcc generates ppc code regardless of the -arch flag (e.g. arch i386). What can I do to make it behave like Apple's gcc in this matter? Thanks for a hint. Leo
On Jul 6, 2007, at 8:04 AM, Leo Fink wrote:> Built like this, llvm-gcc generates ppc code regardless of the -arch > flag (e.g. arch i386). > > What can I do to make it behave like Apple's gcc in this matter?You need to build darwin driver to use -arch. Try using build_gcc script to configure and build llvm-gcc. - Devang
Thanks for the hint, Devang. On Jul 6, 2007, at 7:26 PM, Devang Patel wrote:> You need to build darwin driver to use -arch. Try using build_gcc > script to configure and build llvm-gcc.Well, I guess this task exceeds my expertise. I just thought there was some obvious mistake I made because a lot of people might be using llvm-gcc4 as a drop-in to Apple's gcc to build multi- architecture binaries. I'll have a look at build_gcc, maybe I can figure this out. I guess that in future versions of the front-end binary releases for Mac OS X this problem won't exist anymore. Kind regards.