git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #29548 from obsidiansystems/cc-wrapper-cross-misc

cc-wrapper: Two trivial changes affecting cross compilation

commit6338c0b202084e1c630b9b82e92281e60761807c authorJohn Ericson <Ericson2314@yahoo.com> dateMon 18 Sep 2017, 19:34 (9 years ago) parent807d8ce13fc982
1 file changed+2−4
pkgs/build-support/cc-wrapper/default.nix+2−4
pkgs/build-support/cc-wrapper/default.nix+2−4
@@ -21,8 +21,6 @@ assert !nativeTools ->
2121assert !(nativeLibc && noLibc);
2222assert (noLibc || nativeLibc) == (libc == null);
2323
24−assert stdenv.targetPlatform != stdenv.hostPlatform -> runCommand != null;
25−
2624# For ghdl (the vhdl language provider to gcc) we need zlib in the wrapper.
2725assert cc.langVhdl or false -> zlib != null;
2826
@@ -66,11 +64,11 @@ let
6664 else if targetPlatform.system == "i686-linux" then "${libc_lib}/lib/ld-linux.so.2"
6765 else if targetPlatform.system == "x86_64-linux" then "${libc_lib}/lib/ld-linux-x86-64.so.2"
6866 # ARM with a wildcard, which can be "" or "-armhf".
69− else if targetPlatform.isArm then "${libc_lib}/lib/ld-linux*.so.3"
67+ else if (with targetPlatform; isArm && isLinux) then "${libc_lib}/lib/ld-linux*.so.3"
7068 else if targetPlatform.system == "aarch64-linux" then "${libc_lib}/lib/ld-linux-aarch64.so.1"
7169 else if targetPlatform.system == "powerpc-linux" then "${libc_lib}/lib/ld.so.1"
7270 else if targetPlatform.system == "mips64el-linux" then "${libc_lib}/lib/ld.so.1"
73− else if targetPlatform.system == "x86_64-darwin" then "/usr/lib/dyld"
71+ else if targetPlatform.isDarwin then "/usr/lib/dyld"
7472 else if stdenv.lib.hasSuffix "pc-gnu" targetPlatform.config then "ld.so.1"
7573 else null;
7674