PR 14427: 10.14 tester wanted

Joshua Root jmr at macports.org
Sun Apr 3 04:29:02 UTC 2022


On 2022-4-3 14:05 , Fred Wright wrote:
> 
> Building against the newer SDK doesn't cause weak-linking issues as long 
> as the code uses MIN_REQUIRED instead of MAX_ALLOWED to decide what 
> references to make.  MIN_REQUIRED is the correct choice in most cases, 
> but code often gets that wrong.  Having them the same mostly sweeps that 
> problem under the rug.

Most of the software in MacPorts has no knowledge of any of these 
mechanisms, and simply checks if it can use functions by seeing if a 
test program that uses them compiles.

> Apple seems to think that using the newer SDK is OK, since it's set up 
> (in the CLT area) like this:
> 
> lrwxr-xr-x  1 root  wheel   15 Sep 26  2020 MacOSX.sdk -> MacOSX10.15.sdk
> drwxr-xr-x  7 root  wheel  224 Sep 26  2020 MacOSX.sdk 1
> lrwxr-xr-x  1 root  wheel   10 Aug 17  2019 MacOSX10.14.sdk -> MacOSX.sdk
> drwxr-xr-x  8 root  wheel  256 Nov  7  2019 MacOSX10.15.sdk

Yes, Apple assumes you will always compile against the latest SDK with 
an appropriate MACOSX_DEPLOYMENT_TARGET set, and use __builtin_available 
or other mechanisms to ensure you don't call any functions that aren't 
available on the current OS at runtime.

- Josh


More information about the macports-dev mailing list