gcc42 hangs

Ryan Schmidt ryandesign at macports.org
Mon Feb 1 07:07:23 PST 2010


On Feb 1, 2010, at 08:43, Raphael Attie wrote:

> Does this solution is valid even if I want to test a third-party software that calls gcc ? For instance, Matlab is completely independent from Macports. Will the gcc_select program work only for "macported" softwares ?
> 
> For instance, to make Matlab use the version of gcc 4.2 instead of 4.0 (i have both), i simply change the symbolic links in /usr/bin so that i can swap from gcc-4.0 to gcc-4.2. I can then restore the original links whenever a software needs the original gcc. This was quite handy for me. Is gcc_select really a cleaner solution than this ?

Yes, it is.

Apple's gcc_select will handle changing the symlinks in /usr/bin for you.

Our gcc_select will make the same kind of symlinks but in /opt/local/bin. So all you have to do is have /opt/local/bin in your PATH, which the MacPorts installer should have already done for you, and now any software you build that wants "gcc" will use MacPorts gcc.

Note that using gcc_select (Apple's or ours) will have no effect for any port built using MacPorts. It only has effect for software you build manually on the command line.




More information about the macports-users mailing list