summaryrefslogtreecommitdiff
path: root/gcc/testsuite/lib/g++.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/lib/g++.exp')
-rw-r--r--gcc/testsuite/lib/g++.exp8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/testsuite/lib/g++.exp b/gcc/testsuite/lib/g++.exp
index 9e269b12d66..ff111253f12 100644
--- a/gcc/testsuite/lib/g++.exp
+++ b/gcc/testsuite/lib/g++.exp
@@ -190,6 +190,7 @@ proc g++_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
@@ -241,6 +242,13 @@ proc g++_init { args } {
set ALWAYS_CXXFLAGS ""
+ # TEST_ALWAYS_FLAGS are flags that should be passed to every
+ # compilation command. They are passed first to allow individual
+ # tests to override them.
+ if [info exists TEST_ALWAYS_FLAGS] {
+ lappend ALWAYS_CXXFLAGS "additional_flags=$TEST_ALWAYS_FLAGS"
+ }
+
if ![is_remote host] {
if [info exists TOOL_OPTIONS] {
lappend ALWAYS_CXXFLAGS "additional_flags=[g++_include_flags [get_multilibs ${TOOL_OPTIONS}] ]"