2020-04-24 23:36:52 +00:00
|
|
|
# See cc-wrapper for comments.
|
|
|
|
var_templates_list=(
|
2020-06-18 07:06:33 +00:00
|
|
|
NIX_IGNORE_LD_THROUGH_GCC
|
|
|
|
NIX_LDFLAGS
|
|
|
|
NIX_LDFLAGS_BEFORE
|
|
|
|
NIX_LDFLAGS_AFTER
|
|
|
|
NIX_LDFLAGS_HARDEN
|
|
|
|
NIX_HARDENING_ENABLE
|
2020-04-24 23:36:52 +00:00
|
|
|
)
|
|
|
|
var_templates_bool=(
|
2020-06-18 07:06:33 +00:00
|
|
|
NIX_SET_BUILD_ID
|
|
|
|
NIX_DONT_SET_RPATH
|
2020-04-24 23:36:52 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
accumulateRoles
|
|
|
|
|
|
|
|
for var in "${var_templates_list[@]}"; do
|
2020-06-18 07:06:33 +00:00
|
|
|
mangleVarList "$var" ${role_suffixes[@]+"${role_suffixes[@]}"}
|
2020-04-24 23:36:52 +00:00
|
|
|
done
|
|
|
|
for var in "${var_templates_bool[@]}"; do
|
2020-06-18 07:06:33 +00:00
|
|
|
mangleVarBool "$var" ${role_suffixes[@]+"${role_suffixes[@]}"}
|
2020-04-24 23:36:52 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
if [ -e @out@/nix-support/libc-ldflags ]; then
|
2020-06-18 07:06:33 +00:00
|
|
|
NIX_LDFLAGS_@suffixSalt@+=" $(< @out@/nix-support/libc-ldflags)"
|
2020-04-24 23:36:52 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -e @out@/nix-support/libc-ldflags-before ]; then
|
2020-06-18 07:06:33 +00:00
|
|
|
NIX_LDFLAGS_BEFORE_@suffixSalt@="$(< @out@/nix-support/libc-ldflags-before) $NIX_LDFLAGS_BEFORE_@suffixSalt@"
|
2020-04-24 23:36:52 +00:00
|
|
|
fi
|
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
export NIX_BINTOOLS_WRAPPER_FLAGS_SET_@suffixSalt@=1
|