Properly "disabling" -syslibroot flag from Portfile
Joshua Root
jmr at macports.org
Fri Oct 26 20:52:07 UTC 2018
On 2018-10-27 07:10 , Mojca Miklavec wrote:
> Hi,
>
> I did not dare to switch to 10.14 yet (so I cannot really test), but
> it seems that a user of Mojave had troubles compiling MinGW-w64 due to
> the -syslibroot flag being automatically added to compiler flags, see:
>
> https://trac.macports.org/ticket/57448
>
> What's the proper way to disable this behaviour from the Portfile?
> (Also, if any developer on 10.14 was willing to try this out ...)
This is added based on a non-empty configure.sdkroot being used. It
doesn't actually add -syslibroot to the compiler flags, but
'-isysroot${configure.sdkroot}' to the compiler flags and
'-Wl,-syslibroot,${configure.sdkroot}' to LDFLAGS.
Clearing configure.sdkroot will of course prevent all this, but it's
usually a bad idea since there is no /usr/include on Mojave. But
cross-compilers are an exception in many ways.
- Josh
More information about the macports-dev
mailing list