diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-04-28 00:08:48 -0400 |
---|---|---|
committer | John Cotton Ericson <jcericson@macos-ny-2.office.obsidian.systems> | 2020-05-12 00:44:44 -0400 |
commit | 1ac5398589916a6a433e845342c9b85c4c52f5dc (patch) | |
tree | 4e525c4c01cdc5a79105de31d962ba024833f69d /pkgs/build-support/bintools-wrapper/setup-hook.sh | |
parent | f7a93031a284d39e303e98006a82250e3139cee9 (diff) | |
download | nixpkgs-1ac5398589916a6a433e845342c9b85c4c52f5dc.tar nixpkgs-1ac5398589916a6a433e845342c9b85c4c52f5dc.tar.gz nixpkgs-1ac5398589916a6a433e845342c9b85c4c52f5dc.tar.bz2 nixpkgs-1ac5398589916a6a433e845342c9b85c4c52f5dc.tar.lz nixpkgs-1ac5398589916a6a433e845342c9b85c4c52f5dc.tar.xz nixpkgs-1ac5398589916a6a433e845342c9b85c4c52f5dc.tar.zst nixpkgs-1ac5398589916a6a433e845342c9b85c4c52f5dc.zip |
*-wrapper; Switch from `infixSalt` to `suffixSalt`
I hate the thing too even though I made it, and rather just get rid of it. But we can't do that yet. In the meantime, this brings us more inline with autoconf and will make it slightly easier for me to write a pkg-config wrapper, which we need.
Diffstat (limited to 'pkgs/build-support/bintools-wrapper/setup-hook.sh')
-rw-r--r-- | pkgs/build-support/bintools-wrapper/setup-hook.sh | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/pkgs/build-support/bintools-wrapper/setup-hook.sh b/pkgs/build-support/bintools-wrapper/setup-hook.sh index a714bd151c9..7e9547b96c2 100644 --- a/pkgs/build-support/bintools-wrapper/setup-hook.sh +++ b/pkgs/build-support/bintools-wrapper/setup-hook.sh @@ -10,11 +10,11 @@ bintoolsWrapper_addLDVars () { # See ../setup-hooks/role.bash - local role_post role_pre + local role_post getHostRoleEnvHook if [[ -d "$1/lib64" && ! -L "$1/lib64" ]]; then - export NIX_${role_pre}LDFLAGS+=" -L$1/lib64" + export NIX_LDFLAGS${role_post}+=" -L$1/lib64" fi if [[ -d "$1/lib" ]]; then @@ -24,7 +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 - export NIX_${role_pre}LDFLAGS+=" -L$1/lib" + export NIX_LDFLAGS${role_post}+=" -L$1/lib" fi fi } @@ -52,7 +52,7 @@ fi # Export tool environment variables so various build systems use the right ones. -export NIX_${role_pre}BINTOOLS=@out@ +export NIX_BINTOOLS${role_post}=@out@ for cmd in \ ar as ld nm objcopy objdump readelf ranlib strip strings size windres @@ -60,7 +60,6 @@ do if PATH=$_PATH type -p "@targetPrefix@${cmd}" > /dev/null then - export "${role_pre}${cmd^^}=@targetPrefix@${cmd}"; export "${cmd^^}${role_post}=@targetPrefix@${cmd}"; fi done @@ -70,4 +69,4 @@ done export NIX_HARDENING_ENABLE # No local scope in sourced file -unset -v role_pre role_post cmd upper_case +unset -v role_post cmd upper_case |