about summary refs log tree commit diff
path: root/pkgs/build-support/gcc-wrapper-old/builder.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support/gcc-wrapper-old/builder.sh')
-rw-r--r--pkgs/build-support/gcc-wrapper-old/builder.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/pkgs/build-support/gcc-wrapper-old/builder.sh b/pkgs/build-support/gcc-wrapper-old/builder.sh
index 7bb487096145..a8e8a370ec0d 100644
--- a/pkgs/build-support/gcc-wrapper-old/builder.sh
+++ b/pkgs/build-support/gcc-wrapper-old/builder.sh
@@ -24,7 +24,7 @@ if test -z "$nativeLibc"; then
     # compile, because it uses "#include_next <limits.h>" to find the
     # limits.h file in ../includes-fixed. To remedy the problem,
     # another -idirafter is necessary to add that directory again.
-    echo "-B$libc/lib/ -idirafter $libc/include -idirafter $gcc/lib/gcc/*/*/include-fixed" > $out/nix-support/libc-cflags
+    echo "-B$libc/lib/ -idirafter $libc_dev/include -idirafter $gcc/lib/gcc/*/*/include-fixed" > $out/nix-support/libc-cflags
 
     echo "-L$libc/lib" > $out/nix-support/libc-ldflags
 
@@ -39,9 +39,9 @@ if test -n "$nativeTools"; then
     ldPath="$nativePrefix/bin"
 else
     if test -e "$gcc/lib64"; then
-        gccLDFlags="$gccLDFlags -L$gcc/lib64"
+        gccLDFlags="$gccLDFlags -L$gcc_lib/lib64"
     fi
-    gccLDFlags="$gccLDFlags -L$gcc/lib"
+    gccLDFlags="$gccLDFlags -L$gcc_lib/lib"
     if [ -n "$langVhdl" ]; then
         gccLDFlags="$gccLDFlags -L$zlib/lib"
     fi
@@ -95,6 +95,7 @@ doSubstitute() {
         -e "s^@binutils@^$binutils^g" \
         -e "s^@coreutils@^$coreutils^g" \
         -e "s^@libc@^$libc^g" \
+        -e "s^@libc_bin@^$libc_bin^g" \
         -e "s^@ld@^$ld^g" \
         < "$src" > "$dst" 
 }
@@ -210,5 +211,5 @@ cp -p $utils $out/nix-support/utils.sh
 # tools like gcov, the manpages, etc. as well (including for binutils
 # and Glibc).
 if test -z "$nativeTools"; then
-    echo $gcc $binutils $libc > $out/nix-support/propagated-user-env-packages
+    echo $gcc $binutils $libc $libc_bin > $out/nix-support/propagated-user-env-packages
 fi