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.
This commit is contained in:
Adam Joseph 2023-06-15 12:37:06 -07:00
parent f9f270ffd1
commit 3b8e3c1f3d

View File

@ -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: {