diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2021-03-04 20:49:33 +0000 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2021-03-04 20:49:33 +0000 |
commit | 0a571d9c4cb3a24fed8de8a7f496e362a646c11c (patch) | |
tree | a4cb02bc5d0e1f9a2b54c676c23936b9eafc99e0 /config | |
parent | 21bfed13181bdd3011c9af0ccd97583427266ef9 (diff) |
config/gcc.conf: Don't set default multilib setting if the user has overridden them
Without this patch, if the user uses --set gcc_override_configure=--disable-multilib
GCC for arm-eabi is effectively configured with:
--enable-multilib --with-multilib-list=aprofile --disable-multilib
If the user also overrides --with-cpu, GCC's consistency checks fail
because --with-multilib-list=aprofile is still taken into account and
considered conflicting with --with-cpu (--disable-multilib does not
remove multiib-list).
This patch avoids setting the detault multilib flags if the user has
overridden then, so for instance the above example would result in
configuring with --disable-multilib --with-cpu=XXX, which would pass
GCC consistency checks.
Change-Id: I67c29de3165599c2dcda4a64aaf135d228f67b5e
Diffstat (limited to 'config')
-rw-r--r-- | config/gcc.conf | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/config/gcc.conf b/config/gcc.conf index ff8c566d..65aebcc4 100644 --- a/config/gcc.conf +++ b/config/gcc.conf @@ -62,17 +62,19 @@ default_configure_flags="${default_configure_flags} --with-cloog=no --with-ppl=n #default_configure_flags="${default_configure_flags} --disable-libatomic" # Enable multilib for bare-metal, since newlib supports it. -case ${target} in - arm*-eabi*) - default_configure_flags="${default_configure_flags} --enable-multilib --with-multilib-list=${multilib_list}" - ;; - aarch64*-*elf) - default_configure_flags="${default_configure_flags} --enable-multilib" - ;; - *) - default_configure_flags="${default_configure_flags} --disable-multilib" - ;; -esac +if echo "${gcc_override_configure}" | egrep -q -v 'multilib' ; then + case ${target} in + arm*-eabi*) + default_configure_flags="${default_configure_flags} --enable-multilib --with-multilib-list=${multilib_list}" + ;; + aarch64*-*elf) + default_configure_flags="${default_configure_flags} --enable-multilib" + ;; + *) + default_configure_flags="${default_configure_flags} --disable-multilib" + ;; + esac +fi # Enable errata support aarch64_errata="--enable-fix-cortex-a53-835769 --enable-fix-cortex-a53-843419" |