Choice of compiler from compiler.whitelist

Joshua Root jmr at macports.org
Thu Jul 21 21:32:02 PDT 2016


On 2016-7-22 04:39 , Ryan Schmidt wrote:
>
> On Jul 21, 2016, at 12:15 PM, Mojca Miklavec wrote:
>
>> 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.

Not quite -- it uses the first such compiler that is available on the 
system. Compilers provided by a port are always considered to be 
available, so this only makes a difference when Xcode-provided compilers 
are involved.

> 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?)

Technically it's probably redundant, yes. But it seemed more clear to 
have a different option name to indicate that these compilers and only 
these compilers will work.

> In any case, no attempt is currently made by MacPorts to check which of those compilers you might already have installed.

It would be possible to change that, but it would mean going from a 
simple algorithm of grabbing the first usable one from a list, to a much 
more complicated method of sorting the different possibilities according 
to multiple criteria and using the "best" one.

- Josh


More information about the macports-dev mailing list