1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/glibc/2.3.2/glibc-drow-sh.patch Sun May 27 21:15:46 2007 +0000
1.3 @@ -0,0 +1,77 @@
1.4 +[pread changes deleted, since those seem to be specific to glibc-2.3.2]
1.5 +
1.6 +Date: Thu, 19 Jun 2003 20:02:07 -0400
1.7 +From: Daniel Jacobowitz <drow@false.org>
1.8 +Subject: [linux-sh:02808] Patch needed for CVS glibc on SH
1.9 +To: linux-sh@m17n.org, libc-alpha@sources.redhat.com
1.10 +Message-Id: <20030620000207.GA19907@nevyn.them.org>
1.11 +X-ML-Name: linux-sh
1.12 +X-Mail-Count: 02808
1.13 +X-MLServer: fml [fml 4.0.1]; post only (only members can post)
1.14 +X-ML-Info: If you have a question, send e-mail with the body
1.15 + "help" (without quotes) to the address linux-sh-ctl@m17n.org;
1.16 + help=<mailto:linux-sh-ctl@m17n.org?body=help>
1.17 +Mail-Followup-To: linux-sh@m17n.org, libc-alpha@sources.redhat.com
1.18 +Content-Disposition: inline
1.19 +User-Agent: Mutt/1.5.1i
1.20 +Mime-Version: 1.0
1.21 +Content-Type: text/plain; charset=us-ascii
1.22 +Precedence: bulk
1.23 +Lines: 74
1.24 +List-Software: fml [fml 4.0.1]
1.25 +List-Post: <mailto:linux-sh@m17n.org>
1.26 +List-Owner: <mailto:linux-sh-admin@m17n.org>
1.27 +List-Help: <mailto:linux-sh-ctl@m17n.org?body=help>
1.28 +List-Unsubscribe: <mailto:linux-sh-ctl@m17n.org?body=unsubscribe>
1.29 +List-Id: linux-sh.m17n.org
1.30 +
1.31 +I believe this flushes my current patches to make glibc work on SH. Issues:
1.32 + - MIPS pread functions have some wackiness in them for the MIPS calling
1.33 + conventions, which align long longs to even register pairs; it appears
1.34 + that SH does not do this. This fixes pread64/pwrite64.
1.35 + - st_ino is _NOT_ 64-bit in the latest SH kernel trees, or at least it
1.36 + wasn't when I checked in April. --enable-kernel=2.4.x breaks terribly
1.37 + without this patch; the errors are along the lines of "version GLIBC_2.3
1.38 + not found", because that's the first consequence of a messed up inode
1.39 + field - ld.so compares by inodes at some point.
1.40 +
1.41 +--
1.42 +Daniel Jacobowitz
1.43 +MontaVista Software Debian GNU/Linux Developer
1.44 +
1.45 +2003-06-19 Daniel Jacobowitz <drow@mvista.com>
1.46 +
1.47 + * sysdeps/unix/sysv/linux/kernel-features.h: Update kernel features
1.48 + for the SH architecture.
1.49 + * sysdeps/unix/sysv/linux/sh/pread.c: Use generic Linux version
1.50 + instead of the MIPS version.
1.51 + * sysdeps/unix/sysv/linux/sh/pread64.c: Likewise.
1.52 + * sysdeps/unix/sysv/linux/sh/pwrite.c: Likewise.
1.53 + * sysdeps/unix/sysv/linux/sh/pwrite64.c: Likewise.
1.54 +
1.55 +--- glibc-2.3.2/sysdeps/unix/sysv/linux/kernel-features.h.org 2003-04-21 10:57:55.000000000 -0400
1.56 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/kernel-features.h 2003-04-21 11:16:47.000000000 -0400
1.57 +@@ -151,11 +151,20 @@
1.58 +
1.59 + /* The changed st_ino field appeared in 2.4.0-test6. But we cannot
1.60 + distinguish this version from other 2.4.0 releases. Therefore play
1.61 +- save and assume it available is for 2.4.1 and up. */
1.62 +-#if __LINUX_KERNEL_VERSION >= 132097
1.63 ++ save and assume it available is for 2.4.1 and up. However, SH is lame,
1.64 ++ and still does not have a 64-bit inode field. */
1.65 ++#if __LINUX_KERNEL_VERSION >= 132097 \
1.66 ++ && !defined __sh__
1.67 + # define __ASSUME_ST_INO_64_BIT 1
1.68 + #endif
1.69 +
1.70 ++/* SH kernels got stat64, mmap2, and truncate64 during 2.4.0-test. */
1.71 ++#if __LINUX_KERNEL_VERSION >= 132096 && defined __sh__
1.72 ++# define __ASSUME_TRUNCATE64_SYSCALL 1
1.73 ++# define __ASSUME_MMAP2_SYSCALL 1
1.74 ++# define __ASSUME_STAT64_SYSCALL 1
1.75 ++#endif
1.76 ++
1.77 + /* To support locking of large files a new fcntl() syscall was introduced
1.78 + in 2.4.0-test7. We test for 2.4.1 for the earliest version we know
1.79 + the syscall is available. */
1.80 +