ld: Limit PR ld/34088 test to Linux/x86-64 and Linux/aarch64
Commit Message
On Thu, Apr 23, 2026 at 9:03 AM Alan Modra <amodra@gmail.com> wrote:
>
> The test relies on having a glibc installed with a script libm.a. As
> far as I can see that means the test is only useful on x68_64 and
> aarch64 with a newish glibc. Please limit it, or write a more
> generally useful test.
>
> These fails turned up:
> microblaze-linux-gnu +FAIL: PR ld/34088
> tilepro-linux-gnu +FAIL: PR ld/34088
>
> Both with "warning: feclearexcept is not implemented and will always
> fail".
>
> --
> Alan Modra
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 <hjl.tools@gmail.com>
Comments
On Thu, Apr 23, 2026 at 09:30:06AM +0800, H.J. Lu wrote:
> 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 <hjl.tools@gmail.com>
Thanks.
From d97400165b1c6ac53d39fcd91d62aa5dd8ceab5b Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Thu, 23 Apr 2026 09:23:33 +0800
Subject: [PATCH] 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 <hjl.tools@gmail.com>
---
ld/testsuite/ld-plugin/lto.exp | 28 ++++++++++++++++++----------
1 file changed, 18 insertions(+), 10 deletions(-)
@@ -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] } {
--
2.53.0