[COMMITTED] ld: Run PR ld/34570 tests only for ELF targets

Message ID CAMe9rOpLVbyExV7UUJ6LWNs3prijzpdhLwfeBc1M9Xqzo6owRA@mail.gmail.com
State New
Headers
Series [COMMITTED] ld: Run PR ld/34570 tests only for ELF targets |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 fail Patch failed to apply

Commit Message

H.J. Lu Aug. 28, 2026, 8:24 a.m. UTC
  On Fri, Aug 28, 2026 at 3:34 PM Alan Modra <amodra@gmail.com> wrote:
>
> I see testsuite failures on x86_64-w64-mingw32 with this.
>
> --
> Alan Modra

I am checking this patch after testing with x86_64-w64-mingw32.
  

Comments

Alan Modra Aug. 28, 2026, 12:29 p.m. UTC | #1
On Fri, Aug 28, 2026 at 04:24:48PM +0800, H.J. Lu wrote:
> I am checking this patch after testing with x86_64-w64-mingw32.

Fails remain.

+FAIL: ld-plugin/lto-3r
+FAIL: ld-plugin/lto-4r-a
+FAIL: ld-plugin/lto-4r-b
+FAIL: ld-plugin/lto-4r-c
+FAIL: ld-plugin/lto-4r-d
+FAIL: ld-plugin/lto-5r
+FAIL: ld-plugin/lto-10r
+FAIL: PR ld/19317 (2)
+FAIL: LTO 3b
+FAIL: PR ld/19317 (3)

ld-plugin/dummy.s: Assembler messages:
ld-plugin/dummy.s:1: Error: junk at end of line, first unrecognized character is `-
'

The above also caused a bunch of tests to not be run.
  

Patch

From 35607310e0c7c125812dac98c1d8ccf88b107a08 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Fri, 28 Aug 2026 16:19:34 +0800
Subject: [PATCH] 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 <hjl.tools@gmail.com>
---
 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 0144ae8f70a..41593efc253 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"]
-- 
2.55.0