re PR testsuite/45851 (FAIL: gcc.dg/lto/20090210 link test with WHOPR owing to bad...
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Tue, 12 Oct 2010 12:06:18 +0000 (12:06 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Tue, 12 Oct 2010 12:06:18 +0000 (12:06 +0000)
gcc/testsuite:
PR testsuite/45851
* lib/lto.exp (lto-get-options-main): Support optional target
selector for dg-extra-ld-options.

gcc:
PR testsuite/45851
* doc/sourcebuild.texi (LTO Testing, dg-extra-ld-options):
Document optional target selector.

From-SVN: r165366

gcc/ChangeLog
gcc/doc/sourcebuild.texi
gcc/testsuite/ChangeLog
gcc/testsuite/lib/lto.exp

index bd5743d62dd83c618071216cac7d8c8baee41bdb..8de44b9a31deaeaadd65d3e4eec629d411358c35 100644 (file)
@@ -1,3 +1,9 @@
+2010-10-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       PR testsuite/45851
+       * doc/sourcebuild.texi (LTO Testing, dg-extra-ld-options):
+       Document optional target selector.
+
 2010-10-12  Joseph Myers  <joseph@codesourcery.com>
 
        * flag-types.h: New.
index 83a0dbfab152b6e5b3b7b75613cc8a9dea9b284d..1f981e746061aaf452c992e81186eeb726af88d8 100644 (file)
@@ -2300,7 +2300,7 @@ This directive provides a list of one or more sets of compiler options
 to override @var{LTO_OPTIONS}.  Each test will be compiled and run with
 each of these sets of options.
 
-@item @{ dg-extra-ld-options @var{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} @}
index 5a1f268fb48c5db16abd60f1830d0d9dde8a5a6f..5b7c05441a3e09416ea9c8cfd6b7462933336f15 100644 (file)
@@ -1,3 +1,9 @@
+2010-10-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       PR testsuite/45851
+       * lib/lto.exp (lto-get-options-main): Support optional target
+       selector for dg-extra-ld-options.
+
 2010-10-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        * gcc.dg/pragma-init-fini.c: Skip on i?86-*-solaris2.8 && !gas.
index 7d0620faa0ed2f8ebb81f3355c4afa4d11861935..30b6f06001d58b1b6636bdb06ab1efd9c6335857 100644 (file)
@@ -277,8 +277,17 @@ proc lto-get-options-main { src } {
                warning "lto.exp does not support dg-lto-do $dgdo"
            }
        } elseif { ![string compare "dg-extra-ld-options" $cmd] } {
-           set dg-extra-ld-options [lindex $op 2]
-           verbose "dg-extra-ld-options for main is ${dg-extra-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-extra-ld-options [lindex $op 2]
+                   verbose \
+                       "dg-extra-ld-options for main is ${dg-extra-ld-options}"
+               }
+           }
        } elseif { ![string compare "dg-suppress-ld-options" $cmd] } {
            set dg-suppress-ld-options [lindex $op 2]
            verbose \