diff options
Diffstat (limited to 'pkgs/build-support/gcc-wrapper/ld-wrapper.sh')
-rw-r--r-- | pkgs/build-support/gcc-wrapper/ld-wrapper.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/build-support/gcc-wrapper/ld-wrapper.sh b/pkgs/build-support/gcc-wrapper/ld-wrapper.sh index 74b6273848e..822c4a03a21 100644 --- a/pkgs/build-support/gcc-wrapper/ld-wrapper.sh +++ b/pkgs/build-support/gcc-wrapper/ld-wrapper.sh @@ -32,6 +32,9 @@ if test "$NIX_ENFORCE_PURITY" = "1" -a -n "$NIX_STORE" \ # We cannot skip this; barf. echo "impure path \`$p' used in link" >&2 exit 1 + elif test "${p:0:9}" = "--sysroot"; then + # Our ld is not built with sysroot support (Can we fix that?) + : else rest=("${rest[@]}" "$p") fi @@ -45,10 +48,12 @@ extra=() extraBefore=() if test -z "$NIX_LDFLAGS_SET"; then - extra=(${extra[@]} $NIX_LDFLAGS) - extraBefore=(${extraBefore[@]} $NIX_LDFLAGS_BEFORE) + extra+=($NIX_LDFLAGS) + extraBefore+=($NIX_LDFLAGS_BEFORE) fi +extra+=($NIX_LDFLAGS_AFTER) + # Add all used dynamic libraries to the rpath. if test "$NIX_DONT_SET_RPATH" != "1"; then |