[binutils-gdb] ld: Run PR ld/34570 tests only for ELF targets

"H.J. Lu via Binutils-cvs" <[email protected]>
Newsgroups gmane.comp.gnu.binutils.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a12d235cf42ba2383fda2cea2561f8ec3a8e2028

commit a12d235cf42ba2383fda2cea2561f8ec3a8e2028
Author: H.J. Lu <[email protected]>
Date:   Fri Aug 28 16:19:34 2026 +0800

    ld: Run PR ld/34570 tests only for ELF targets
    
    Since realdelf is used to check common symbol size in PR ld/34570 tests,
    run PR ld/34570 tests only for ELF targets.
    
            PR ld/34570
            * testsuite/ld-plugin/lto.exp: Run PR ld/34570 tests only for
            ELF targets.
    
    Signed-off-by: H.J. Lu <[email protected]>

Diff:
---
 ld/testsuite/ld-plugin/lto.exp | 134 ++++++++++++++++++++---------------------
 1 file changed, 67 insertions(+), 67 deletions(-)

diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp
index 8ad341293b5..00578a63791 100644
--- a/ld/testsuite/ld-plugin/lto.exp
+++ b/ld/testsuite/ld-plugin/lto.exp
@@ -275,73 +275,6 @@ set lto_link_tests [list \
    {} \
    "libcommon-2.a" \
   ] \
-  [list \
-   "Build pr34570a.exe" \
-   "-flto" \
-   "-flto -fcommon" \
-   {pr34570a.c pr34570b.c} \
-   {{readelf {-s --wide} pr34570a.d}} \
-   "pr34570a.exe" \
-  ] \
-  [list \
-   "Build pr34570b.exe" \
-   "-flto" \
-   "-flto -fcommon" \
-   {pr34570b.c pr34570a.c} \
-   {{readelf {-s --wide} pr34570a.d}} \
-   "pr34570b.exe" \
-  ] \
-  [list \
-   "Build pr34570a.o" \
-   "" \
-   "-O2 -fcommon -flto $lto_no_fat" \
-   {pr34570a.c} \
-   {} \
-   "" \
-   "c" \
-  ] \
-  [list \
-   "Build pr34570b.o" \
-   "" \
-   "-O2 -fcommon -fno-lto" \
-   {pr34570b.c} \
-   {} \
-   "" \
-   "c" \
-  ] \
-  [list \
-   "Build pr34570c.o" \
-   "" \
-   "-O2 -fcommon -flto $lto_no_fat" \
-   {pr34570c.c} \
-   {} \
-   "" \
-   "c" \
-  ] \
-  [list \
-   "Build pr34570c.exe" \
-   "-flto tmpdir/pr34570a.o tmpdir/pr34570b.o" \
-   "" \
-   {dummy.c} \
-   {{readelf {-s --wide} pr34570b.d}} \
-   "pr34570c.exe" \
-  ] \
-  [list \
-   "Build pr34570d.exe" \
-   "-flto tmpdir/pr34570b.o tmpdir/pr34570a.o" \
-   "" \
-   {dummy.c} \
-   {{readelf {-s --wide} pr34570b.d}} \
-   "pr34570d.exe" \
-  ] \
-  [list \
-   "Build pr34570e.exe" \
-   "-flto tmpdir/pr34570c.o tmpdir/pr34570b.o" \
-   "-flto -fcommon" \
-   {dummy.c} \
-   {{readelf {-s --wide} pr34570c.d}} \
-   "pr34570e.exe" \
-  ] \
 ]
 
 if { [at_least_gcc_version 10 0] && [check_lto_shared_available] } {
@@ -1278,6 +1211,73 @@ if { [is_elf_format] } {
 	     {readelf {--dyn-syms --wide} pr22983.4.d}} \
 	    "pr22983" \
 	] \
+	[list \
+	    "Build pr34570a.exe" \
+	    "-flto" \
+	    "-flto -fcommon" \
+	    {pr34570a.c pr34570b.c} \
+	    {{readelf {-s --wide} pr34570a.d}} \
+	    "pr34570a.exe" \
+	] \
+	[list \
+	    "Build pr34570b.exe" \
+	    "-flto" \
+	    "-flto -fcommon" \
+	    {pr34570b.c pr34570a.c} \
+	    {{readelf {-s --wide} pr34570a.d}} \
+	    "pr34570b.exe" \
+	] \
+	[list \
+	    "Build pr34570a.o" \
+	    "" \
+	    "-O2 -fcommon -flto $lto_no_fat" \
+	    {pr34570a.c} \
+	    {} \
+	    "" \
+	    "c" \
+	] \
+	[list \
+	    "Build pr34570b.o" \
+	    "" \
+	    "-O2 -fcommon -fno-lto" \
+	    {pr34570b.c} \
+	    {} \
+	    "" \
+	    "c" \
+	] \
+	[list \
+	    "Build pr34570c.o" \
+	    "" \
+	    "-O2 -fcommon -flto $lto_no_fat" \
+	    {pr34570c.c} \
+	    {} \
+	    "" \
+	    "c" \
+	] \
+	[list \
+	    "Build pr34570c.exe" \
+	    "-flto tmpdir/pr34570a.o tmpdir/pr34570b.o" \
+	    "" \
+	    {dummy.c} \
+	    {{readelf {-s --wide} pr34570b.d}} \
+	    "pr34570c.exe" \
+	] \
+	[list \
+	    "Build pr34570d.exe" \
+	    "-flto tmpdir/pr34570b.o tmpdir/pr34570a.o" \
+	    "" \
+	    {dummy.c} \
+	    {{readelf {-s --wide} pr34570b.d}} \
+	    "pr34570d.exe" \
+	] \
+	[list \
+	    "Build pr34570e.exe" \
+	    "-flto tmpdir/pr34570c.o tmpdir/pr34570b.o" \
+	    "-flto -fcommon" \
+	    {dummy.c} \
+	    {{readelf {-s --wide} pr34570c.d}} \
+	    "pr34570e.exe" \
+	] \
     ]
 
     if { [istarget "aarch64*-*-linux"]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.