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

Maciej W. Rozycki macro@orcam.me.uk
Fri Apr 3 13:16:03 GMT 2026


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
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


More information about the Binutils mailing list