From 0fdc1887a7426bf7974f0ca6bb24815dff4a2997 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Sun, 3 Apr 2016 10:26:24 -0700 Subject: Change multilib functions to set the variable. Rather than echo-ing the new value, set the value into the variable with the name passed as an argument (similar to CT_SanitizeVarDir). This allows to use CT_DoLog in these functions. Signed-off-by: Alexey Neyman --- scripts/functions | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/functions') diff --git a/scripts/functions b/scripts/functions index 49b06869..ef75e09e 100644 --- a/scripts/functions +++ b/scripts/functions @@ -1371,18 +1371,18 @@ CT_DoBuildTargetTuple() { # GCC prints nothing and exits with status 0), falling back to calling # the architecture-specific functions. CT_DoMultilibTarget() { - local target="$1"; shift + local target_var="$1"; shift local -a multi_flags=( "$@" ) local gcc_multiarch gcc_multiarch=$( "${CT_TARGET}-gcc" -print-multiarch "${multi_flags[@]}" ) if [ -n "${gcc_multiarch}" ]; then - echo "${gcc_multiarch}" + eval "${target_var}=${gcc_multiarch}" return fi # Fall back to arch-specific guesswork - CT_DoArchMultilibTarget "${target}" "${multi_flags[@]}" + CT_DoArchMultilibTarget "${target_var}" "${multi_flags[@]}" } # This function does pause the build until the user strikes "Return" -- cgit v1.2.3