diff options
Diffstat (limited to 'gcc/testsuite/lib/gfortran.exp')
-rw-r--r-- | gcc/testsuite/lib/gfortran.exp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/testsuite/lib/gfortran.exp b/gcc/testsuite/lib/gfortran.exp index 4a1a636bb93..d9934fc07ab 100644 --- a/gcc/testsuite/lib/gfortran.exp +++ b/gcc/testsuite/lib/gfortran.exp @@ -144,6 +144,7 @@ proc gfortran_init { args } { global TESTING_IN_BUILD_TREE global gcc_warning_prefix global gcc_error_prefix + global TEST_ALWAYS_FLAGS # We set LC_ALL and LANG to C so that we get the same error messages as expected. setenv LC_ALL C @@ -194,6 +195,13 @@ proc gfortran_init { args } { set ALWAYS_GFORTRANFLAGS "" + # 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] { + lappend ALWAYS_GFORTRANFLAGS "additional_flags=$TEST_ALWAYS_FLAGS" + } + if ![is_remote host] { if [info exists TOOL_OPTIONS] { lappend ALWAYS_GFORTRANFLAGS "ldflags=[gfortran_link_flags [get_multilibs ${TOOL_OPTIONS}] ]" |