summary refs log tree commit diff
path: root/pkgs/build-support/gcc-cross-wrapper/builder.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support/gcc-cross-wrapper/builder.sh')
-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 9396ace84f11..1bdda9696536 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.