This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
[PATCH] Enable __WORDSIZE_COMPAT32 for mips.
- From: Carlos O'Donell <carlos at codesourcery dot com>
- To: libc-ports at sourceware dot org
- Cc: Daniel Jacobowitz <dan at codesourcery dot com>
- Date: Thu, 12 Jul 2007 14:50:11 -0400
- Subject: [PATCH] Enable __WORDSIZE_COMPAT32 for mips.
Dan,
When compiling glibc with -mabi=64 (_MIPS_SIM == _ABI64, _MIPS_SZPTR ==
64), the size of:
sysdeps/gnu/bits/utmpx.h (struct utmp, struct lastlog)
sysdeps/gnu/bits/utmp.h (struct utmpx)
must be the same as when compiled with -mabi=32 such that n32 and 64
processes may share the same datafiles. This compatibility is enabled by
setting __WORDSIZE_COMPAT32 to 1.
I applied the patch below to ports, rebuilt the toolchain, and used the
new toolchain to build an n64 coreutils. The new n64 coreutils correctly
reads n32 generated utmp entries.
The old format n64 utmp entries are not compatible. This is an ABI break
for struct utmp, utmpx and lastlog.
Please apply.
Cheers,
Carlos.
2007-07-12 Carlos O'Donell <carlos@codesourcery.com>
* sysdeps/mips/bits/wordsize.h [_MIPS_SIM == _ABI64]:
Define __WORDSIZE_COMPAT32 as 1.
Index: sysdeps/mips/bits/wordsize.h
===================================================================
--- sysdeps/mips/bits/wordsize.h (revision 176325)
+++ sysdeps/mips/bits/wordsize.h (working copy)
@@ -17,3 +17,6 @@
02111-1307 USA. */
#define __WORDSIZE _MIPS_SZPTR
+#if _MIPS_SIM == _ABI64
+# define __WORDSIZE_COMPAT32 1
+#endif