mirror of
https://github.com/darlinghq/cctools-port.git
synced 2024-11-26 21:50:26 +00:00
Merge pull request #80 from mstorsjo/sdk-ver
Fix the logic for the default fallback sdk version in ld64
This commit is contained in:
commit
8d34d0fbb0
@ -5380,14 +5380,12 @@ void Options::reconfigureDefaults()
|
||||
char kernVersStr[100];
|
||||
size_t strlen = sizeof(kernVersStr);
|
||||
if ( sysctl(mib, 2, kernVersStr, &strlen, NULL, 0) != -1 ) {
|
||||
#else
|
||||
const char *kernVersStr = "10.5"; // ld64-port: claim we are on 10.5
|
||||
#endif
|
||||
uint32_t kernVers = parseVersionNumber32(kernVersStr);
|
||||
int minor = (kernVers >> 16) - 4; // kernel major version is 4 ahead of x in 10.
|
||||
fPlatforms.updateSDKVersion(ld::Platform::macOS, (0x000A0000 + (minor << 8)));
|
||||
#ifdef __APPLE__ // ld64-port
|
||||
}
|
||||
#else
|
||||
fPlatforms.updateSDKVersion(ld::Platform::macOS, parseVersionNumber32("10.6")); // ld64-port: claim we are on 10.6
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user