Merge pull request #43140 from LnL7/macos-10.14

darwin: fix Libsystem compatibility for macOS 10.14
This commit is contained in:
Daiderd Jordan 2018-08-14 23:02:04 +02:00 committed by GitHub
commit ea1542e9ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 7 deletions

View File

@ -19,7 +19,7 @@
/usr/lib/system/libsystem_configuration.dylib
/usr/lib/system/libsystem_coreservices.dylib
# /usr/lib/system/libsystem_coretls.dylib # Removed in 10.13
# /usr/lib/system/libsystem_coretls.dylib # Removed in 10.13
/usr/lib/system/libsystem_dnssd.dylib
/usr/lib/system/libsystem_info.dylib
@ -28,7 +28,7 @@
/usr/lib/system/libsystem_m.dylib
/usr/lib/system/libsystem_malloc.dylib
/usr/lib/system/libsystem_network.dylib
# /usr/lib/system/libsystem_network.dylib # Removed in 10.14
/usr/lib/system/libsystem_networkextension.dylib
/usr/lib/system/libsystem_notify.dylib
/usr/lib/system/libsystem_platform.dylib

View File

@ -51,8 +51,6 @@ ___bt_setcur
___bt_split
___bt_sync
___buf_free
___cVersionNumber
___cVersionString
___call_hash
___cleanup
___cmp_D2A

View File

@ -57,8 +57,6 @@ ___ioctl
___iopolicysys
___kdebug_trace
___kdebug_trace64
___kernelVersionNumber
___kernelVersionString
___kill
___lchown
___libkernel_init

View File

@ -178,6 +178,9 @@ in rec {
unpack = stdenv.mkDerivation (bootstrapFiles // {
name = "unpack";
reexportedLibrariesFile =
../../os-specific/darwin/apple-source-releases/Libsystem/reexported_libraries;
# This is by necessity a near-duplicate of unpack-bootstrap-tools.sh. If we refer to it directly,
# we can't make any changes to it due to our testing stdenv depending on it. Think of this as the
# unpack-bootstrap-tools.sh for the next round of bootstrap tools.
@ -209,7 +212,7 @@ in rec {
$out/lib/system/libsystem_kernel.dylib
# TODO: this logic basically duplicates similar logic in the Libsystem expression. Deduplicate them!
libs=$(otool -arch x86_64 -L /usr/lib/libSystem.dylib | tail -n +3 | awk '{ print $1 }')
libs=$(cat $reexportedLibrariesFile | grep -v '^#')
for i in $libs; do
if [ "$i" != "/usr/lib/system/libsystem_kernel.dylib" ] && [ "$i" != "/usr/lib/system/libsystem_c.dylib" ]; then