This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] MIPS/LD: Add OpenBSD/mips64 support


Complement commit 26eebcf553d7 ("Update OpenBSD/mips64 support"), 
<https://sourceware.org/ml/binutils/2005-04/msg00382.html>, which added 
OpenBSD/mips64 support to GAS, and also add it to LD, avoiding a build 
failure at the configuration stage, like:

*** ld does not support target mips64-unknown-openbsd
*** see ld/configure.tgt for supported targets
make[1]: *** [configure-ld] Error 1

As per OS support only include n64 MIPS emulations, and use the 
traditional ones, matching the choice already made with the addition of 
GAS support.

	ld/
	* configure.tgt <mips64el-*-openbsd*, mips64-*-openbsd*>: New 
	targets.
---
Mark,

 Please confirm or deny if this is indeed the right choice for OpenBSD, as 
I have no experience with that system.

 The rationale for this patch is my desire, as the MIPS target maintainer, 
to have test coverage for a MIPS target that defaults to the n64 ABI, so 
that I can detect any regressions triggering for that ABI only and which 
are only covered by tests that use the default ABI, generally ones that 
are not MIPS-specific.  I have looked through MIPS configurations we have 
recorded and figured out the OpenBSD target is the only one that defaults 
to n64, however, for a reason unknown to me, one whose configuration has 
been missing from LD.  And I have decided it makes more sense to use a 
real target for my purpose rather than inventing an artificial one.

 I have been using this patch for my testing with `mips64-openbsd' and 
`mips64el-openbsd' targets for many months now and I think there's little 
point to keep it local, while the current situation complicates my patch 
maintenance.  Testing with the n64 ABI being the GAS default or with o32 
emulations missing from LD currently triggers many failures, because the 
test framework is not prepared for such a configuration and assumes o32 or 
n32 being the default ABI and an o32 emulation to be always present.  
These are of course deficiencies in the test framework and not this change 
or OpenBSD target support.  I have plans to gradually address these 
issues, but meanwhile there is of course no requirement for anyone to run 
such testing if they would find the results disturbing.

 I'm going to wait a little and unless you or someone else objects, I'll 
commit this change.  You can speed it up of course, by giving an ack.

  Maciej

binutils-mips-ld-openbsd.diff
Index: binutils/ld/configure.tgt
===================================================================
--- binutils.orig/ld/configure.tgt	2017-06-06 00:41:25.374720143 +0100
+++ binutils/ld/configure.tgt	2017-06-06 00:42:47.008770229 +0100
@@ -504,6 +504,12 @@ mips*el-*-netbsd*)	targ_emul=elf32ltsmip
 mips*-*-netbsd*)	targ_emul=elf32btsmip
 			targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip"
   			;;
+mips64el-*-openbsd*)	targ_emul=elf64ltsmip
+			targ_extra_emuls=elf64btsmip
+			;;
+mips64-*-openbsd*)	targ_emul=elf64btsmip
+			targ_extra_emuls=elf64ltsmip
+  			;;
 mips*vr4300el-*-elf*)	targ_emul=elf32l4300 ;;
 mips*vr4300-*-elf*)	targ_emul=elf32b4300 ;;
 mips*vr4100el-*-elf*)	targ_emul=elf32l4300 ;;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]