if we are going to support universal arm/x86_64 ports, we'll likely need a multi-architecture gcc again

Ryan Schmidt ryandesign at macports.org
Mon Sep 14 04:50:40 UTC 2020

On Sep 13, 2020, at 12:21, Ken Cunningham wrote:

> I’m not sure if the MacPorts plan is to support universal arm/x86_64 builds, but I can imagine that for some years we might want to consider doing that.

Absolutely. That's why I sent out a message about it in April:


> The last gcc version we had that supported multiarchitecture building was apple-gcc42 (Intel, PPC).
> We might have built a suitable newer cross-compiling gcc by updating the current gcc darwindriver.c with Apple’s lipo enhancements and doing a formal cross-compiling installation, but we never got around to it, and our current gcc versions are single arch (although support 32 and 64bit in each). There are some projects on github that did this (Frederick Devernay’s, among others).
> But with arm now on the horizon, we will need a cross-compiling gcc again if we are to have cross-arch universal support, which I can certainly see a need for. (A gcc that supports darwin arm has not yet been released, but it is currently working and exists).

I don't think I realized that our gcc ports don't support building universal software, or I've forgotten. I may have been misled by the fact that our gcc ports can themselves be installed with the universal variant.

So yes, whatever needs to be done to get the gcc ports to support multiple-arch building should be done, by whoever is interested. The ports currently have no maintainer.

This missing feature will not affect most ports, since most ports build with clang from Xcode or MacPorts, both of which support multiple-arch building. But it will affect those few ports that require building with gcc, and it is a reminder that ports should not force the use of gcc unless absolutely necessary.

More information about the macports-dev mailing list