3
0
Fork 0
forked from mirrors/nixpkgs

stdenv linux, stdenv cross: Harmonize extraNativeBuildInputs

Want to make sure these are the same per host platform, without duplication.
This commit is contained in:
John Ericson 2018-09-11 12:47:09 -04:00
parent 2111e7b742
commit f2bb59e710
2 changed files with 13 additions and 7 deletions

View file

@ -53,12 +53,15 @@ in lib.init bootStages ++ [
else buildPackages.gcc;
extraNativeBuildInputs = old.extraNativeBuildInputs
++ lib.optionals
(hostPlatform.isLinux && !buildPlatform.isLinux)
[ buildPackages.patchelf buildPackages.paxctl ]
++ lib.optional
(let f = p: !p.isx86 || p.libc == "musl"; in f hostPlatform && !(f buildPlatform))
buildPackages.updateAutotoolsGnuConfigScriptsHook
# without proper `file` command, libtool sometimes fails
# to recognize 64-bit DLLs
++ lib.optional (hostPlatform.config == "x86_64-w64-mingw32") buildPackages.file
++ lib.optional
(hostPlatform.isAarch64 || hostPlatform.isMips || hostPlatform.libc == "musl")
buildPackages.updateAutotoolsGnuConfigScriptsHook
;
});
})

View file

@ -251,7 +251,8 @@ in
};
extraNativeBuildInputs = [ prevStage.patchelf prevStage.paxctl ] ++
# Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64.
lib.optional (!localSystem.isx86) prevStage.updateAutotoolsGnuConfigScriptsHook;
lib.optional (!localSystem.isx86 || localSystem.libc == "musl")
prevStage.updateAutotoolsGnuConfigScriptsHook;
})
@ -292,7 +293,8 @@ in
};
extraNativeBuildInputs = [ prevStage.patchelf prevStage.xz ] ++
# Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64.
lib.optional (!localSystem.isx86) prevStage.updateAutotoolsGnuConfigScriptsHook;
lib.optional (!localSystem.isx86 || localSystem.libc == "musl")
prevStage.updateAutotoolsGnuConfigScriptsHook;
})
# Construct the final stdenv. It uses the Glibc and GCC, and adds
@ -324,7 +326,8 @@ in
extraNativeBuildInputs = [ prevStage.patchelf prevStage.paxctl ] ++
# Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64.
lib.optional (!localSystem.isx86) prevStage.updateAutotoolsGnuConfigScriptsHook;
lib.optional (!localSystem.isx86 || localSystem.libc == "musl")
prevStage.updateAutotoolsGnuConfigScriptsHook;
cc = prevStage.gcc;
@ -357,7 +360,7 @@ in
++ [ /*propagated from .dev*/ linuxHeaders
binutils gcc gcc.cc gcc.cc.lib gcc.expand-response-params
]
++ lib.optionals (!localSystem.isx86)
++ lib.optionals (!localSystem.isx86 || localSystem.libc == "musl")
[ prevStage.updateAutotoolsGnuConfigScriptsHook prevStage.gnu-config ];
overrides = self: super: {