diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2020-08-12 10:09:22 +0200 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@foss.st.com> | 2021-07-06 13:11:44 +0000 |
commit | 3a1d8067699ee8aa07a809ea54ee0f72b57e1754 (patch) | |
tree | 3683afddc6a4bfd776bbd4d7a0228e2560e9e653 | |
parent | b765a8f82e19befdbf9ef303ba4f82ba120b937f (diff) |
build-cross-gcc.sh: Build both A and RM profile multilibs in some cases
We build with multilibs when configuring with default cpu:
- RM profile when target-board forces cortex-m
- A profile when target-board forces cortex-a
- both A and RM profiles when the simulated cpu is 'any' and
target-board is empty
The goal is to allow more tests to pass with the default cpu
configuration, and we use 'any' as simulated cpu so that some tests
can try to activate recent features.
Using a simulated cpu different from 'any' disables such multilibs
because some gcc versions (eg gcc-8) have broken multilibs in
arm/cmse.c.
-rwxr-xr-x | build-cross-gcc.sh | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/build-cross-gcc.sh b/build-cross-gcc.sh index 586884b..5950fcb 100755 --- a/build-cross-gcc.sh +++ b/build-cross-gcc.sh @@ -451,13 +451,21 @@ case ${target} in ;; arm*-*-eabi) additional_gcc_configure_opts="--with-newlib --disable-tls" - case ":${targetboard}" in - :*cortex-m*) + case "${cpu}:${simu}:${targetboard}" in + default:*:*cortex-m*) additional_gcc_configure_opts="${additional_gcc_configure_opts} --enable-multilib --with-multilib-list=rmprofile" ;; - :*cortex-a*) + default:*:*cortex-a*) additional_gcc_configure_opts="${additional_gcc_configure_opts} --enable-multilib --with-multilib-list=aprofile" ;; + # We use 'any' simu when we want to activate tests for new + # features. This is helpful to disable multilibs when build + # gcc-8 which is broken in arm/cmse.c: we keep arm926 for the + # default arm-none-eabi config in gcc-8, and we can use any in + # more recent gcc versions. + default:any:) + additional_gcc_configure_opts="${additional_gcc_configure_opts} --enable-multilib --with-multilib-list=aprofile,rmprofile" + ;; esac library=newlib need_qemu=no |