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
|
2016-04-03 17:26:24 +00:00
|
|
|
# Usage: CT_DoArchMultilibTarget "target variable" "multilib flags"
|
2016-05-21 20:16:52 +00:00
|
|
|
CT_DoArchMultilibTarget ()
|
|
|
|
{
|
2016-04-03 17:26:24 +00:00
|
|
|
local target_var="${1}"; shift
|
2016-05-21 20:16:52 +00:00
|
|
|
local -a multi_flags=( "$@" )
|
2016-04-03 17:26:24 +00:00
|
|
|
local target_
|
2016-05-21 20:16:52 +00:00
|
|
|
|
|
|
|
local m31=false
|
|
|
|
local m64=false
|
|
|
|
|
|
|
|
for m in "${multi_flags[@]}"; do
|
|
|
|
case "${multi_flags}" in
|
|
|
|
-m64) m64=true ;;
|
|
|
|
-m31) m31=true ;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2016-04-03 17:26:24 +00:00
|
|
|
eval target_=\"\${${target_var}}\"
|
|
|
|
|
2016-05-21 20:16:52 +00:00
|
|
|
# Fix bitness
|
2016-04-03 17:26:24 +00:00
|
|
|
case "${target_}" in
|
|
|
|
s390-*) $m64 && target_=${target_/#s390-/s390x-} ;;
|
|
|
|
s390x-*) $m31 && target_=${target_/#s390x-/s390-} ;;
|
2016-05-21 20:16:52 +00:00
|
|
|
esac
|
|
|
|
|
2016-04-03 17:26:24 +00:00
|
|
|
# Set the target variable
|
|
|
|
eval ${target_var}=\"${target_}\"
|
2016-05-21 20:16:52 +00:00
|
|
|
}
|