Patchwork Lost __mips_o32 predefine on NetBSD

login
register
mail settings
Submitter Martin Husemann
Date March 28, 2014, 6:54 p.m.
Message ID <20140328185445.GA8945@mail.duskware.de>
Download mbox | patch
Permalink /patch/334858/
State New
Headers show

Comments

Martin Husemann - March 28, 2014, 6:54 p.m.
In the mips--netbsdelf target gcc 4.9 lost the pre-definition of
__mips_o32, which is heavily used in NetBSD sources.

The obvious trivial patch adds it back.

Martin

--8-<--
Define __mips_o32 for -mabi=32
Richard Sandiford - March 31, 2014, 7:35 p.m.
Martin Husemann <martin@duskware.de> writes:
> In the mips--netbsdelf target gcc 4.9 lost the pre-definition of
> __mips_o32, which is heavily used in NetBSD sources.
>
> The obvious trivial patch adds it back.

Are you sure it was ever in FSF GCC?  I went through every revision
of netbsd.h in git and couldn't see it.

I can go ahead and apply the patch anyway if it's the right thing to do.
Just wanted to make sure I wasn't missing something.

Thanks,
Richard
Martin Husemann - March 31, 2014, 7:51 p.m.
On Mon, Mar 31, 2014 at 08:35:30PM +0100, Richard Sandiford wrote:
> Are you sure it was ever in FSF GCC?  I went through every revision
> of netbsd.h in git and couldn't see it.

No, I'm not - guess I never tried a pure gcc on mips.

> I can go ahead and apply the patch anyway if it's the right thing to do.
> Just wanted to make sure I wasn't missing something.

Matt Thomas should be the authority on this. This was one of the very
few changes I needed so far for NetBSD/playstation2 (the others all in
bugzilla already).

Matt?

Martin
Richard Sandiford - April 1, 2014, 10:41 a.m.
Martin Husemann <martin@duskware.de> writes:
> On Mon, Mar 31, 2014 at 08:35:30PM +0100, Richard Sandiford wrote:
>> Are you sure it was ever in FSF GCC?  I went through every revision
>> of netbsd.h in git and couldn't see it.
>
> No, I'm not - guess I never tried a pure gcc on mips.
>
>> I can go ahead and apply the patch anyway if it's the right thing to do.
>> Just wanted to make sure I wasn't missing something.
>
> Matt Thomas should be the authority on this. This was one of the very
> few changes I needed so far for NetBSD/playstation2 (the others all in
> bugzilla already).

OK, in that case I went ahead and applied it.  Thanks for the patch.

Richard

Patch

--- gcc/config/mips/netbsd.h.orig	2014-01-02 23:23:26.000000000 +0100
+++ gcc/config/mips/netbsd.h	2014-03-28 14:19:18.000000000 +0100
@@ -32,7 +32,9 @@  along with GCC; see the file COPYING3.  
       if (TARGET_ABICALLS)				\
 	builtin_define ("__ABICALLS__");		\
 							\
-      if (mips_abi == ABI_EABI)				\
+      if (mips_abi == ABI_32)				\
+	builtin_define ("__mips_o32");			\
+      else if (mips_abi == ABI_EABI)			\
 	builtin_define ("__mips_eabi");			\
       else if (mips_abi == ABI_N32)			\
 	builtin_define ("__mips_n32");			\