Neither OS X nor Xcode comes with real GCC. For compatibility with scripts that assume the compiler is called "gcc", it has executables under that name, but they are all fronts for Clang. No amount of symbolic links, setting environment variables or setting aliases prevents these executable files from running the real GCC.
If you want GCC, you need to install it. You can do this using one of the package managers, for example MacPorts (the one I am familiar with). I am sure you can also use Homebrew.
You should not change anything in / usr / bin. If you have already done this, you must restore what you changed, if possible.
Well-managed package managers will also not modify this directory. They must be installed in a separate directory, such as / opt / local / bin, / usr / local / bin or the like. In this case, you will want to modify your PATH to place these directories earlier than / usr / bin.
Ken thomases
source share