[binutils-gdb] ia64 assembler warning breaks ld tests

Alan Modra amodra@sourceware.org
Fri Aug 1 01:18:29 GMT 2025


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e443ffcf791dee6ef8ad5205986fe6fc46ed3295

commit e443ffcf791dee6ef8ad5205986fe6fc46ed3295
Author: Alan Modra <amodra@gmail.com>
Date:   Fri Aug 1 07:10:40 2025 +0930

    ia64 assembler warning breaks ld tests
    
    The "Warning: Explicit stops are ignored in auto mode" results in
    failures of a number of run_ld_link_tests because the compiler is run
    using -S and then the resulting .s file assembled without suppplying
    -x to gas.  Fix that problem by adding -x to ASFLAGS for ia64, and
    tweak the binutils link-order test since the source is used in a ld
    test too.
    
    ld/
            * testsuite/config/default.exp: Set ASFLAGS to "-x" for ia64.
            Remove unnecessary "global".
    binutils/
            * testsuite/binutils-all/link-order.s: Provide explicit stop.
            * testsuite/binutils-all/objcopy.exp: Pass "-x" when building
            link-order test for ia64.

Diff:
---
 binutils/testsuite/binutils-all/link-order.s | 2 +-
 binutils/testsuite/binutils-all/objcopy.exp  | 2 +-
 ld/testsuite/config/default.exp              | 5 ++++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/binutils/testsuite/binutils-all/link-order.s b/binutils/testsuite/binutils-all/link-order.s
index 5994cb813a0..918cd06c0f2 100644
--- a/binutils/testsuite/binutils-all/link-order.s
+++ b/binutils/testsuite/binutils-all/link-order.s
@@ -5,7 +5,7 @@
 foo:
 	.prologue 2, 2
 	.vframe r2
-	mov r2 = r12
+	mov r2 = r12;;
 	.body
 	.restore sp
 	mov r12 = r2
diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp
index 6aa6d2d9fe7..89370bc893a 100644
--- a/binutils/testsuite/binutils-all/objcopy.exp
+++ b/binutils/testsuite/binutils-all/objcopy.exp
@@ -1293,7 +1293,7 @@ proc objcopy_test_elf_common_symbols {} {
 # ia64 specific tests
 if { ([istarget "ia64-*-elf*"]
        || [istarget "ia64-*-linux*"]) } {
-    objcopy_test "ia64 link order" link-order.s object "" ""
+    objcopy_test "ia64 link order" link-order.s object "-x" ""
 }
 
 # ELF specific tests
diff --git a/ld/testsuite/config/default.exp b/ld/testsuite/config/default.exp
index 1d696811e8e..1c12ce60193 100644
--- a/ld/testsuite/config/default.exp
+++ b/ld/testsuite/config/default.exp
@@ -185,10 +185,13 @@ if {[istarget mips64*-*-linux*] &&
 }
 
 if { [istarget rx-*-*] } {
-    global ASFLAGS
     set ASFLAGS "-muse-conventional-section-names"
 }
 
+if { [istarget ia64-*-*] } {
+    set ASFLAGS "-x"
+}
+
 # Blackfin ELF targets require selection of an explicit CPU.  Use the sim.
 if {[istarget bfin*-elf*]} {
     append gcc_B_opt " -msim"


More information about the Binutils-cvs mailing list