It would appear that installing Xcode 4.2 on my Mac OS X 10.6 machine has effectively removed gcc. In place of the binaries, there are now symlinks like so:
/usr/bin drarok$ ls -la | grep gcc
lrwxr-xr-x 1 root wheel 32 13 Oct 14:27 cc -> ../llvm-gcc-4.2/bin/llvm-gcc-4.2
lrwxr-xr-x 1 root wheel 12 13 Oct 14:24 gcc -> llvm-gcc-4.2
lrwxr-xr-x 1 root wheel 12 12 Sep 16:15 gcc-4.2 -> /usr/bin/gcc
...
So “gcc-4.2”, despite looking like gcc of old, results in an llvm binary being executing.
Is there still a way to run gcc on my Mac?
Note: I am not looking to configure my Xcode to use gcc – this has been covered in other SO questions. I have some command-line tools that must be built with real gcc. My Cocoa projects all work with llvm.
I understand your pain. I still have gcc installed somehow:
But this may be because I also have XCode 3 tools installed?
In any event, check out this very fancy Open Source project:
https://github.com/kennethreitz/osx-gcc-installer
Which I found in this related question: GCC without Xcode on OS X