Universal and its many meanings

Joshua Root jmr at macports.org
Sun Feb 27 01:22:06 UTC 2022


On 2022-2-27 12:10 , Wowfunhappy at gmail.com wrote:
> As I understand it, +universal is used to mean two different things in 
> MacPorts:
> 
> 1. Install this port as a universal binary, which contains slices for 
> multiple architectures. For the purposes of this message, I'm going to 
> refer to these as "fat" binaries.

That is what +universal means.

> 2. Install this port with the ability to /create/ fat binaries with 
> slices for multiple architectures. For the purposes of this message, I'm 
> going to refer to these as "cross-compilers".

The gcc ports are unique in abusing the universal variant to mean that.

> Although, on a completely separate note, I don't understand why many of 
> these problems can't be trivially solved by a combination of the lipo 
> and Apple's built-in translation layers (namely Rosetta 1/2 or x86_64's 
> native 32bit support). If e.g. gcc7 is installable on both Tiger ppc and 
> Tiger intel, and Tiger intel can run ppc binaries via rosetta, shouldn't 
> it be possible to just (1) compile the code with gcc7_intel, (2) compile 
> the code with gcc7_ppc, and (3) lipo the results together?

This is what the muniversal portgroup does, and if you read the code, 
you'll see that it's anything but trivial.

- Josh


More information about the macports-dev mailing list