diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2023-07-05 16:11:39 +0000 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2023-07-07 07:24:27 +0000 |
commit | 40246dd82d11d9cc71829e9193baf1cf1fdccc34 (patch) | |
tree | 0a00839af8c546968e1d1adf4df1e0b73e27472e /tcwg_gnu-build.sh | |
parent | e8ad862c4fa3cc6c4cd1a378d37f3aab564a7763 (diff) |
tcwg_gnu-build.sh: Add support for tcw_gnu_embed* arm_v7a_softfp_eabi
The string arm_v7a_softfp is a shortcut to mean testing an arm-eabi toolchain with:
-marm -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp
We could build the toolchain with the default configuration flags, but
that would mean building a lot of useless multilibs, since we want to
force the above flags when running the tests.
So we also configure & build GCC with
--disable-multilib --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-mode=arm --with-float=softfp
Change-Id: Ieb6c40ad56a3ae3795ad5a74faeb5d0add16a977
Diffstat (limited to 'tcwg_gnu-build.sh')
-rwxr-xr-x | tcwg_gnu-build.sh | 47 |
1 files changed, 42 insertions, 5 deletions
diff --git a/tcwg_gnu-build.sh b/tcwg_gnu-build.sh index 06abd8f4..1fe44873 100755 --- a/tcwg_gnu-build.sh +++ b/tcwg_gnu-build.sh @@ -308,13 +308,44 @@ tcwg_gnu_breakup_changed_components () } rr[breakup_changed_components]=tcwg_gnu_breakup_changed_components +gcc_override_configure=() +gcc_target_board_options=() +qemu_cpu=() + +# Build the right libs depending on the target. Hardcode the +# arch/cpu/float-abi/mode to speed up toolchain builds: the +# alternative of building rmprofile multilibs takes a very long +# time. Setting the values here has the drawback that we have to build +# one toolchain per target_board type. +# Also force the corresponding options via target_board_options. This +# mimics how several vendors test the toolchain. +case "${rr[ci_project]}" in + tcwg_gnu_embed*) + case "${rr[target]}" in + "arm_v7a_softfp_eabi") + gcc_override_configure+=( + "--set" "gcc_override_configure=--disable-multilib" + "--set" "gcc_override_configure=--with-arch=armv7-a" + "--set" "gcc_override_configure=--with-fpu=vfpv3-d16" + "--set" "gcc_override_configure=--with-mode=arm" + "--set" "gcc_override_configure=--with-float=softfp" + ) + gcc_target_board_options+=( + "--set target_board_options={-marm/-march=armv7-a/-mfpu=vfpv3-d16/-mfloat-abi=softfp}" + ) + qemu_cpu+=(--qemu-cpu cortex-a9) + ;; + esac +esac + run_step stop_on_fail -10 reset_artifacts run_step stop_on_fail x prepare_abe case "${rr[ci_project]}" in tcwg_gnu_cross_build|tcwg_gnu_embed_build) run_step skip_on_fail 0 true run_step skip_on_fail 1 build_abe binutils - run_step skip_on_fail 2 build_abe stage1 + run_step skip_on_fail 2 build_abe stage1 -- \ + "${gcc_override_configure[@]}" run_step skip_on_fail x clean_sysroot case "${rr[components]}" in *glibc*) @@ -325,13 +356,15 @@ case "${rr[ci_project]}" in run_step skip_on_fail 4 build_abe newlib ;; esac - run_step skip_on_fail 5 build_abe stage2 + run_step skip_on_fail 5 build_abe stage2 -- \ + "${gcc_override_configure[@]}" run_step skip_on_fail 6 build_abe gdb run_step skip_on_fail 7 build_abe qemu ;; tcwg_gnu_cross_check_*|tcwg_gnu_embed_check_*) run_step skip_on_fail -8 build_abe binutils - run_step skip_on_fail -7 build_abe stage1 + run_step skip_on_fail -7 build_abe stage1 -- \ + "${gcc_override_configure[@]}" run_step skip_on_fail x clean_sysroot case "${rr[components]}" in *glibc*) @@ -342,11 +375,15 @@ case "${rr[ci_project]}" in run_step skip_on_fail -5 build_abe newlib ;; esac - run_step skip_on_fail -4 build_abe stage2 + run_step skip_on_fail -4 build_abe stage2 -- \ + "${gcc_override_configure[@]}" run_step skip_on_fail -3 build_abe gdb run_step skip_on_fail -2 build_abe qemu run_step skip_on_fail -1 build_abe dejagnu - run_step skip_on_fail 0 build_abe "check_${rr[ci_project]#*check_}" -- "${runtestflags[@]}" + run_step skip_on_fail 0 build_abe "check_${rr[ci_project]#*check_}" -- "${runtestflags[@]}" \ + "${gcc_override_configure[@]}" \ + "${gcc_target_board_options[@]}" \ + "${qemu_cpu[@]}" ;; tcwg_gnu_native_build) run_step skip_on_fail 0 true |