summaryrefslogtreecommitdiff
path: root/scripts/build/cc/100-gcc.sh
diff options
context:
space:
mode:
authorDmitry Pankratov <dp@ubiquitech.com>2016-06-18 14:02:15 (GMT)
committerDmitry Pankratov <dp@ubiquitech.com>2016-06-18 14:02:15 (GMT)
commit91b8280e8c9458e81fc94d1f9983f2a642ebb7a8 (patch)
tree9279482c6f4e8a28420c2f1adf19dcb084dc9f04 /scripts/build/cc/100-gcc.sh
parentf6d8dc44111c6e96706eed8b0ae0483e2fb63856 (diff)
parent6e7c61650a39a67ee02ed58c11d64c94c436bb33 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'scripts/build/cc/100-gcc.sh')
-rw-r--r--scripts/build/cc/100-gcc.sh21
1 files changed, 18 insertions, 3 deletions
diff --git a/scripts/build/cc/100-gcc.sh b/scripts/build/cc/100-gcc.sh
index 7085a90..7bb3610 100644
--- a/scripts/build/cc/100-gcc.sh
+++ b/scripts/build/cc/100-gcc.sh
@@ -403,10 +403,20 @@ do_gcc_core_backend() {
extra_config+=("--with-system-zlib")
fi
- # Some versions of gcc have a deffective --enable-multilib.
- # Since that's the default, only pass --disable-multilib.
+ # Some versions of gcc have a defective --enable-multilib.
+ # Since that's the default, only pass --disable-multilib. For multilib,
+ # also enable multiarch. Without explicit --enable-multiarch, pass-1
+ # compiler is configured as multilib/no-multiarch and pass-2/final
+ # are multilib/multiarch (because gcc autodetects multiarch based on
+ # multiple instances of crt*.o in the install directory - which do
+ # not exist in pass-1).
if [ "${CT_MULTILIB}" != "y" ]; then
extra_config+=("--disable-multilib")
+ else
+ extra_config+=("--enable-multiarch")
+ if [ -n "${CT_CC_GCC_MULTILIB_LIST}" ]; then
+ extra_config+=("--with-multilib-list=${CT_CC_GCC_MULTILIB_LIST}")
+ fi
fi
CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'"
@@ -880,10 +890,15 @@ do_gcc_backend() {
extra_config+=("--with-system-zlib")
fi
- # Some versions of gcc have a deffective --enable-multilib.
+ # Some versions of gcc have a defective --enable-multilib.
# Since that's the default, only pass --disable-multilib.
if [ "${CT_MULTILIB}" != "y" ]; then
extra_config+=("--disable-multilib")
+ else
+ extra_config+=("--enable-multiarch")
+ if [ -n "${CT_CC_GCC_MULTILIB_LIST}" ]; then
+ extra_config+=("--with-multilib-list=${CT_CC_GCC_MULTILIB_LIST}")
+ fi
fi
CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'"