summaryrefslogtreecommitdiff
path: root/scripts/build/arch
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-03-27 06:32:27 (GMT)
committerAlexey Neyman <stilor@att.net>2017-03-27 06:32:27 (GMT)
commita596ec5b39f900b1f4b481cc46afd20b0e5457d2 (patch)
tree03d289cf72e5a49f746ee110d903467f68fbed96 /scripts/build/arch
parentde1366132956a7672ad895dd2effee64ca30769c (diff)
Fix up the sysroot issue for sh4 in a different way
(see the comments in the code for details on the issue) Old workaround in 100-gcc.sh stopped working (probably, due to one of GCC version upgrades), so switch to the other approach originally described there: adjust the list of multilibs to not include the default target explicitly. Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'scripts/build/arch')
-rw-r--r--scripts/build/arch/sh.sh23
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}"