Installing gcc into a separate diretory

Jason Swails jason.swails at
Mon Feb 21 19:35:39 PST 2011

To add on to Ryan's statement, gcc versions typically do a good job of
isolating themselves from each other (if this is what you're worried
about).  If you install multiple gcc's alongside each other, the libraries
and headers and such will be placed in a version-specific folder, and the
real binaries will have version-specific names.

Coupled with gcc_select (another port package I would suggest installing to
have multiple GCCs), you should be able to have as many GCC versions
installed at once as you want.  To demonstrate, on my system:

$ gcc_select -l
Available versions:
gcc40 gcc42 llvm-gcc42 mp-gcc43 mp-gcc44 mp-gcc45 mp-gcc46

and I can seamlessly switch through them as I want.

Hope this helps,

On Mon, Feb 21, 2011 at 4:54 PM, Ryan Schmidt <ryandesign at>wrote:

> On Feb 21, 2011, at 15:44, Paul van Hoven wrote:
> > Is it possible to install the gcc43 package into a certain directory,
> i.e. when I configure/compile one normally is able to set the installation
> directory by
> >
> > ./configure --prefix=/desired/path/to/installation
> >
> > and the program will be completely placed in there. Now, is this somehow
> also possible whne installing the gcc43 package? Something like macports
> --prefix="/path/to/installation" install gcc43
> No; MacPorts is in control of where the software will be installed and you
> cannot change this (except for changing the prefix globally, for all ports,
> a decision which you can make at MacPorts install time before you've
> installed any ports). Ports that depend on gcc43 and other ports depend on
> them being in predictable locations.
> _______________________________________________
> macports-users mailing list
> macports-users at

Jason M. Swails
Quantum Theory Project,
University of Florida
Ph.D. Candidate
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the macports-users mailing list