summary refs log tree commit diff
path: root/pkgs/build-support/gcc-cross-wrapper
diff options
context:
space:
mode:
authorArmijn Hemel <armijn@gpl-violations.org>2006-03-02 18:03:20 +0000
committerArmijn Hemel <armijn@gpl-violations.org>2006-03-02 18:03:20 +0000
commitbdf35869f65e7601899b85e7deb366f83b264815 (patch)
treef7868d27431ce9ed8cecad93b2f3082619ce2942 /pkgs/build-support/gcc-cross-wrapper
parentd0c7f39a6030e957ee1287e63e81751dfc9f5406 (diff)
downloadnixlib-bdf35869f65e7601899b85e7deb366f83b264815.tar
nixlib-bdf35869f65e7601899b85e7deb366f83b264815.tar.gz
nixlib-bdf35869f65e7601899b85e7deb366f83b264815.tar.bz2
nixlib-bdf35869f65e7601899b85e7deb366f83b264815.tar.lz
nixlib-bdf35869f65e7601899b85e7deb366f83b264815.tar.xz
nixlib-bdf35869f65e7601899b85e7deb366f83b264815.tar.zst
nixlib-bdf35869f65e7601899b85e7deb366f83b264815.zip
make sure we can find things like mips-linux-ar, mips-linux-strip, and so on.
Even though you could just inherit binutils it is conceptually cleaner (I
think) to make these tools available here.

svn path=/nixpkgs/trunk/; revision=4967
Diffstat (limited to 'pkgs/build-support/gcc-cross-wrapper')
-rw-r--r--pkgs/build-support/gcc-cross-wrapper/builder.sh16
1 files changed, 11 insertions, 5 deletions
diff --git a/pkgs/build-support/gcc-cross-wrapper/builder.sh b/pkgs/build-support/gcc-cross-wrapper/builder.sh
index 18fdb511d681..1a8afbc070ed 100644
--- a/pkgs/build-support/gcc-cross-wrapper/builder.sh
+++ b/pkgs/build-support/gcc-cross-wrapper/builder.sh
@@ -13,9 +13,10 @@ if test -z "$nativeGlibc"; then
     # 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$glibc/lib/ -isystem $glibc/include"
-    ldflags="$ldflags -L$glibc/lib"
-    ldflagsBefore="-dynamic-linker $glibc/lib/ld-linux.so.2"
+    cflagsCompile="$cflagsCompile -B$glibc/usr/lib/ -isystem $glibc/usr/include"
+    ldflags="$ldflags -L$glibc/usr/lib"
+    #ldflagsBefore="-dynamic-linker $glibc/lib/ld-linux.so.2"
+    ldflagsBefore="-dynamic-linker $glibc/lib/ld-uClibc.so.0"
 fi
 
 if test -n "$nativeTools"; then
@@ -76,10 +77,15 @@ ln -s g++ $out/bin/c++
 mkGccWrapper $out/bin/g77 $gccPath/g77
 ln -s g77 $out/bin/f77
 
+ln -s $binutils/bin/$cross-ar $out/bin/$cross-ar
+ln -s $binutils/bin/$cross-as $out/bin/$cross-as
+ln -s $binutils/bin/$cross-nm $out/bin/$cross-nm
+ln -s $binutils/bin/$cross-strip $out/bin/$cross-strip
+
 
 # Make a wrapper around the linker.
-doSubstitute "$ldWrapper" "$out/bin/ld"
-chmod +x "$out/bin/ld"
+doSubstitute "$ldWrapper" "$out/bin/$cross-ld"
+chmod +x "$out/bin/$cross-ld"
 
 
 # Emit a setup hook.  Also store the path to the original GCC and