*-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.
This commit is contained in:
committed by
John Cotton Ericson
parent
f7a93031a2
commit
1ac5398589
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user