summary refs log tree commit diff
path: root/pkgs/stdenv/cross
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2018-09-11 12:47:09 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-09-18 16:27:04 -0400
commitf2bb59e710a4805653266833fa80940e600f3ecf (patch)
treedbe50601267503437d8f17a6605bb9c16da9588b /pkgs/stdenv/cross
parent2111e7b742aa0121a7b3b14738811ad030a6c321 (diff)
downloadnixlib-f2bb59e710a4805653266833fa80940e600f3ecf.tar
nixlib-f2bb59e710a4805653266833fa80940e600f3ecf.tar.gz
nixlib-f2bb59e710a4805653266833fa80940e600f3ecf.tar.bz2
nixlib-f2bb59e710a4805653266833fa80940e600f3ecf.tar.lz
nixlib-f2bb59e710a4805653266833fa80940e600f3ecf.tar.xz
nixlib-f2bb59e710a4805653266833fa80940e600f3ecf.tar.zst
nixlib-f2bb59e710a4805653266833fa80940e600f3ecf.zip
stdenv linux, stdenv cross: Harmonize extraNativeBuildInputs
Want to make sure these are the same per host platform, without duplication.
Diffstat (limited to 'pkgs/stdenv/cross')
-rw-r--r--pkgs/stdenv/cross/default.nix9
1 files changed, 6 insertions, 3 deletions
diff --git a/pkgs/stdenv/cross/default.nix b/pkgs/stdenv/cross/default.nix
index 31ca9f2c82e4..daa9f66615c9 100644
--- a/pkgs/stdenv/cross/default.nix
+++ b/pkgs/stdenv/cross/default.nix
@@ -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
         ;
     });
   })