Upgrade Fedora Mac OS X cross-compiler from GCC 4.2 (4.0?) to latest 4.6

Ryan Schmidt ryandesign at macports.org
Mon Aug 29 02:55:28 PDT 2011


On Aug 29, 2011, at 04:42, Ruben Van Boxem wrote:

> I have recently discovered Fedora's darwinx project (inspired created
> and lead by Erik Van Pienbroek).
> 
> I asked him if he was interested in upgrading the
> i686-apple-darwin10-gcc he delivered from an old 4.2 version to 4.6.
> He was interested, but only if the new version is as stable as the
> official apple-patched old version. I would think so, because MacPorts
> provides a 4.6 build, which obviously seems to work fine.
> 
> Is it easily feasible to build a gcc 4.6 for Mac OS X?

It is easy enough to install the gcc46 port in MacPorts, yes. However, our gcc46 port currently has some issues (see issue tracker) that the gcc45 and earlier ports did not have.

Also, observe that the gcc ports in MacPorts are not the same as the gcc compiler Apple provides with Xcode, specifically Apple has modified gcc to accept -arch flags and to be able to compile for multiple architectures in a single pass; standard gcc compilers such as the ones in the MacPorts gcc ports only recognize -m32 and -m64 flags, and would have to do a separate compile for each architecture, which one could then combine later using lipo.

Finally, the latest gcc Apple has shipped with Xcode is 4.2. Apple has moved away from gcc and will not (AFAIK) be shipping any later versions of gcc in any future version of Xcode. Apple seems to disagree with version 3 of the GPL, which is what later versions of gcc are under.

All of this suggests that 4.2 is a fine version of gcc to use, if your goal is to produce software that runs on Mac OS X.







More information about the macports-users mailing list