summary refs log tree commit diff
path: root/pkgs/stdenv/linux
diff options
context:
space:
mode:
authorAdam Joseph <adam@westernsemico.com>2023-06-15 12:37:06 -0700
committerAdam Joseph <adam@westernsemico.com>2023-06-15 19:47:38 -0700
commit3b8e3c1f3de24472dd6dbd1fcdb3912a067bd70c (patch)
treeacdcc9234cc0cb4781cd1ec53a402230ea172ddc /pkgs/stdenv/linux
parentf9f270ffd1066eb3122f92b6240a82966fabc82f (diff)
downloadnixpkgs-3b8e3c1f3de24472dd6dbd1fcdb3912a067bd70c.tar
nixpkgs-3b8e3c1f3de24472dd6dbd1fcdb3912a067bd70c.tar.gz
nixpkgs-3b8e3c1f3de24472dd6dbd1fcdb3912a067bd70c.tar.bz2
nixpkgs-3b8e3c1f3de24472dd6dbd1fcdb3912a067bd70c.tar.lz
nixpkgs-3b8e3c1f3de24472dd6dbd1fcdb3912a067bd70c.tar.xz
nixpkgs-3b8e3c1f3de24472dd6dbd1fcdb3912a067bd70c.tar.zst
nixpkgs-3b8e3c1f3de24472dd6dbd1fcdb3912a067bd70c.zip
stdenv: updateAutotoolsGnuConfigScriptsHook unconditionally
Unlike autoreconfHook, updateAutotoolsGnuConfigScriptsHook adds
almost no compilations.  Therefore, in the interest of building the
same source code on every platform wherever possible, let's
eliminate the conditional guards around
updateAutotoolsGnuConfigScriptsHook in stdenv.
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: {