about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorTuomas Tynkkynen <tuomas.tynkkynen@iki.fi>2016-06-01 23:01:24 +0300
committerTuomas Tynkkynen <tuomas.tynkkynen@iki.fi>2016-06-11 04:15:17 +0300
commita06a405d0bf57699a8fb9976c6acae08641852cc (patch)
treec5f26e84a79e6482e6f306aacc719e577ae6bfe0 /pkgs/build-support
parentaaf008bda42e51c48c72d95f1e6dbd548c0b18c2 (diff)
downloadnixlib-a06a405d0bf57699a8fb9976c6acae08641852cc.tar
nixlib-a06a405d0bf57699a8fb9976c6acae08641852cc.tar.gz
nixlib-a06a405d0bf57699a8fb9976c6acae08641852cc.tar.bz2
nixlib-a06a405d0bf57699a8fb9976c6acae08641852cc.tar.lz
nixlib-a06a405d0bf57699a8fb9976c6acae08641852cc.tar.xz
nixlib-a06a405d0bf57699a8fb9976c6acae08641852cc.tar.zst
nixlib-a06a405d0bf57699a8fb9976c6acae08641852cc.zip
cross GCC: Fix some paths to libc headers (after multiple outputs)
It's not completely clear to me why the path to libc headers is set
differently when cross building...
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/cc-wrapper/default.nix1
-rw-r--r--pkgs/build-support/gcc-cross-wrapper/builder.sh1
-rw-r--r--pkgs/build-support/gcc-cross-wrapper/default.nix1
3 files changed, 3 insertions, 0 deletions
diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix
index da114fdb347f..a37c806905fd 100644
--- a/pkgs/build-support/cc-wrapper/default.nix
+++ b/pkgs/build-support/cc-wrapper/default.nix
@@ -96,6 +96,7 @@ stdenv.mkDerivation {
       echo "-L${libc_lib}/lib" > $out/nix-support/libc-ldflags
 
       echo "${libc_lib}" > $out/nix-support/orig-libc
+      echo "${libc_dev}" > $out/nix-support/orig-libc-dev
     ''
 
     + (if nativeTools then ''
diff --git a/pkgs/build-support/gcc-cross-wrapper/builder.sh b/pkgs/build-support/gcc-cross-wrapper/builder.sh
index c6bc2a7c8bf9..9396ace84f11 100644
--- a/pkgs/build-support/gcc-cross-wrapper/builder.sh
+++ b/pkgs/build-support/gcc-cross-wrapper/builder.sh
@@ -111,6 +111,7 @@ chmod +x "$out/bin/$crossConfig-ld"
 # Glibc.
 test -n "$gcc" && echo $gcc > $out/nix-support/orig-cc
 test -n "$libc" && echo $libc > $out/nix-support/orig-libc
+test -n "$libc_dev" && echo $libc_dev > $out/nix-support/orig-libc-dev
 
 doSubstitute "$addFlags" "$out/nix-support/add-flags"
 
diff --git a/pkgs/build-support/gcc-cross-wrapper/default.nix b/pkgs/build-support/gcc-cross-wrapper/default.nix
index fe2a530e1e8e..505d80a6b2ac 100644
--- a/pkgs/build-support/gcc-cross-wrapper/default.nix
+++ b/pkgs/build-support/gcc-cross-wrapper/default.nix
@@ -46,6 +46,7 @@ stdenv.mkDerivation {
   addFlags = ./add-flags;
   inherit nativeTools nativeLibc nativePrefix gcc binutils;
   libc = if libc ? out then libc.out else libc;
+  libc_dev = if libc ? dev then libc.dev else libc;
   crossConfig = if cross != null then cross.config else null;
   osxMinVersion = cross.osxMinVersion or null;
   gccLibs = if gcc != null then gccLibs else null;