mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-01-31 08:25:32 +00:00
Add an ability to modify an exported variable
... and use that ability to permanently set CTNG_LD_IS in case gold is default linker and we're building glibc. Fixes #988. This was a long-standing breakage in crosstool-NG (at least since it began to run each step in a sub-shell). Signed-off-by: Alexey Neyman <stilor@att.net>
This commit is contained in:
parent
7c4c6892b9
commit
f232d6d09a
@ -227,9 +227,10 @@ do_binutils_backend() {
|
|||||||
cp -a "${prefix}/bin/${CT_TARGET}-ld" \
|
cp -a "${prefix}/bin/${CT_TARGET}-ld" \
|
||||||
"${prefix}/${CT_TARGET}/bin/ld"
|
"${prefix}/${CT_TARGET}/bin/ld"
|
||||||
|
|
||||||
# If needed, force using ld.bfd during the toolchain build
|
# If needed, force using ld.bfd during the toolchain build.
|
||||||
if [ "${CT_BINUTILS_FORCE_LD_BFD}" = "y" ]; then
|
# Note that
|
||||||
export CTNG_LD_IS=bfd
|
if [ "${CT_BINUTILS_FORCE_LD_BFD_DEFAULT}" = "y" ]; then
|
||||||
|
CT_EnvModify export CTNG_LD_IS bfd
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -1026,9 +1026,15 @@ CT_DoConfigSub() {
|
|||||||
# Normally, each step is executed in a sub-shell and thus cannot modify the
|
# Normally, each step is executed in a sub-shell and thus cannot modify the
|
||||||
# environment for the next step(s). When this is needed, it can do so by
|
# environment for the next step(s). When this is needed, it can do so by
|
||||||
# invoking this function.
|
# invoking this function.
|
||||||
# Usage: CT_EnvModify VAR VALUE
|
# Usage: CT_EnvModify [export] VAR VALUE
|
||||||
CT_EnvModify() {
|
CT_EnvModify() {
|
||||||
echo "${1}=\"${2}\"" >> "${CT_BUILD_DIR}/env.modify.sh"
|
local e
|
||||||
|
if [ "$1" = "export" ]; then
|
||||||
|
shift
|
||||||
|
e="export "
|
||||||
|
fi
|
||||||
|
eval "${e}${1}=\"${2}\""
|
||||||
|
echo "${e}${1}=\"${2}\"" >> "${CT_BUILD_DIR}/env.modify.sh"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Compute the target tuple from what is provided by the user
|
# Compute the target tuple from what is provided by the user
|
||||||
|
Loading…
x
Reference in New Issue
Block a user