@@ -2302,7 +2302,7 @@
@item @{ dg-extra-ld-options @var{options} [@{ target @var{selector} @}]@}
This directive adds @var{options} to the linker options used.
-@item @{ dg-suppress-ld-options @var{options} @}
+@item @{ dg-suppress-ld-options @var{options} [@{ target @var{selector} @}]@}
This directive removes @var{options} from the set of linker options used.
@end table
@@ -309,9 +309,17 @@
}
}
} elseif { ![string compare "dg-suppress-ld-options" $cmd] } {
- set dg-suppress-ld-options [lindex $op 2]
- verbose \
- "dg-suppress-ld-options for main is ${dg-suppress-ld-options}"
+ if { [llength $op] > 4 } {
+ error "[lindex $op 0]: too many arguments"
+ } else {
+ if { [llength $op] == 3
+ || ([llength $op] > 3
+ && [dg-process-target [lindex $op 3]] == "S") } {
+ set dg-suppress-ld-options [lindex $op 2]
+ verbose \
+ "dg-suppress-ld-options for main is ${dg-suppress-ld-options}"
+ }
+ }
} elseif { ![string compare "dg-final" $cmd] } {
if { [llength $op] > 3 } {
error "[lindex $op 0]: too many arguments"