[binutils-gdb] ld: Limit PR ld/34088 test to Linux/x86-64 and Linux/aarch64

"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=4d11bf8cc73a1f56d2ffc5af7334ae2c251584b6

commit 4d11bf8cc73a1f56d2ffc5af7334ae2c251584b6
Author: H.J. Lu <[email protected]>
Date:   Thu Apr 23 09:23:33 2026 +0800

    ld: Limit PR ld/34088 test to Linux/x86-64 and Linux/aarch64
    
    Since PR ld/34088 test requires libm.a, which has feclearexcept, as a
    linker script like
    
    GROUP ( /usr/lib64/libm-2.42.a /usr/lib64/libmvec.a )
    
    which is implemented for Linux/x86-64 and Linux/aarch64, limit such test
    to Linux/x86-64 and Linux/aarch64.
    
            PR ld/34088
            * testsuite/ld-plugin/lto.exp: Limit PR ld/34088 test to
            Linux/x86-64 and Linux/aarch64.
    
    Signed-off-by: H.J. Lu <[email protected]>

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

diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp
index 62cca45f42b..4504fd4be01 100644
--- a/ld/testsuite/ld-plugin/lto.exp
+++ b/ld/testsuite/ld-plugin/lto.exp
@@ -929,16 +929,6 @@ set lto_run_elf_shared_tests [list \
    {-Wl,-R,tmpdir} {} \
    {pr31644a.c} {pr31644b.exe} {pass.out} {-flto} {c} {} \
    {-Wl,--as-needed tmpdir/pr31644b.a tmpdir/pr31644c.so}] \
-  [list {PR ld/34088} \
-   {-static -flto -fuse-linker-plugin} \
-   {} \
-   {pr34088.c} \
-   {pr34088.exe} \
-   {pass.out} \
-   {-flto -O0} \
-   {c} \
-   {} \
-   {-lm}] \
 ]
 
 # LTO run-time tests for ELF
@@ -1222,6 +1212,24 @@ if { [is_elf_format] } {
 	    "pr22983" \
 	] \
     ]
+
+    if { [istarget "aarch64*-*-linux"]
+	 || [istarget "x86_64-*-linux*"] } {
+	run_ld_link_exec_tests [list \
+	    [list \
+		{PR ld/34088} \
+		{-static -flto -fuse-linker-plugin} \
+		{} \
+		{pr34088.c} \
+		{pr34088.exe} \
+		{pass.out} \
+		{-flto -O0} \
+		{c} \
+		{} \
+		{-lm}] \
+	   ] \
+	]
+    }
 }
 
 if { [is_elf_format] && [check_lto_shared_available] } {
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.