summary refs log tree commit diff
path: root/pkgs/build-support/gcc-wrapper/ld-wrapper.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support/gcc-wrapper/ld-wrapper.sh')
-rw-r--r--pkgs/build-support/gcc-wrapper/ld-wrapper.sh12
1 files changed, 7 insertions, 5 deletions
diff --git a/pkgs/build-support/gcc-wrapper/ld-wrapper.sh b/pkgs/build-support/gcc-wrapper/ld-wrapper.sh
index c94f24833c7..bf59b2a8afb 100644
--- a/pkgs/build-support/gcc-wrapper/ld-wrapper.sh
+++ b/pkgs/build-support/gcc-wrapper/ld-wrapper.sh
@@ -12,7 +12,7 @@ skip () {
 }
 
 params=("$@")
-if test "$NIX_ENFORCE_PURITY" = "1" -a -n "$NIX_STORE"; then
+if test "$NIX_ENFORCE_PURITY" = "1x" -a -n "$NIX_STORE"; then
     rest=()
     n=0
     while test $n -lt ${#params[*]}; do
@@ -22,10 +22,12 @@ if test "$NIX_ENFORCE_PURITY" = "1" -a -n "$NIX_STORE"; then
             skip $p
         elif test "$p" = "-L" -a "${p2:0:${#NIX_STORE}}" != "$NIX_STORE"; then
             n=$((n + 1)); skip $p2
-        elif test "${p:0:1}" = "/" -a "${p:0:${#NIX_STORE}}" != "$NIX_STORE"; then
-            # We cannot skip this; barf.
-            echo "impure path \`$p' used in link"
-            exit 1
+        elif test "$p" = "-dynamic-linker" -a "${p2:0:${#NIX_STORE}}" != "$NIX_STORE"; then
+            n=$((n + 1)); skip $p2
+#        elif test "${p:0:1}" = "/" -a "${p:0:${#NIX_STORE}}" != "$NIX_STORE"; then
+#            # We cannot skip this; barf.
+#            echo "impure path \`$p' used in link"
+#            exit 1
         else
             rest=("${rest[@]}" "$p")
         fi