libredirect: update for new Darwin SDK on aarch64-darwin

The location of `libSystem.tbd` depends on the SDK, making it
effectively dynamic. It must be located relative to the `SDKROOT`
instead of to `clang.libc`.
This commit is contained in:
Randy Eckenrode
2024-10-10 01:07:26 -04:00
parent 4ebdf0442f
commit 9167e4fbcd
+2 -3
View File
@@ -41,10 +41,9 @@ else stdenv.mkDerivation rec {
# like arm64(e).
PATH=${bintools-unwrapped}/bin:${llvmPackages.clang-unwrapped}/bin:$PATH \
clang -arch x86_64 -arch arm64 -arch arm64e \
-isystem ${llvmPackages.clang.libc}/include \
-isystem "$SDKROOT/usr/include" \
-isystem ${llvmPackages.libclang.lib}/lib/clang/*/include \
-L${llvmPackages.clang.libc}/lib \
-Wl,-install_name,$libName \
"-L$SDKROOT/usr/lib" \
-Wl,-install_name,$out/lib/$libName \
-Wall -std=c99 -O3 -fPIC libredirect.c \
-shared -o "$libName"