summary refs log tree commit diff
path: root/pkgs/build-support/bintools-wrapper
diff options
context:
space:
mode:
authorVladimír Čunát <v@cunat.cz>2021-07-17 20:27:52 +0200
committerVladimír Čunát <v@cunat.cz>2021-07-17 20:39:47 +0200
commit4bd38c330fc6dace1f45a29bbc7f5c64b22fffdb (patch)
tree241c5dff4c3ef11cb1a11fb4b16b7f83576a3fba /pkgs/build-support/bintools-wrapper
parentd6b748b2b34de00a07b5620ff4b30c14a7d8078a (diff)
downloadnixpkgs-4bd38c330fc6dace1f45a29bbc7f5c64b22fffdb.tar
nixpkgs-4bd38c330fc6dace1f45a29bbc7f5c64b22fffdb.tar.gz
nixpkgs-4bd38c330fc6dace1f45a29bbc7f5c64b22fffdb.tar.bz2
nixpkgs-4bd38c330fc6dace1f45a29bbc7f5c64b22fffdb.tar.lz
nixpkgs-4bd38c330fc6dace1f45a29bbc7f5c64b22fffdb.tar.xz
nixpkgs-4bd38c330fc6dace1f45a29bbc7f5c64b22fffdb.tar.zst
nixpkgs-4bd38c330fc6dace1f45a29bbc7f5c64b22fffdb.zip
Revert #127736: stdenv changes towards an alternative shell
At least for now.  Such changes are risky (we have very many packages),
and apparently it needs more testing/review without blocking other
changes.

This reverts the whole range 4d0e3984918^..8752c327377,
except for one commit that got reverted in 6f239d73096 already.
(that MR didn't even get its merge commit)
Diffstat (limited to 'pkgs/build-support/bintools-wrapper')
-rw-r--r--pkgs/build-support/bintools-wrapper/setup-hook.sh9
1 files changed, 2 insertions, 7 deletions
diff --git a/pkgs/build-support/bintools-wrapper/setup-hook.sh b/pkgs/build-support/bintools-wrapper/setup-hook.sh
index ba09d19b1f2..7e9547b96c2 100644
--- a/pkgs/build-support/bintools-wrapper/setup-hook.sh
+++ b/pkgs/build-support/bintools-wrapper/setup-hook.sh
@@ -1,4 +1,3 @@
-# shellcheck shell=bash
 # Binutils Wrapper hygiene
 #
 # See comments in cc-wrapper's setup hook. This works exactly the same way.
@@ -15,9 +14,7 @@ bintoolsWrapper_addLDVars () {
     getHostRoleEnvHook
 
     if [[ -d "$1/lib64" && ! -L "$1/lib64" ]]; then
-        varName=NIX_LDFLAGS${role_post}
-        eval "$varName=\"${!varName:-} -L$1/lib64\""
-        export "${varName?}"
+        export NIX_LDFLAGS${role_post}+=" -L$1/lib64"
     fi
 
     if [[ -d "$1/lib" ]]; then
@@ -27,9 +24,7 @@ bintoolsWrapper_addLDVars () {
         # directories and bloats the size of the environment variable space.
         local -a glob=( $1/lib/lib* )
         if [ "${#glob[*]}" -gt 0 ]; then
-            varName=NIX_LDFLAGS${role_post}
-            eval "$varName=\"${!varName:-} -L$1/lib\""
-            export "${varName?}"
+            export NIX_LDFLAGS${role_post}+=" -L$1/lib"
         fi
     fi
 }