What is the latest version of clang we've successfully built on macports so far?
Edit: on powerpc
To the question itself: I think Ken has built clang-5.0 on 10.5 back then (and concluded it is useless), and the latest which is buildable is arguably Iain’s 7.1.1, but he also says in REAME of the repo that it produces wrong code for PPC.
With this in mind, I never bothered to build these: it will take effort to sort the build out, and in result you get ABI-inconsistent compiler which is unusable, at the very best
Iain planned to release llvm-11 with his fixes (maybe clang-11 too, I do not remember exactly), so if that happens, maybe something of utility will be there. This is not something I am ready to deal with on my own.
What can be
potentially useful – but gonna require a lot of testing – is switching to libc++ on PowerPC. It will not work out of the box now, but if anyone wants to experiment, you will need the following:
1. Install libcxx-powerpc port. This corresponds to libc++ from llvm-7 with some improvements. So it is pretty old, though it is newer than what Macports installs on 10.6.8 Intel now.
2. Install
https://github.com/barracuda156/macports-ports-powerpc/tree/Snow-PowerPC/lang/gcc-powerpc
Or gcc12, but modify stdlib_flag variant to use libcxx-powerpc headers.
Do not use gcc13, including that from my repo, it will not work now with libc++ (it does not work on Intel either due to a bug in gcc13, which has been fixed since then, but not in Macports).
If you use gcc-powerpc, update Macports base to
https://github.com/barracuda156/macports-base-10A190/tree/gcc-powerpc
And pick fixed portgoups from
https://github.com/barracuda156/macports-ports-powerpc/tree/gcc_move
3. Modify macports.conf to use libc++.
4. Either make sure to pass flags to link to libc++ and libc++abi where libcxx-powerpc installs them (see portfile) or move those to /opt/local/lib or /usr/lib (
make sure you understand what you are doing here).
5. Have fun, you are the first person on the planet to use libc++ on macOS PowerPC
(Well, I did verify it can work in a simple isolated case, but AFAIK nobody tried to switch to libc++ for the port-tree as such.)