From 3c4edd6bfa1ec120c175c8b136eb39cb2bdf6dc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Sun, 15 Nov 2009 21:36:13 +0000 Subject: [PATCH] Fixing the gcc cross wrapper (removing some /usr/) so it gives proper linking. svn path=/nixpkgs/branches/stdenv-updates/; revision=18361 --- pkgs/build-support/gcc-cross-wrapper/builder.sh | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/pkgs/build-support/gcc-cross-wrapper/builder.sh b/pkgs/build-support/gcc-cross-wrapper/builder.sh index 0e8aa69fa8e..d9136ed58ce 100644 --- a/pkgs/build-support/gcc-cross-wrapper/builder.sh +++ b/pkgs/build-support/gcc-cross-wrapper/builder.sh @@ -5,17 +5,10 @@ source $stdenv/setup cflagsCompile="-B$out/bin/" if test -z "$nativeLibc"; then - # The "-B$glibc/lib/" flag is a quick hack to force gcc to link - # against the crt1.o from our own glibc, rather than the one in - # /usr/lib. The real solution is of course to prevent those paths - # from being used by gcc in the first place. - # The dynamic linker is passed in `ldflagsBefore' to allow - # explicit overrides of the dynamic linker by callers to gcc/ld - # (the *last* value counts, so ours should come first). - cflagsCompile="$cflagsCompile -B$libc/usr/lib/ -isystem $libc/usr/include" - ldflags="$ldflags -L$libc/usr/lib" - #ldflagsBefore="-dynamic-linker $libc/lib/ld-linux.so.2" - ldflagsBefore="-dynamic-linker $libc/lib/ld-uClibc.so.0" + cflagsCompile="$cflagsCompile -B$libc/lib/ -isystem $libc/include" + ldflags="$ldflags -L$libc/lib" + ldflagsBefore="-dynamic-linker $libc/lib/ld-linux.so.?" + #ldflagsBefore="-dynamic-linker $libc/lib/ld-uClibc.so.0" fi if test -n "$nativeTools"; then