diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 78e48c4f98d7..1d686e95963f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-11-11 Rainer Orth + + * doc/sourcebuild.texi (LTO Testing, dg-suppress-ld-options): + Document optional target selector. + 2010-11-11 Dave Korn * lto-streamer-out.c (write_symbol): Use int_size_in_bytes rather than diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index cdf63e0338bc..239536c15523 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -2302,7 +2302,7 @@ each of these sets of options. @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 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 95c548c1332c..26b24d3e5987 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2010-11-11 Rainer Orth + + * lib/lto.exp (lto-get-options-main): Support optional target + selector for dg-suppress-ld-options. + 2010-11-11 Martin Jambor PR tree-optimization/46383 diff --git a/gcc/testsuite/lib/lto.exp b/gcc/testsuite/lib/lto.exp index 57c7a2ebd25a..36bc72a850ee 100644 --- a/gcc/testsuite/lib/lto.exp +++ b/gcc/testsuite/lib/lto.exp @@ -309,9 +309,17 @@ proc lto-get-options-main { src } { } } } 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"