diff options
author | Alexey Neyman <stilor@att.net> | 2016-04-03 17:26:24 (GMT) |
---|---|---|
committer | Alexey Neyman <stilor@att.net> | 2016-08-23 18:00:27 (GMT) |
commit | 0fdc1887a7426bf7974f0ca6bb24815dff4a2997 (patch) | |
tree | d188e5a20d2deba7d516c648d8f9a3adb1a5ddc4 /scripts/build/arch/s390.sh | |
parent | 3ebc5d0c1e72e95f05a02818a3e2c642663d4b74 (diff) |
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 <stilor@att.net>
Diffstat (limited to 'scripts/build/arch/s390.sh')
-rw-r--r-- | scripts/build/arch/s390.sh | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/scripts/build/arch/s390.sh b/scripts/build/arch/s390.sh index e303420..dff86a0 100644 --- a/scripts/build/arch/s390.sh +++ b/scripts/build/arch/s390.sh @@ -9,11 +9,12 @@ CT_DoArchTupleValues() { #------------------------------------------------------------------------------ # Get multilib architecture-specific target -# Usage: CT_DoArchMultilibTarget "multilib flags" "target tuple" +# Usage: CT_DoArchMultilibTarget "target variable" "multilib flags" CT_DoArchMultilibTarget () { - local target="${1}"; shift + local target_var="${1}"; shift local -a multi_flags=( "$@" ) + local target_ local m31=false local m64=false @@ -25,11 +26,14 @@ CT_DoArchMultilibTarget () esac done + eval target_=\"\${${target_var}}\" + # Fix bitness - case "${target}" in - s390-*) $m64 && target=${target/#s390-/s390x-} ;; - s390x-*) $m31 && target=${target/#s390x-/s390-} ;; + case "${target_}" in + s390-*) $m64 && target_=${target_/#s390-/s390x-} ;; + s390x-*) $m31 && target_=${target_/#s390x-/s390-} ;; esac - echo "${target}" + # Set the target variable + eval ${target_var}=\"${target_}\" } |