summary refs log tree commit diff
path: root/pkgs/development/compilers/gcc-new/builder.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/compilers/gcc-new/builder.sh')
-rwxr-xr-xpkgs/development/compilers/gcc-new/builder.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkgs/development/compilers/gcc-new/builder.sh b/pkgs/development/compilers/gcc-new/builder.sh
index de1b7e1b0a75d..ce772d07a78c6 100755
--- a/pkgs/development/compilers/gcc-new/builder.sh
+++ b/pkgs/development/compilers/gcc-new/builder.sh
@@ -5,7 +5,7 @@ buildinputs="$binutils"
 
 tar xvfj $src
 
-if test "$noSysDirs" == "1"; then
+if test "$enforcePurity" = "1"; then
     # Disable the standard include directories.
     cd gcc-*
     cat >> ./gcc/cppdefault.h <<EOF
@@ -29,8 +29,9 @@ mkdir build
 cd build
 ../gcc-*/configure --prefix=$out --enable-languages="$langs"
 
-if test "$noSysDirs" == "1"; then
+if test "$enforcePurity" = "1"; then
     # Patch some of the makefiles to force linking against our own glibc.
+    . $NIX_GCC/nix-support/add-flags # add glibc/gcc flags
     extraflags="-Wl,-s $NIX_CFLAGS_COMPILE $NIX_CFLAGS_LINK"
     for i in $NIX_LDFLAGS; do
         extraflags="$extraflags -Wl,$i"