Skip to content

Commit 3b8e3c1

Browse files
author
Adam Joseph
committed
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.
1 parent f9f270f commit 3b8e3c1

1 file changed

Lines changed: 16 additions & 15 deletions

File tree

pkgs/stdenv/linux/default.nix

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,7 @@ in
310310
};
311311

312312
# `gettext` comes with obsolete config.sub/config.guess that don't recognize LoongArch64.
313-
extraNativeBuildInputs =
314-
lib.optional (localSystem.isLoongArch64) prevStage.updateAutotoolsGnuConfigScriptsHook;
313+
extraNativeBuildInputs = [ prevStage.updateAutotoolsGnuConfigScriptsHook ];
315314
})
316315

317316
# First rebuild of gcc; this is linked against all sorts of junk
@@ -391,8 +390,7 @@ in
391390
};
392391

393392
# `gettext` comes with obsolete config.sub/config.guess that don't recognize LoongArch64.
394-
extraNativeBuildInputs =
395-
lib.optional (localSystem.isLoongArch64) prevStage.updateAutotoolsGnuConfigScriptsHook;
393+
extraNativeBuildInputs = [ prevStage.updateAutotoolsGnuConfigScriptsHook ];
396394
})
397395

398396
# 2nd stdenv that contains our own rebuilt binutils and is used for
@@ -477,8 +475,7 @@ in
477475

478476
# `gettext` comes with obsolete config.sub/config.guess that don't recognize LoongArch64.
479477
# `libtool` comes with obsolete config.sub/config.guess that don't recognize Risc-V.
480-
extraNativeBuildInputs =
481-
lib.optional (localSystem.isLoongArch64 || localSystem.isRiscV) prevStage.updateAutotoolsGnuConfigScriptsHook;
478+
extraNativeBuildInputs = [ prevStage.updateAutotoolsGnuConfigScriptsHook ];
482479
})
483480

484481

@@ -516,10 +513,11 @@ in
516513
passthru = a.passthru // { inherit (self) gmp mpfr libmpc isl; };
517514
});
518515
};
519-
extraNativeBuildInputs = [ prevStage.patchelf ] ++
516+
extraNativeBuildInputs = [
517+
prevStage.patchelf
520518
# Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64.
521-
lib.optional (!localSystem.isx86 || localSystem.libc == "musl")
522-
prevStage.updateAutotoolsGnuConfigScriptsHook;
519+
prevStage.updateAutotoolsGnuConfigScriptsHook
520+
];
523521
})
524522

525523

@@ -572,10 +570,11 @@ in
572570
shell = self.bash + "/bin/bash";
573571
};
574572
};
575-
extraNativeBuildInputs = [ prevStage.patchelf prevStage.xz ] ++
573+
extraNativeBuildInputs = [
574+
prevStage.patchelf prevStage.xz
576575
# Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64.
577-
lib.optional (!localSystem.isx86 || localSystem.libc == "musl")
578-
prevStage.updateAutotoolsGnuConfigScriptsHook;
576+
prevStage.updateAutotoolsGnuConfigScriptsHook
577+
];
579578
})
580579

581580
# Construct the final stdenv. It uses the Glibc and GCC, and adds
@@ -610,10 +609,11 @@ in
610609
initialPath =
611610
((import ../generic/common-path.nix) {pkgs = prevStage;});
612611

613-
extraNativeBuildInputs = [ prevStage.patchelf ] ++
612+
extraNativeBuildInputs = [
613+
prevStage.patchelf
614614
# Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64.
615-
lib.optional (!localSystem.isx86 || localSystem.libc == "musl")
616-
prevStage.updateAutotoolsGnuConfigScriptsHook;
615+
prevStage.updateAutotoolsGnuConfigScriptsHook
616+
];
617617

618618
cc = prevStage.gcc;
619619

@@ -650,6 +650,7 @@ in
650650
++ (with gcc-unwrapped.passthru; [
651651
gmp libmpc mpfr isl
652652
])
653+
++ [ prevStage.gnu-config ]
653654
;
654655

655656
overrides = self: super: {

0 commit comments

Comments
 (0)