On Sep 1, 2009, at 3:52 PM, Brian Barnes wrote:
Is there a chart somewhere for which compiler/arch/sdk fit together so I can find the best fit for my project? For instance, I want to target PPC and i386 (32-bit, obviously), 10.4. I suspect I use gcc 4.0 for PPC, and I suspect I can use Clang LLVM for i386, but it would be nice to have a chart. Figuring out what works and what doesn't seems to be a game of try it and find out!
I don't know if there's a chart, but I can try to answer your specific questions:
Clang doesn't support PPC, although it should work fine when building for Intel for 10.4. (Clang also doesn't support C++ files, although you won't need to set an extra compiler for those - if you have any; when Clang is selected, Xcode will fall back to using LLVM-GCC-4.2 for files that can't be compiled with Clang. This includes PPC files.)
I think GCC 4.2 won't work for 10.4, so I think you need to use GCC 4.0 for that.
So yes, I think you're right: You use GCC-4.0 for PPC, and Clang for Intel.
Also, do I have to add additional linker commands (or a different linker) for Clang? It seems to throw a lot of symbol(s) not found errors.
You shouldn't need to; Clang should support the same arguments - as either compiler or linker driver - as GCC does. If you think you've found a case where that isn't so, please file a bug.