public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/modula-2] PR-105411 BugFix gm2 testsuite now uses TEST_ALWAYS_FLAGS.
@ 2022-04-29 17:07 Gaius Mulley
0 siblings, 0 replies; only message in thread
From: Gaius Mulley @ 2022-04-29 17:07 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:f043f7346c4d2bc2a3b1c3b59572a3d416fe46c8
commit f043f7346c4d2bc2a3b1c3b59572a3d416fe46c8
Author: Gaius Mulley <gaius.mulley@southwales.ac.uk>
Date: Fri Apr 29 18:07:26 2022 +0100
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>
Diff:
---
gcc/testsuite/lib/gm2.exp | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/gcc/testsuite/lib/gm2.exp b/gcc/testsuite/lib/gm2.exp
index a5ee4039414..9506c3b7187 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]"
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-04-29 17:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-29 17:07 [gcc/devel/modula-2] PR-105411 BugFix gm2 testsuite now uses TEST_ALWAYS_FLAGS Gaius Mulley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).