This is the mail archive of the mailing list for the libc-ports 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]

Re: Miscellaneous ColdFire patches

On Fri, 28 Jun 2013, Andreas Schwab wrote:

> "Joseph S. Myers" <> writes:
> > 2013-06-28  Joseph Myers  <>
> >
> > 	* sysdeps/unix/sysv/linux/m68k/kernel-features.h [__mcoldfire__]
> > 	(MMAP2_PAGE_SHIFT): Define to -1.
> kernel-features.h is the wrong place to define this (mmap64.c should
> actually no longer include it).  You should create a mmap64.c that
> defines MMAP2_PAGE_SHIFT and then falls through to the real
> implementation.  Also, this is an issue for sun3 as well, so it needs to
> be defined for all m68k variants.
> Finally, you need to fix sysdeps/unix/sysv/linux/mmap64.c so that it
> doesn't shift by -1.
> (Looks like cris and microblaze have the same bug.)

This patch (untested) creates a new file and enables the change for
all m68k configurations.  I've sent the fix to
sysdeps/unix/sysv/linux/mmap64.c to libc-alpha and filed bug 15705 for
the MicroBlaze issue (the CRIS port of glibc having been removed as
bitrotten some time ago).

2013-06-28  Joseph Myers  <>

	* sysdeps/unix/sysv/linux/m68k/mmap64.c: New file.

diff --git a/ports/sysdeps/unix/sysv/linux/m68k/mmap64.c b/ports/sysdeps/unix/sysv/linux/m68k/mmap64.c
new file mode 100644
index 0000000..8bf8987
--- /dev/null
+++ b/ports/sysdeps/unix/sysv/linux/m68k/mmap64.c
@@ -0,0 +1,5 @@
+/* ColdFire and Sun 3 kernels have PAGE_SHIFT set to 13 and expect
+   mmap2 offset to be provided in 8K pages.  Determine the shift
+   dynamically with getpagesize.  */
+#define MMAP2_PAGE_SHIFT -1
+#include <sysdeps/unix/sysv/linux/mmap64.c>

Joseph S. Myers

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