Hi,

This is a development question but not about MacPorts ports so I'm posting it 
here:

I'm currently working on another CMake contribution that aims to check whether 
the selected compiler(s) can and do target the architecture(s) selected via 
CMAKE_OSX_ARCHITECTURES. The idea is to extend an existing internal MachO 
header parser and use libmacho to translate the numeric CPU type to an 
architecture string.

My question is to what extent I would need to complete the architectures known 
my the system libmacho on older systems. I see that the MacPorts LegacySupport 
headers define CPU_SUBTYPE_ARM64E if not already defined but not why. I also 
noticed that my own linkers (system & MacPorts installed) on 10.9 don't allow 
me to build PPC binaries though I can still generate PPC (but not PPC64) object 
files using the 10.6 SDK.
Can I assume that libmacho knows the names of all architectures its OS version 
can hope to build for? Or is it trivial enough to set up, say, a not-so-recent 
Intel-based system to target ARM64 even if it cannot do that out-of-the-box? 
And by "trivial enough" I do mean to warrant that the necessary supports gets 
added to stock CMake.

FWIW, I had a look at building the libmacho sources included in the 
port:cctools tarball. I managed but they're clearly not (or even less) meant to 
be built & user-upgraded like the other binaries so I won't be teaching CMake's 
own build system to look for libmacho (the functions in the system version are 
accessible through libSystem, so without need to link libmacho explicitly).

Thanks,
R.

Reply via email to