diff options
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/gcc-wrapper/builder.sh | 4 | ||||
-rw-r--r-- | pkgs/build-support/gcc-wrapper/default.nix | 3 | ||||
-rw-r--r-- | pkgs/build-support/gcc-wrapper/gcc-wrapper.sh | 2 | ||||
-rw-r--r-- | pkgs/build-support/gcc-wrapper/ld-wrapper.sh | 5 |
4 files changed, 8 insertions, 6 deletions
diff --git a/pkgs/build-support/gcc-wrapper/builder.sh b/pkgs/build-support/gcc-wrapper/builder.sh index f6f38891153..a6a4c3f7253 100644 --- a/pkgs/build-support/gcc-wrapper/builder.sh +++ b/pkgs/build-support/gcc-wrapper/builder.sh @@ -39,7 +39,7 @@ mkGccWrapper () { sed \ -e "s^@gcc@^$src^g" \ -e "s^@out@^$out^g" \ - -e "s^@bash@^$SHELL^g" \ + -e "s^@shell@^$shell^g" \ < $gccWrapper > $dst chmod +x $dst } @@ -58,7 +58,7 @@ sed \ -e "s^@out@^$out^g" \ -e "s^@ldflags@^$ldflags^g" \ -e "s^@ld@^$ldPath/ld^g" \ - -e "s^@bash@^$SHELL^g" \ + -e "s^@shell@^$shell^g" \ < $ldWrapper > $out/bin/ld chmod +x $out/bin/ld diff --git a/pkgs/build-support/gcc-wrapper/default.nix b/pkgs/build-support/gcc-wrapper/default.nix index 48687604971..4dfacf9b3b5 100644 --- a/pkgs/build-support/gcc-wrapper/default.nix +++ b/pkgs/build-support/gcc-wrapper/default.nix @@ -6,7 +6,7 @@ # variables so that the compiler and the linker just "work". { name, stdenv, nativeTools, nativeGlibc, nativePrefix ? "" -, gcc ? null, glibc ? null, binutils ? null +, gcc ? null, glibc ? null, binutils ? null, shell ? "" }: assert nativeTools -> nativePrefix != ""; @@ -23,4 +23,5 @@ stdenv.mkDerivation { langC = if nativeTools then true else gcc.langC; langCC = if nativeTools then true else gcc.langCC; langF77 = if nativeTools then false else gcc.langF77; + shell = if shell == "" then stdenv.shell else shell; } diff --git a/pkgs/build-support/gcc-wrapper/gcc-wrapper.sh b/pkgs/build-support/gcc-wrapper/gcc-wrapper.sh index 21e51924209..149d6e2fcbc 100644 --- a/pkgs/build-support/gcc-wrapper/gcc-wrapper.sh +++ b/pkgs/build-support/gcc-wrapper/gcc-wrapper.sh @@ -1,4 +1,4 @@ -#! @bash@ -e +#! @shell@ -e if test -n "$NIX_GCC_WRAPPER_START_HOOK"; then . "$NIX_GCC_WRAPPER_START_HOOK" diff --git a/pkgs/build-support/gcc-wrapper/ld-wrapper.sh b/pkgs/build-support/gcc-wrapper/ld-wrapper.sh index 1443af33155..3196a932246 100644 --- a/pkgs/build-support/gcc-wrapper/ld-wrapper.sh +++ b/pkgs/build-support/gcc-wrapper/ld-wrapper.sh @@ -1,4 +1,4 @@ -#! @bash@ -e +#! @shell@ -e if test -n "$NIX_LD_WRAPPER_START_HOOK"; then . "$NIX_LD_WRAPPER_START_HOOK" @@ -9,7 +9,8 @@ fi # Optionally filter out paths not refering to the store. params=("$@") -if test "$NIX_ENFORCE_PURITY" = "1" -a -n "$NIX_STORE"; then +if test "$NIX_ENFORCE_PURITY" = "1" -a -n "$NIX_STORE" \ + -a \( -z "$NIX_IGNORE_LD_THROUGH_GCC" -o -z "$NIX_LDFLAGS_SET" \); then rest=() n=0 while test $n -lt ${#params[*]}; do |