[to-be-committed,1/6] MIPS/Haiku/LD/testsuite: Set the correct emulation and flags

Message ID alpine.DEB.2.21.2604021747590.29980@angie.orcam.me.uk
State Accepted
Headers
Series Haiku/testsuite: Enable ELF tests |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_binutils_check--master-arm success Test passed
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 success Test passed

Commit Message

Maciej W. Rozycki April 3, 2026, 1:16 p.m. UTC
  The Haiku target has its own LD emulation and uses the IRIX ELF variant.
---
 ld/testsuite/ld-mips-elf/comm-data.exp |    2 ++
 ld/testsuite/ld-mips-elf/mips-elf.exp  |    1 +
 2 files changed, 3 insertions(+)

binutils-mips-ld-haiku-test-emulation.diff
  

Patch

Index: binutils-gdb/ld/testsuite/ld-mips-elf/comm-data.exp
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/comm-data.exp
+++ binutils-gdb/ld/testsuite/ld-mips-elf/comm-data.exp
@@ -93,6 +93,8 @@  if {[istarget *-img-elf*] \
     } else {
 	set abi_ldemul(o32) elf32ebmip
     }
+} elseif { [istarget *-*-haiku*] } {
+    set abi_ldemul(o32) elf_mipsel_haiku
 } else {
     if [istarget *el-*-*] {
 	set abi_ldemul(o32) elf32lsmip
Index: binutils-gdb/ld/testsuite/ld-mips-elf/mips-elf.exp
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/mips-elf.exp
+++ binutils-gdb/ld/testsuite/ld-mips-elf/mips-elf.exp
@@ -260,6 +260,7 @@  if {[istarget *-*-openbsd*] } {
     set abi_ldflags(o32) -melf32lr5900
     set irixemul 1
 } elseif { [istarget *-*-elf*] \
+	   || [istarget *-*-haiku*] \
 	   || [istarget *-*-rtems*] } {
     set abi_asflags(o32) -32
     set irixemul 1