diff --git a/pkgs/build-support/gcc-wrapper/ld-wrapper.sh b/pkgs/build-support/gcc-wrapper/ld-wrapper.sh index 5b8af068a00c..822c4a03a218 100644 --- a/pkgs/build-support/gcc-wrapper/ld-wrapper.sh +++ b/pkgs/build-support/gcc-wrapper/ld-wrapper.sh @@ -48,10 +48,12 @@ extra=() extraBefore=() if test -z "$NIX_LDFLAGS_SET"; then - extra+=($NIX_LDFLAGS $NIX_LDFLAGS_AFTER) + 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