Refresher on gcc port and the executables

"René J.V. Bertin" rjvbertin at gmail.com
Wed May 22 05:36:16 PDT 2013


On May 22, 2013, at 14:17, Ryan Schmidt wrote:

> 
> Note that Xcode 4.2 and later do not include any version of gcc. However if you install the command line tools (which you must do in order to use MacPorts) then /usr/bin/gcc does exist, as a symlink to llvm-gcc-4.2. I assume as of Xcode 4.7 it will change to a symlink to clang, since it has already been announced that Xcode 4.6 is the last version that will include llvm-gcc.
> 
> If you want "gcc" to be a MacPorts compiler instead, use "sudo port select gcc" (which was several years ago known as "gcc_select"). You can learn more about how to use "port select" by running "port help select".
> 

Also, if things haven't changed from Xcode 3.2x, you can create your own .pbcompspec or .xccompspec file to tell Xcode about any non-standard compilers you may want to use. Evidently that probably wouldn't be the best idea for compiling ObjC, but for any other project it ought to work. You'll want to obtain the standard 3.2x settings file(s) though, to have a starting reference for the gcc options (with 3.2.6, I just refer to gcc-4.2 from my gcc-4.7 specification).

R.



More information about the macports-users mailing list