https://gcc.gnu.org/g:767a7a06915651da173b6751959a47487351ed3a

commit r15-7727-g767a7a06915651da173b6751959a47487351ed3a
Author: Richard Earnshaw <rearn...@arm.com>
Date:   Thu Feb 27 15:11:47 2025 +0000

    testsuite: arm: Avoid incremental link warnings in pr61123-enum-size
    
    This test uses incremental linking, but that can generate warnings if
    the LTO step contains a mix of LTO and non-LTO object files (this can
    happen when there's a testglue file that is normally included during
    linking).
    
    We don't care about the testglue, though, so just tell the LTO
    optimizer to generate nolto-rel output, which is what it is falling
    back to anyway.
    
    gcc/testsuite:
            * gcc.target/arm/lto/pr61123-enum-size_0.c: (dg-lto-options) Move
            linker related options to ...
            (dg-extra-ld-options): ... here.  Add -flinker-output=nolto-rel.

Diff:
---
 gcc/testsuite/gcc.target/arm/lto/pr61123-enum-size_0.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.target/arm/lto/pr61123-enum-size_0.c 
b/gcc/testsuite/gcc.target/arm/lto/pr61123-enum-size_0.c
index c23f9d857605..4ccbeb39f43f 100644
--- a/gcc/testsuite/gcc.target/arm/lto/pr61123-enum-size_0.c
+++ b/gcc/testsuite/gcc.target/arm/lto/pr61123-enum-size_0.c
@@ -1,5 +1,6 @@
 /* { dg-lto-do link } */
-/* { dg-lto-options { { -fno-short-enums -Wl,-Ur,--no-enum-size-warning -Os 
-nostdlib -flto } } } */
+/* { dg-lto-options { { -fno-short-enums -Os -flto } } } */
+/* { dg-extra-ld-options "-flinker-output=nolto-rel 
-Wl,-Ur,--no-enum-size-warning -nostdlib" } */
 
 #include <stdlib.h>

Reply via email to