Building Clang 8/9 in El Capitan
Ken Cunningham
ken.cunningham.webuse at gmail.com
Sat Feb 13 09:03:22 UTC 2021
I would suggest you install Xcode 8.2.1 to match the buildbots.
Don’t forget that in almost all cases, MacPorts will use the SDK installed in “/“ when building software. That SDK is the 10.11 SDK, so it is the one that matches your system, and is the one you want. Virtually all standard “open source software” will use that SDK in “/“ on that system.
The only time that the SDK in Xcode (or the CLTs) is used is if certain software, usually building with Xcode, forces that SDK to be used over the objections of MacPorts (eg qt5, clang’s compiler_rt, etc).
But - I submit - in those cases, you are likely to be OK, because that software more than likely “knows what to do”.
So - for maximum happiness, and maximum compatibility, I suggest you duplicate the BuildBot setup we use as a reference platform, and install Xcode 8.2.1 like Ryan did.
I can’t see that I am going to change the already very complicated Portfiles that we set up to build clang-11 all the way back to 10.6 (and some clangs earlier) for what are non-reference systems.
It sounds simple to add:
compiler.thread_local_storage yes
but it is just not true that that compiler is always needed. That line in MacPorts forces a whole chain of events that we don’t want to rehash, with very unpredictable results. For example, clang-8.0 builds perfectly well on MacOSX 10.6 using a compiler that does not support thread_local storage, because we have worked around that to match the buildbot reference platform.
So — we already go to great lengths to support older systems, but I don’t think it’s too much to ask that users set up their older systems in a consistent way to the buildbots we have.
Best,
Ken
More information about the macports-users
mailing list