Tuesday, January 2, 2007

Updated Tip on Changing the Compiler

I updated the tip on the Xcode Tools Tips page that deals with changing the compiler Xcode uses to build your project. The updated tip tells you to add the build settings GCC_VERSION_ppc and GCC_VERSION_i386 instead of changing rules for the target. There currently is no need for the GCC_VERSION_i386 setting because Xcode projects use gcc 4 as the default compiler and you can't build for Intel with anything earlier than gcc 4. But the setting will come in handy in the future when Xcode ships with a newer version of gcc.

There was nothing technically wrong with having a target rule that specified the compiler to use, but it was overkill when all you want to do is compile with an earlier version of gcc. Adding the GCC_VERSION_ppc build setting is more straightforward.