From 8c2af71a0f55e6968c3f5897f5cba32904899193 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Wed, 10 Mar 2010 09:15:20 +0000 Subject: [PATCH] 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 --- pkgs/build-support/gcc-cross-wrapper/builder.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/gcc-cross-wrapper/builder.sh b/pkgs/build-support/gcc-cross-wrapper/builder.sh index 86d18ced54e..e71e1742720 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