diff options
author | Gaius Mulley <gaius.mulley@southwales.ac.uk> | 2022-04-29 18:07:26 +0100 |
---|---|---|
committer | Gaius Mulley <gaius.mulley@southwales.ac.uk> | 2022-04-29 18:07:26 +0100 |
commit | f043f7346c4d2bc2a3b1c3b59572a3d416fe46c8 (patch) | |
tree | 9f649c913c8008e727cf8dce2aecc2d8f75d941c | |
parent | 955517d6fe442493d35ba4a477b7f523f73db2d9 (diff) | |
download | gcc-f043f7346c4d2bc2a3b1c3b59572a3d416fe46c8.zip gcc-f043f7346c4d2bc2a3b1c3b59572a3d416fe46c8.tar.gz gcc-f043f7346c4d2bc2a3b1c3b59572a3d416fe46c8.tar.bz2 |
PR-105411 BugFix gm2 testsuite now uses TEST_ALWAYS_FLAGS.
2022-04-29 Gaius Mulley <gaius.mulley@southwales.ac.uk>
gcc/testsuite/ChangeLog:
* gcc/testsuite/lib/gm2.exp (gm2_target_compile_default):
Add TEST_ALWAYS_FLAGS to allow individual tests to override
options.
Signed-off-by: Gaius Mulley <gaius.mulley@southwales.ac.uk>
-rw-r--r-- | gcc/testsuite/lib/gm2.exp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gcc/testsuite/lib/gm2.exp b/gcc/testsuite/lib/gm2.exp index a5ee403..9506c3b 100644 --- a/gcc/testsuite/lib/gm2.exp +++ b/gcc/testsuite/lib/gm2.exp @@ -142,9 +142,10 @@ proc gm2_init { args } { # proc gm2_target_compile_default { source dest type options } { - global gluefile wrap_flags; - global GCC_UNDER_TEST; - global TOOL_OPTIONS; + global gluefile wrap_flags + global GCC_UNDER_TEST + global TOOL_OPTIONS + global TEST_ALWAYS_FLAGS if {[target_info needs_status_wrapper] != "" && \ [target_info needs_status_wrapper] != "0" && \ @@ -153,6 +154,13 @@ proc gm2_target_compile_default { source dest type options } { lappend options "ldflags=$wrap_flags" } + # TEST_ALWAYS_FLAGS are flags that should be passed to every + # compilation. They are passed first to allow individual + # tests to override them. + if [info exists TEST_ALWAYS_FLAGS] { + set options [concat "{additional_flags=$TEST_ALWAYS_FLAGS}" $options] + } + if [target_info exists gcc,stack_size] { lappend options "additional_flags=-DSTACK_SIZE=[target_info gcc,stack_size]" } |