This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: Building syscall.h on mips
On Wed, 2012-05-23 at 00:06 +0000, Joseph S. Myers wrote:
> On Tue, 22 May 2012, Steve Ellcey wrote:
>
> > Ok, I think I have it now. With these -D flags, I get similar but not
> > identical sets for the three ifdef's. I would have liked to use
> > _MIPS_SIM_ABI32, etc in the -D instead of 1,2,3 but that did not seem to
> > work.
> >
> > How does this patch look?
>
> It looks good but appears to have a line wrapped so it doesn't apply
> cleanly - could you send a patch with whitespace preserved, and a
> ChangeLog entry to go in ChangeLog.mips?
Here is a ChangeLog Entry:
2012-05-23 Steve Ellcey <sellcey@mips.com>
* sysdeps/unix/sysv/linux/mips/Makefile: Modify
syscall-list-*-options to use -D flags.
And here is the (hopefully unwrapped) diff:
diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile
index 41e9258..2aaf63c 100644
--- a/sysdeps/unix/sysv/linux/mips/Makefile
+++ b/sysdeps/unix/sysv/linux/mips/Makefile
@@ -7,13 +7,14 @@ sysdep_routines += cachectl cacheflush sysmips _test_and_set
sysdep_headers += sys/cachectl.h sys/sysmips.h sys/tas.h
+# _MIPS_SIM_ABI32 == 1, _MIPS_SIM_ABIN32 == 2, _MIPS_SIM_ABI64 == 3
syscall-list-variants := o32 n32 n64
syscall-list-includes := sgidefs.h
-syscall-list-o32-options := -mabi=32
+syscall-list-o32-options := -D_MIPS_SIM=1
syscall-list-o32-condition := _MIPS_SIM == _MIPS_SIM_ABI32
-syscall-list-n32-options := -mabi=n32
+syscall-list-n32-options := -D_MIPS_SIM=2
syscall-list-n32-condition := _MIPS_SIM == _MIPS_SIM_ABIN32
-syscall-list-n64-options := -mabi=64
+syscall-list-n64-options := -D_MIPS_SIM=3
syscall-list-n64-condition := _MIPS_SIM == _MIPS_SIM_ABI64
endif