summary refs log tree commit diff
path: root/pkgs/stdenv
diff options
context:
space:
mode:
authorRobert Scott <code@humanleg.org.uk>2023-02-28 18:18:51 +0000
committerRobert Scott <code@humanleg.org.uk>2023-08-06 17:52:28 +0100
commit95c4a1fe96f2f6f406b805754099cb724aafdf42 (patch)
tree756ec67fede581c81729c2c9b1f13a29598eac3f /pkgs/stdenv
parent842726c6dc3bea1bbed2c3227fc9ed360196e301 (diff)
downloadnixpkgs-95c4a1fe96f2f6f406b805754099cb724aafdf42.tar
nixpkgs-95c4a1fe96f2f6f406b805754099cb724aafdf42.tar.gz
nixpkgs-95c4a1fe96f2f6f406b805754099cb724aafdf42.tar.bz2
nixpkgs-95c4a1fe96f2f6f406b805754099cb724aafdf42.tar.lz
nixpkgs-95c4a1fe96f2f6f406b805754099cb724aafdf42.tar.xz
nixpkgs-95c4a1fe96f2f6f406b805754099cb724aafdf42.tar.zst
nixpkgs-95c4a1fe96f2f6f406b805754099cb724aafdf42.zip
cc-wrapper: include fortify-headers before libc includes for musl
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r--pkgs/stdenv/linux/default.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix
index 0e483321b93..34fffd36aa6 100644
--- a/pkgs/stdenv/linux/default.nix
+++ b/pkgs/stdenv/linux/default.nix
@@ -194,6 +194,7 @@ let
           inherit lib;
           inherit (prevStage) coreutils gnugrep;
           stdenvNoCC = prevStage.ccWrapperStdenv;
+          fortify-headers = prevStage.fortify-headers;
         }).overrideAttrs(a: lib.optionalAttrs (prevStage.gcc-unwrapped.passthru.isXgcc or false) {
           # This affects only `xgcc` (the compiler which compiles the final compiler).
           postFixup = (a.postFixup or "") + ''
@@ -568,6 +569,7 @@ in
         inherit lib;
         inherit (self) stdenvNoCC coreutils gnugrep;
         shell = self.bash + "/bin/bash";
+        fortify-headers = self.fortify-headers;
       };
     };
     extraNativeBuildInputs = [
@@ -645,6 +647,7 @@ in
         ++  [ linuxHeaders # propagated from .dev
             binutils gcc gcc.cc gcc.cc.lib gcc.expand-response-params gcc.cc.libgcc glibc.passthru.libgcc
           ]
+        ++ lib.optionals (localSystem.libc == "musl") [ fortify-headers ]
         ++ [ prevStage.updateAutotoolsGnuConfigScriptsHook prevStage.gnu-config ]
         ++ (with gcc-unwrapped.passthru; [
           gmp libmpc mpfr isl