2

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?

Christos Hayward
  • 529
  • 1
  • 6
  • 17

1 Answers1

1

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

number5
  • 1,813
  • 1
  • 12
  • 12