LLVM-GCC builds on OS X 10.5, fails on 10.6

Hi,

For months now I've been building LLVM-GCC on a Mac OS X laptop without problems. Recently I switched to a different laptop, and I can no longer build LLVM-GCC. (LLVM itself builds fine on both platforms.) The build commands I'm using are identical, and I always start from a clean unpack of the version 2.8 tarball. However, the old laptop ran OS X 10.5 while the new one runs OS X 10.6. (There are other differences, but that is the most significant.)

I'm not sure how to debug the issue because the GCC compiler error is not only cryptic, it's one of the longest I've ever seen. I'm also seeing prior errors such as:

  libLLVMBitReader.a, file was built for unsupported file format which is not the architecture being linked (i386)

I'm using "--with-arch=nocona", which I believe is correct for all OS X 10.6 hardware.

Any tips on how to fix this? A link to the complete build log is below. Thanks,

Trevor

http://vocaro.com/trevor/files/llvm-gcc-build-failure.txt

It looks like you're building a 32-bit llvm-gcc and trying to link it against 64-bit llvm libraries. Try specifying the triple as x86_64-apple-darwin10 instead of i686-apple-darwin9.

-Jim

Yep, that was it... thanks!

It looks like I can generalize the TRIPLE setting to:

  export TRIPLE=$MACHTYPE

and it will pick up either x86_64-apple-darwin10 or i686-apple-darwin9 as appropriate.

Trevor

Excellent! Glad things are working properly for you.

-Jim