Index: lib/target-supports-dg.exp =================================================================== --- lib/target-supports-dg.exp (revision 114524) +++ lib/target-supports-dg.exp (working copy) @@ -186,6 +186,7 @@ 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 @@ 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] "