Compiler configuration

Anders F Björklund afb at macports.org
Fri Feb 6 00:34:52 PST 2009


Jean-Michel Pouré wrote:

> Most MacPorts packages do not carry a reference to a specific gcc
> version. As a result, Apple gcc installed in Xcode is used.
>
> I am just a beginner, but wouldn't it be a more stable solution to  
> rely
> only on GNU gcc 2.4 and gcc-4.2 and 4.3 using MacPorts packages.


In a word: no. :-)

Even using the "apple-gcc*" ports would be more of a hassle than just
using /usr/bin/gcc*. And using GNU/FSF version of GCC would be worse...
Theoretically, you are right - owning the ports allows for more control.
But in practice the usual approach is to use Xcode for GCC and make etc.

Other systems do it differently, but MacPorts usually recommends several
things to be present on the system before installing base/port(1)  
itself.
Like: GCC etc, X11, Tcl, Foundation, mtree, rsync, curl, ssl and more...
Some of these can be replaced with the versions from MacPorts, later on.


I'd go with the vendor GCC unless you need a feature that is not  
present,
like support for Java (GCJ) or Fortran or desires to play with GCC 4.3 ?

And, yes, this the opposite approach as being used for Perl/Python/ 
Ruby...
There MacPorts version are preferred. It's a little inconsistent,  
that way.

--anders



More information about the macports-dev mailing list