From 84f8fcfc3e6a9da08e01e2c45603891abd35393d Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Tue, 24 Sep 2024 22:30:53 -0400 Subject: [PATCH] libcCross: use darwin.libSystem unconditionally MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Darwin’s libc is a stub that does nothing but avoid unwanted compiler and linker warnings. The actual libc is located dynamically based on the SDK. To support cross-compilation, the SDK is located based on platform: - `DEVELOPER_DIR_FOR_BUILD` - build platform; - `DEVELOPER_DIR` - host platform; and - `DEVELOPER_DIR_FOR_TARGET` - target platform. --- pkgs/top-level/all-packages.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 162c0c413cdd..b7fc516291ee 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19789,7 +19789,6 @@ with pkgs; inherit (stdenv.targetPlatform) libc; in if stdenv.targetPlatform.isMinGW then targetPackages.windows.mingw_w64_headers or windows.mingw_w64_headers else if libc == "nblibc" then targetPackages.netbsd.headers or netbsd.headers - else if libc == "libSystem" && stdenv.targetPlatform.isAarch64 then targetPackages.darwin.LibsystemCross or darwin.LibsystemCross else null; # We can choose: @@ -19812,7 +19811,7 @@ with pkgs; else if name == "libSystem" then if stdenv.targetPlatform.useiOSPrebuilt then targetPackages.darwin.iosSdkPkgs.libraries or darwin.iosSdkPkgs.libraries - else targetPackages.darwin.LibsystemCross or (throw "don't yet have a `targetPackages.darwin.LibsystemCross for ${stdenv.targetPlatform.config}`") + else targetPackages.darwin.libSystem or darwin.libSystem else if name == "fblibc" then targetPackages.freebsd.libc or freebsd.libc else if name == "oblibc" then targetPackages.openbsd.libc or openbsd.libc else if name == "nblibc" then targetPackages.netbsd.libc or netbsd.libc