summary refs log tree commit diff
path: root/pkgs/stdenv/linux
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/stdenv/linux')
-rw-r--r--pkgs/stdenv/linux/default.nix31
1 files changed, 16 insertions, 15 deletions
diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix
index 9cfe21e3640..e10e09c56f8 100644
--- a/pkgs/stdenv/linux/default.nix
+++ b/pkgs/stdenv/linux/default.nix
@@ -310,8 +310,7 @@ in
     };
 
     # `gettext` comes with obsolete config.sub/config.guess that don't recognize LoongArch64.
-    extraNativeBuildInputs =
-      lib.optional (localSystem.isLoongArch64) prevStage.updateAutotoolsGnuConfigScriptsHook;
+    extraNativeBuildInputs = [ prevStage.updateAutotoolsGnuConfigScriptsHook ];
   })
 
   # First rebuild of gcc; this is linked against all sorts of junk
@@ -391,8 +390,7 @@ in
       };
 
       # `gettext` comes with obsolete config.sub/config.guess that don't recognize LoongArch64.
-      extraNativeBuildInputs =
-        lib.optional (localSystem.isLoongArch64) prevStage.updateAutotoolsGnuConfigScriptsHook;
+      extraNativeBuildInputs = [ prevStage.updateAutotoolsGnuConfigScriptsHook ];
     })
 
   # 2nd stdenv that contains our own rebuilt binutils and is used for
@@ -477,8 +475,7 @@ in
 
     # `gettext` comes with obsolete config.sub/config.guess that don't recognize LoongArch64.
     # `libtool` comes with obsolete config.sub/config.guess that don't recognize Risc-V.
-    extraNativeBuildInputs =
-      lib.optional (localSystem.isLoongArch64 || localSystem.isRiscV) prevStage.updateAutotoolsGnuConfigScriptsHook;
+    extraNativeBuildInputs = [ prevStage.updateAutotoolsGnuConfigScriptsHook ];
   })
 
 
@@ -516,10 +513,11 @@ in
         passthru = a.passthru // { inherit (self) gmp mpfr libmpc isl; };
       });
     };
-    extraNativeBuildInputs = [ prevStage.patchelf ] ++
+    extraNativeBuildInputs = [
+      prevStage.patchelf
       # Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64.
-      lib.optional (!localSystem.isx86 || localSystem.libc == "musl")
-                   prevStage.updateAutotoolsGnuConfigScriptsHook;
+      prevStage.updateAutotoolsGnuConfigScriptsHook
+    ];
   })
 
 
@@ -572,10 +570,11 @@ in
         shell = self.bash + "/bin/bash";
       };
     };
-    extraNativeBuildInputs = [ prevStage.patchelf prevStage.xz ] ++
+    extraNativeBuildInputs = [
+      prevStage.patchelf prevStage.xz
       # Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64.
-      lib.optional (!localSystem.isx86 || localSystem.libc == "musl")
-                   prevStage.updateAutotoolsGnuConfigScriptsHook;
+      prevStage.updateAutotoolsGnuConfigScriptsHook
+    ];
   })
 
   # Construct the final stdenv.  It uses the Glibc and GCC, and adds
@@ -610,10 +609,11 @@ in
       initialPath =
         ((import ../generic/common-path.nix) {pkgs = prevStage;});
 
-      extraNativeBuildInputs = [ prevStage.patchelf ] ++
+      extraNativeBuildInputs = [
+        prevStage.patchelf
         # Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64.
-        lib.optional (!localSystem.isx86 || localSystem.libc == "musl")
-        prevStage.updateAutotoolsGnuConfigScriptsHook;
+        prevStage.updateAutotoolsGnuConfigScriptsHook
+      ];
 
       cc = prevStage.gcc;
 
@@ -650,6 +650,7 @@ in
         ++ (with gcc-unwrapped.passthru; [
           gmp libmpc mpfr isl
         ])
+        ++ [ prevStage.gnu-config ]
       ;
 
       overrides = self: super: {