OSDN Git Service

* lib/target-supports-dg.exp (check-flags): Include TOOL_OPTIONS in
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / lib / target-supports-dg.exp
index 128ed8f..e8eac30 100644 (file)
@@ -186,6 +186,7 @@ proc check_test_flags { args } {
 
 proc check-flags { args } {
     global compiler_flags
+    global TOOL_OPTIONS
     # These variables are from DejaGnu's dg-test.
     upvar dg-extra-tool-flags extra_tool_flags
     upvar tool_flags tool_flags
@@ -198,6 +199,8 @@ proc check-flags { args } {
     set compiler_flags " toolname "
     append compiler_flags $extra_tool_flags
     append compiler_flags $tool_flags
+    # If running a subset of the test suite, $TOOL_OPTIONS may not exist.
+    catch {append compiler_flags " $TOOL_OPTIONS "}
     set dest [target_info name]
     if [board_info $dest exists multilib_flags] {
        append compiler_flags "[board_info $dest multilib_flags] "