summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorAlexey Shmalko <rasen.dubi@gmail.com>2016-08-03 03:28:14 +0300
committerAlexey Shmalko <rasen.dubi@gmail.com>2016-08-03 03:28:14 +0300
commit662721a4616e7e0a854897845aebf8d8198cb1d2 (patch)
treec5a3e101487f73e244bc2f599951cd76fd88d38d /pkgs
parent47024938a2ef8c0d6821e7998dee062b430aebf0 (diff)
downloadnixpkgs-662721a4616e7e0a854897845aebf8d8198cb1d2.tar
nixpkgs-662721a4616e7e0a854897845aebf8d8198cb1d2.tar.gz
nixpkgs-662721a4616e7e0a854897845aebf8d8198cb1d2.tar.bz2
nixpkgs-662721a4616e7e0a854897845aebf8d8198cb1d2.tar.lz
nixpkgs-662721a4616e7e0a854897845aebf8d8198cb1d2.tar.xz
nixpkgs-662721a4616e7e0a854897845aebf8d8198cb1d2.tar.zst
nixpkgs-662721a4616e7e0a854897845aebf8d8198cb1d2.zip
gcc-cross-wrapper: fix for non-chroot build
When `libc` is not set, many lines expand to `/lib`, `/include`, which
makes gccCross use host libraries outside Nix (with a different
architecture).
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/build-support/gcc-cross-wrapper/builder.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/build-support/gcc-cross-wrapper/builder.sh b/pkgs/build-support/gcc-cross-wrapper/builder.sh
index 9396ace84f1..1bdda969653 100644
--- a/pkgs/build-support/gcc-cross-wrapper/builder.sh
+++ b/pkgs/build-support/gcc-cross-wrapper/builder.sh
@@ -7,7 +7,7 @@ mkdir $out/nix-support
 # Force gcc to use ld-wrapper.sh when calling ld.
 cflagsCompile="-B$out/bin/"
 
-if test -z "$nativeLibc"; then
+if test -z "$nativeLibc" -a -n "$libc"; then
     cflagsCompile="$cflagsCompile -B$gccLibs/lib -B$libc/lib/ -isystem $libc/include"
     ldflags="$ldflags -L$libc/lib"
     # Get the proper dynamic linker for glibc and uclibc.