diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2017-09-18 23:33:22 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2017-09-18 23:33:22 -0400 |
commit | d403ffecdd745935c4d2e40ead8ac4f758aa44f0 (patch) | |
tree | c1d251490d6d698599316cc43c31c1860027a283 | |
parent | cbdd77f7911c5d8f2b5410f3c509dee287647f63 (diff) | |
parent | 13fc982e650381c6ca5a76470ae1d23abbc000ab (diff) | |
download | nixlib-d403ffecdd745935c4d2e40ead8ac4f758aa44f0.tar nixlib-d403ffecdd745935c4d2e40ead8ac4f758aa44f0.tar.gz nixlib-d403ffecdd745935c4d2e40ead8ac4f758aa44f0.tar.bz2 nixlib-d403ffecdd745935c4d2e40ead8ac4f758aa44f0.tar.lz nixlib-d403ffecdd745935c4d2e40ead8ac4f758aa44f0.tar.xz nixlib-d403ffecdd745935c4d2e40ead8ac4f758aa44f0.tar.zst nixlib-d403ffecdd745935c4d2e40ead8ac4f758aa44f0.zip |
Merge master-merged PRs #29547 and #29548 into staging
-rw-r--r-- | pkgs/build-support/cc-wrapper/default.nix | 6 | ||||
-rw-r--r-- | pkgs/stdenv/generic/make-derivation.nix | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index 0114170b8ebc..999faf756ed4 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -21,8 +21,6 @@ assert !nativeTools -> assert !(nativeLibc && noLibc); assert (noLibc || nativeLibc) == (libc == null); -assert stdenv.targetPlatform != stdenv.hostPlatform -> runCommand != null; - # For ghdl (the vhdl language provider to gcc) we need zlib in the wrapper. assert cc.langVhdl or false -> zlib != null; @@ -66,11 +64,11 @@ let else if targetPlatform.system == "i686-linux" then "${libc_lib}/lib/ld-linux.so.2" else if targetPlatform.system == "x86_64-linux" then "${libc_lib}/lib/ld-linux-x86-64.so.2" # ARM with a wildcard, which can be "" or "-armhf". - else if targetPlatform.isArm then "${libc_lib}/lib/ld-linux*.so.3" + else if (with targetPlatform; isArm && isLinux) then "${libc_lib}/lib/ld-linux*.so.3" else if targetPlatform.system == "aarch64-linux" then "${libc_lib}/lib/ld-linux-aarch64.so.1" else if targetPlatform.system == "powerpc-linux" then "${libc_lib}/lib/ld.so.1" else if targetPlatform.system == "mips64el-linux" then "${libc_lib}/lib/ld.so.1" - else if targetPlatform.system == "x86_64-darwin" then "/usr/lib/dyld" + else if targetPlatform.isDarwin then "/usr/lib/dyld" else if stdenv.lib.hasSuffix "pc-gnu" targetPlatform.config then "ld.so.1" else null; diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index 23a77719fa0a..eb8545c6999e 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -97,7 +97,7 @@ rec { { name = name + lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) - stdenv.hostPlatform.config; + ("-" + stdenv.hostPlatform.config); builder = attrs.realBuilder or stdenv.shell; args = attrs.args or ["-e" (attrs.builder or ./default-builder.sh)]; inherit stdenv; |