[binutils-gdb] MIPS/LD/testsuite: Match mips-elf.exp for ABI selection in comm-data.exp

"Maciej W. Rozycki 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=14a3da134502e643311a2155a99fbf685d48412f

commit 14a3da134502e643311a2155a99fbf685d48412f
Author: Maciej W. Rozycki <[email protected]>
Date:   Thu Apr 2 15:43:46 2026 +0100

    MIPS/LD/testsuite: Match mips-elf.exp for ABI selection in comm-data.exp
    
    Use an array variable for ABI selection in comm-data.exp just as
    mips-elf.exp does.

Diff:
---
 ld/testsuite/ld-mips-elf/comm-data.exp | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/ld/testsuite/ld-mips-elf/comm-data.exp b/ld/testsuite/ld-mips-elf/comm-data.exp
index 03280a01157..d06c60b1add 100644
--- a/ld/testsuite/ld-mips-elf/comm-data.exp
+++ b/ld/testsuite/ld-mips-elf/comm-data.exp
@@ -31,17 +31,17 @@ if { ![istarget mips*-*-*]
     return
 }
 
-set has_o32abi [expr ![istarget *-*-openbsd*] \
-		     && ![istarget mips64*-ps2-elf*]]
-set has_n32abi [expr [istarget *-img-elf*] \
+set has_abi(o32) [expr ![istarget *-*-openbsd*] \
+		     && ![istarget mips64*el-ps2-elf*]]
+set has_abi(n32) [expr [istarget *-img-elf*] \
 		     || [istarget *-mti-elf*] \
-		     || [istarget *-ps2-elf*] \
+		     || [istarget mips64*el-ps2-elf*] \
 		     || [istarget *-sde-elf*] \
 		     || [istarget *-*-freebsd*] \
 		     || [istarget *-*-irix6*] \
 		     || [istarget *-*-kfreebsd*-gnu] \
 		     || [istarget *-*-linux*]]
-set has_n64abi [expr [istarget *-*-freebsd*] \
+set has_abi(n64) [expr [istarget *-*-freebsd*] \
 		     || [istarget *-*-irix6*] \
 		     || [istarget *-*-kfreebsd*-gnu] \
 		     || [istarget *-*-linux*] \
@@ -83,7 +83,7 @@ if {[istarget *-img-elf*] \
     } else {
 	set abi_ldemul(o32) elf32b4300
     }
-} elseif { [istarget *-ps2-elf*] } {
+} elseif { [istarget mips64*el-ps2-elf*] } {
     set abi_ldemul(o32) elf32lr5900
     set abi_ldemul(n32) elf32lr5900n32
 } elseif { [istarget *-*-elf*] \
@@ -157,13 +157,13 @@ proc mips_comm_data_test { abi flag emul reloc } {
 # the 64-bit -march option is required to override it, like for
 # "mipsisa32r2el-*-*".
 set abis ""
-if $has_o32abi {
+if $has_abi(o32) {
     lappend abis o32 -32 $abi_ldemul(o32)
 }
-if $has_n32abi {
+if $has_abi(n32) {
     lappend abis n32 "-n32 -march=mips3" $abi_ldemul(n32)
 }
-if $has_n64abi {
+if $has_abi(n64) {
     lappend abis n64 "-64 -march=mips3" $abi_ldemul(n64)
 }
 set relocs { copyreloc nocopyreloc }
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.