diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2023-10-10 17:15:38 +0000 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2023-10-24 16:10:23 +0000 |
commit | e6ae1013afc4eaf92b9f44acad081095641c73cc (patch) | |
tree | e9a06848b2255ffd70a495ce8916043d0943643a /tcwg_gnu-build.sh | |
parent | 04ed64aa9f67f8a36faabbc8e5d456c573e9b502 (diff) |
tcwg_gnu-config.sh: Use gnu_data array instead of global variables
To avoid having useless global variables and tricky overriding rules,
define and use a new gnu_data[] array containing the appropriate
values.
This is the same idea as we use in tcwg_bmk-config.sh with bmk_data[].
Change-Id: I743a036df03004143a412008c245d0877c3fc3e6
Diffstat (limited to 'tcwg_gnu-build.sh')
-rwxr-xr-x | tcwg_gnu-build.sh | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/tcwg_gnu-build.sh b/tcwg_gnu-build.sh index f8f4e358..3e1ff9ad 100755 --- a/tcwg_gnu-build.sh +++ b/tcwg_gnu-build.sh @@ -313,14 +313,6 @@ tcwg_gnu_breakup_changed_components () } rr[breakup_changed_components]=tcwg_gnu_breakup_changed_components -gcc_override_configure=() -gcc_target_board_options=() -qemu_cpu=() -# shellcheck disable=SC2034 -pretty_project="" -# shellcheck disable=SC2034 -pretty_config="" - # Define the above variables appropriately settings_for_ci_project_and_config "${rr[ci_project]}" "${rr[ci_config]}" @@ -331,7 +323,7 @@ case "${rr[ci_project]}" in 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 -- \ - "${gcc_override_configure[@]}" + ${gnu_data[gcc_override_configure]} run_step skip_on_fail x clean_sysroot case "${rr[components]}" in *glibc*) @@ -343,14 +335,14 @@ case "${rr[ci_project]}" in ;; esac run_step skip_on_fail 5 build_abe stage2 -- \ - "${gcc_override_configure[@]}" + ${gnu_data[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 -- \ - "${gcc_override_configure[@]}" + ${gnu_data[gcc_override_configure]} run_step skip_on_fail x clean_sysroot case "${rr[components]}" in *glibc*) @@ -362,14 +354,14 @@ case "${rr[ci_project]}" in ;; esac run_step skip_on_fail -4 build_abe stage2 -- \ - "${gcc_override_configure[@]}" + ${gnu_data[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[@]}" \ - "${gcc_override_configure[@]}" \ - "${gcc_target_board_options[@]}" \ - "${qemu_cpu[@]}" + ${gnu_data[gcc_override_configure]} \ + ${gnu_data[gcc_target_board_options]} \ + ${gnu_data[qemu_cpu]} ;; tcwg_gnu_native_build) run_step skip_on_fail 0 true |