Reputation: 190789
gcc
is symbolically linked to llvm-gcc
on Mac OS X Lion.
prosseek ~> ls -alF /usr/bin/gcc
lrwxr-xr-x 1 root wheel 12 Nov 12 14:39 /usr/bin/gcc@ -> llvm-gcc-4.2
How can I setup to use gcc-4.2
when gcc
is called?
Upvotes: 9
Views: 16484
Reputation: 3603
I experienced some problems in compiling stuff (condor for instance) with both llvm-gcc and clang os I had to get the original gcc.
I installed the version 4.6 using homebrew https://raw.github.com/adamv/homebrew-alt/master/duplicates/gcc.rb
brew install https://raw.github.com/adamv/homebrew-alt/master/duplicates/gcc.rb
Upvotes: 2
Reputation: 121
I personally just use the Apple gcc, llvm or not, to build the latest gcc available. Even if /usr/bin/gcc were really gcc and not a wrapper over some llvm build, it's still crazy old. I documented my experience with the build process here.
Upvotes: 1
Reputation: 190789
There seems to be a way to use gcc with Xcode 4.2 - http://caiustheory.com/install-gcc-421-apple-build-56663-with-xcode-42
Upvotes: 3
Reputation: 85045
As of Xcode 4.2 in Lion, Apple no longer ships its previous version of gcc-4.2
, which was in Xcode 4.1 and earlier versions. It now only ships llvm-gcc
(gcc front-end with llvm
code backend) and clang
(clang front-end with llvm
backend). While it is possible to install legacy versions of vanilla GNU gcc-4.2 from other sources, like MacPorts, (and without disturbing /usr/bin
), Apple has made it clear that they aren't going to be supporting gcc
anymore and that they want developers and users to move to clang
.
Upvotes: 13