two active versions of gcc

Brandon Allbery allbery.b at
Mon Jun 22 11:41:48 PDT 2015

On Mon, Jun 22, 2015 at 1:30 PM, Brandon Allbery <allbery.b at>

> Entirely normal. Note that they are not available as "gcc" by default;
> instead there will be e.g. /opt/local/bin/gcc-mp-4.7.
> "gcc" will by default be /usr/bin/gcc which, depending on what version of
> Xcode or Command Line Tools is present, is either an ancient llvm-gcc-4.2
> or a wrapper for Clang. Also note that most ports will default to using
> Xcode's clang directly on a recent (10.8 and up, and at least some 10.7
> depending on Xcode version) system.

I shoudl mention here that if you need "gcc" to be a different version in
order to build something outside of MacPorts, you should use "port select":

    $ port select --list gcc
    (list of available selections here)
    $ sudo port select --set gcc mp-gcc49 # (or other version as available
from above list)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the macports-users mailing list