about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2010-03-10 09:15:20 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2010-03-10 09:15:20 +0000
commit8c2af71a0f55e6968c3f5897f5cba32904899193 (patch)
treeea542708db0ca76e1b1a003fd524dac35f669597 /pkgs/build-support
parent12e960f592f8cfa1faadc05cb0111bfd59a0eb7a (diff)
Fixing the gcc-cross-wrapper (wanting to make it work with uclibc, I had
broken it for glibc).
Now I tested that it works for both.

svn path=/nixpkgs/trunk/; revision=20519
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/gcc-cross-wrapper/builder.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/build-support/gcc-cross-wrapper/builder.sh b/pkgs/build-support/gcc-cross-wrapper/builder.sh
index 86d18ced54ef5..e71e174272028 100644
--- a/pkgs/build-support/gcc-cross-wrapper/builder.sh
+++ b/pkgs/build-support/gcc-cross-wrapper/builder.sh
@@ -7,8 +7,11 @@ cflagsCompile="-B$out/bin/"
 if test -z "$nativeLibc"; then
     cflagsCompile="$cflagsCompile -B$libc/lib/ -isystem $libc/include"
     ldflags="$ldflags -L$libc/lib"
+    # Get the proper dynamic linker for glibc and uclibc. 
     dlinker=`eval 'echo $libc/lib/ld-*.so.?'`
-    ldflagsBefore="-dynamic-linker $dlinker"
+    if [ -n "$dlinker" ]; then
+      ldflagsBefore="-dynamic-linker $dlinker"
+    fi
 fi
 
 if test -n "$nativeTools"; then