@@ -188,13 +188,24 @@
# If the linker used understands -M <mapfile>, pass it to clear hardware
# capabilities set by the Sun assembler.
-set FLAGS ""
set clearcap_ldflags "-Wl,-M,$srcdir/$subdir/clearcap.map"
if [check_no_compiler_messages mapfile executable {
int main (void) { return 0; }
} $clearcap_ldflags ] {
- set FLAGS $clearcap_ldflags
+
+ if { [info procs gcc_target_compile] != [list] \
+ && [info procs saved_gcc_target_compile] == [list] } {
+ rename gcc_target_compile saved_gcc_target_compile
+
+ proc gcc_target_compile { source dest type options } {
+ global clearcap_ldflags
+ # Always pass -Wl,-M,<mapfile>, but don't let it show up in gcc.sum.
+ lappend options "additional_flags=$clearcap_ldflags"
+
+ return [saved_gcc_target_compile $source $dest $type $options]
+ }
+ }
}
# If a testcase doesn't have special options, use these.
@@ -221,7 +232,7 @@
set tests [prune $tests $srcdir/$subdir/vect-args.c]
# Main loop.
-dg-runtest $tests $FLAGS $DEFAULT_CFLAGS
+dg-runtest $tests "" $DEFAULT_CFLAGS
# All done.
dg-finish