Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Mac with command-line developer tools installed, including Apple's LLVM C compiler, present as /bin/gcc.

How can I get a real gcc installed so that e.g. make will see the standard gcc instead of the LLVM compiler?

share|improve this question

Since Apple has bundled it's own version of gcc/llvm, you need to enable homebrew/versions repo before you can install different version of GCC.

brew tap homebrew/versions
brew install gcc48

Replace gcc48 with the version of gcc you want.

See also https://github.com/mxcl/homebrew/wiki/Custom-GCC-and-cross-compilers

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.