Choice of compiler from compiler.whitelist
Ryan Schmidt
ryandesign at macports.org
Thu Jul 21 11:39:15 PDT 2016
On Jul 21, 2016, at 12:15 PM, Mojca Miklavec wrote:
> What's the best way to blacklist all clang compilers and any old gcc?
> (It's about a temporary bug mentioned in the other topic.)
>
>
> Here's my attempt:
>
> PortGroup compiler_blacklist_versions 1.0
>
> # blacklist any clang compiler and any old gcc (a better expression is needed)
> compiler.blacklist *clang* *llvm-gcc* *apple-gcc* gcc gcc-3.3 gcc-4.0 gcc-4.2
> compiler.whitelist macports-gcc-6 macports-gcc-5 macports-gcc-4.9
> macports-gcc-4.8 macports-gcc-4.7
Looks ok.
> The "problem" is that MacPorts seems to always take gcc 6 then, even
> if I have gcc 5 already installed, but not the gcc 6.
>
> What am I missing here? Couldn't MP take any compiler from the list?
As I understand it, if compiler.whitelist is set, MacPorts uses the first entry in compiler.whitelist that's not blacklisted. And if compiler.whitelist is not set, MacPorts uses the first entry in compiler.fallback that's not blacklisted. (As such, I'm not sure why compiler.whitelist exists; couldn't a port just as easily set compiler.fallback instead?) In any case, no attempt is currently made by MacPorts to check which of those compilers you might already have installed.
More information about the macports-dev
mailing list