2009-11-14 21:03:01 +00:00
|
|
|
# Compute s390-specific values
|
|
|
|
|
|
|
|
CT_DoArchTupleValues() {
|
2009-11-17 10:54:44 +00:00
|
|
|
# That's the only thing to override
|
|
|
|
if [ "${CT_ARCH_64}" = "y" ]; then
|
2013-01-20 12:58:22 +00:00
|
|
|
CT_TARGET_ARCH="s390x${CT_ARCH_SUFFIX}"
|
2009-11-17 10:54:44 +00:00
|
|
|
fi
|
2009-11-14 21:03:01 +00:00
|
|
|
}
|
2016-05-21 20:16:52 +00:00
|
|
|
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
# Get multilib architecture-specific target
|
|
|
|
# Usage: CT_DoArchMultilibTarget "multilib flags" "target tuple"
|
|
|
|
CT_DoArchMultilibTarget ()
|
|
|
|
{
|
|
|
|
local target="${1}"; shift
|
|
|
|
local -a multi_flags=( "$@" )
|
|
|
|
|
|
|
|
local m31=false
|
|
|
|
local m64=false
|
|
|
|
|
|
|
|
for m in "${multi_flags[@]}"; do
|
|
|
|
case "${multi_flags}" in
|
|
|
|
-m64) m64=true ;;
|
|
|
|
-m31) m31=true ;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
# Fix bitness
|
|
|
|
case "${target}" in
|
|
|
|
s390-*) $m64 && target=${target/#s390-/s390x-} ;;
|
|
|
|
s390x-*) $m31 && target=${target/#s390x-/s390-} ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
echo "${target}"
|
|
|
|
}
|