From e7eb209fed6d400bab258baece1c6f6f50e14eea Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 22 Apr 2023 15:59:48 +0200 Subject: [PATCH] stdenv: avoid -p flag for strip when boostrapping x86_64-darwin The stdenv wouldn't build with it, as compiler-rt-libc-11.1.0/lib/darwin/libclang_rt.*_osx.a retained reference to SDKs (which we forbid for final stdenv). Assigned authorship to Trofi; I just bisected and added condition. https://github.com/NixOS/nixpkgs/pull/224669#issuecomment-1518225496 --- pkgs/stdenv/darwin/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index 6cc6271eedbe..69a128382ff8 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -63,6 +63,8 @@ rec { unset SDKROOT stripAllFlags=" " # the Darwin "strip" command doesn't know "-s" + '' + lib.optionalString localSystem.isx86_64 '' + stripDebugFlags="-S" # the Darwin "strip" command does something odd with "-p" ''; bootstrapTools = derivation ({