diff options
author | Randy Eckenrode <randy@largeandhighquality.com> | 2023-06-12 09:13:47 -0400 |
---|---|---|
committer | Randy Eckenrode <randy@largeandhighquality.com> | 2023-06-12 17:11:54 -0400 |
commit | 23cb6c155b89b060eb2004cd0e1951a4097a81fe (patch) | |
tree | bdf55e49049383d62b4986752e9cae2e03880936 /pkgs/os-specific | |
parent | a255182f567abd87acc59206780627bccab0d10d (diff) |
darwin.Libc: stop vendoring headers from other packages
A number of headers in Libc are being vendored from other packages. Instead of copying them from an earlier Libc, Libsystem now sources them from their respective packages (see below). This allows Libc_old to be dropped and avoids any potential clashes when building Libsystem. libmalloc: * malloc/malloc.h libplatform: * setjmp.h * ucontext.h * libkern/OSAtomic.h * libkern/OSCacheControl.h libpthread: * pthread*.h * sched.h * spawn.h syslog (vendored because only one file is needed): * asl.h xnu: * spawn.h (a different one from libpthread) * libproc.h
Diffstat (limited to 'pkgs/os-specific')
4 files changed, 1 insertions, 43 deletions
diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libc/825_40_1.nix b/pkgs/os-specific/darwin/apple-source-releases/Libc/825_40_1.nix deleted file mode 100644 index c9202b536583c..0000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/Libc/825_40_1.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ appleDerivation', stdenvNoCC, ed, unifdef }: - -appleDerivation' stdenvNoCC { - nativeBuildInputs = [ ed unifdef ]; - - installPhase = '' - export SRCROOT=$PWD - export DSTROOT=$out - export PUBLIC_HEADERS_FOLDER_PATH=include - export PRIVATE_HEADERS_FOLDER_PATH=include - bash xcodescripts/headers.sh - ''; -} diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix index 915d3a61f8169..6ff3cec2f1eb1 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix @@ -1,4 +1,4 @@ -{ appleDerivation', stdenvNoCC, ed, unifdef, Libc_old, Libc_10-9 }: +{ appleDerivation', stdenvNoCC, ed, unifdef, Libc_10-9 }: appleDerivation' stdenvNoCC { nativeBuildInputs = [ ed unifdef ]; @@ -7,7 +7,6 @@ appleDerivation' stdenvNoCC { ./0001-Define-TARGET_OS_EMBEDDED-in-std-lib-io-if-not-defin.patch ]; - # TODO: asl.h actually comes from syslog project now installPhase = '' export SRCROOT=$PWD export DSTROOT=$out @@ -18,20 +17,6 @@ appleDerivation' stdenvNoCC { cp ${./CrashReporterClient.h} $out/include/CrashReporterClient.h cp ${Libc_10-9}/include/NSSystemDirectories.h $out/include - - # Ugh Apple stopped releasing this stuff so we need an older one... - cp ${Libc_old}/include/spawn.h $out/include - cp ${Libc_old}/include/setjmp.h $out/include - cp ${Libc_old}/include/ucontext.h $out/include - cp ${Libc_old}/include/pthread*.h $out/include - cp ${Libc_old}/include/sched.h $out/include - cp -R ${Libc_old}/include/malloc $out/include - - mkdir -p $out/include/libkern - cp ${Libc_old}/include/asl.h $out/include - cp ${Libc_old}/include/libproc.h $out/include - cp ${Libc_old}/include/libkern/OSAtomic.h $out/include/libkern - cp ${Libc_old}/include/libkern/OSCacheControl.h $out/include/libkern ''; appleHeaders = builtins.readFile ./headers.txt; diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libc/headers.txt b/pkgs/os-specific/darwin/apple-source-releases/Libc/headers.txt index ea62e31dc781a..c7cad6343d8af 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/Libc/headers.txt +++ b/pkgs/os-specific/darwin/apple-source-releases/Libc/headers.txt @@ -21,7 +21,6 @@ arpa/inet.h arpa/nameser_compat.h arpa/telnet.h arpa/tftp.h -asl.h assert.h bitstring.h cpio.h @@ -49,12 +48,8 @@ langinfo.h libc.h libc_private.h libgen.h -libkern/OSAtomic.h -libkern/OSCacheControl.h -libproc.h limits.h locale.h -malloc/malloc.h memory.h monetary.h monitor.h @@ -72,24 +67,17 @@ protocols/routed.h protocols/rwhod.h protocols/talkd.h protocols/timed.h -pthread.h -pthread_impl.h -pthread_spis.h -pthread_workqueue.h ranlib.h readpassphrase.h regex.h runetype.h -sched.h search.h secure/_common.h secure/_stdio.h secure/_string.h semaphore.h -setjmp.h sgtty.h signal.h -spawn.h stab.h standards.h stddef.h @@ -112,7 +100,6 @@ time.h timeconv.h ttyent.h tzfile.h -ucontext.h ulimit.h unistd.h util.h diff --git a/pkgs/os-specific/darwin/apple-source-releases/default.nix b/pkgs/os-specific/darwin/apple-source-releases/default.nix index a277ebfd580f0..ab13e91e37354 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/default.nix @@ -266,7 +266,6 @@ developerToolsPackages_11_3_1 // macosPackages_11_0_1 // { rev = "Libc-997.90.3"; hash = "sha256-B18RNO+Rai5XE52TKdJV7eknosTZ+bRERkiU12d/kPU="; }; - Libc_old = applePackage "Libc/825_40_1.nix" "osx-10.8.5" "sha256-JvPSY7FzraGpqF/jYLfhU2o/2195NuKrXsryYfVtx3s=" {}; }; libclosure = applePackage "libclosure" "osx-10.11.6" "sha256-L5rQ+UBpf3B+W1U+gZKk7fXulslHsc8lxnCsplV+nr0=" {}; libdispatch = applePackage "libdispatch" "osx-10.10.5" "sha256-jfAEk0OLrJa9AIZVikIoHomd+l+4rCfc320Xh50qK5M=" {}; |