diff options
Diffstat (limited to 'scripts/build/arch')
-rw-r--r-- | scripts/build/arch/sh.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/scripts/build/arch/sh.sh b/scripts/build/arch/sh.sh index 6761435..59bc08a 100644 --- a/scripts/build/arch/sh.sh +++ b/scripts/build/arch/sh.sh @@ -36,6 +36,29 @@ CT_DoArchTupleValues () { CT_ARCH_FLOAT_CFLAG= } +CT_DoArchMultilibList() { + local save_ifs="${IFS}" + local new + local x + + # In a configuration for SuperH, GCC list of multilibs shall not include + # the default CPU. E.g. if configuring for sh4-*-*, we need to remove + # "sh4" or "m4" from the multilib list. Otherwise, the resulting compiler + # will fail when that CPU is selected explicitly "sh4-multilib-linux-gnu-gcc -m4 ..." + # as it will fail to find the sysroot with that suffix. + IFS=, + for x in ${CT_CC_GCC_MULTILIB_LIST}; do + if [ "${x}" = "${CT_ARCH_SH_VARIANT}" -o "sh${x#m}" = "${CT_ARCH_SH_VARIANT}" ]; then + CT_DoLog WARN "Ignoring '${x}' in multilib list: it is the default multilib" + continue + fi + new="${new:+${new},}${x}" + done + IFS="${save_ifs}" + CT_CC_GCC_MULTILIB_LIST="${new}" + CT_DoLog DEBUG "Adjusted CT_CC_GCC_MULTILIB_LIST to '${CT_CC_GCC_MULTILIB_LIST}'" +} + CT_DoArchUClibcConfig() { local cfg="${1}" |