yann@1
|
1 |
[pread changes deleted, since those seem to be specific to glibc-2.3.2]
|
yann@1
|
2 |
|
yann@1
|
3 |
Date: Thu, 19 Jun 2003 20:02:07 -0400
|
yann@1
|
4 |
From: Daniel Jacobowitz <drow@false.org>
|
yann@1
|
5 |
Subject: [linux-sh:02808] Patch needed for CVS glibc on SH
|
yann@1
|
6 |
To: linux-sh@m17n.org, libc-alpha@sources.redhat.com
|
yann@1
|
7 |
Message-Id: <20030620000207.GA19907@nevyn.them.org>
|
yann@1
|
8 |
X-ML-Name: linux-sh
|
yann@1
|
9 |
X-Mail-Count: 02808
|
yann@1
|
10 |
X-MLServer: fml [fml 4.0.1]; post only (only members can post)
|
yann@1
|
11 |
X-ML-Info: If you have a question, send e-mail with the body
|
yann@1
|
12 |
"help" (without quotes) to the address linux-sh-ctl@m17n.org;
|
yann@1
|
13 |
help=<mailto:linux-sh-ctl@m17n.org?body=help>
|
yann@1
|
14 |
Mail-Followup-To: linux-sh@m17n.org, libc-alpha@sources.redhat.com
|
yann@1
|
15 |
Content-Disposition: inline
|
yann@1
|
16 |
User-Agent: Mutt/1.5.1i
|
yann@1
|
17 |
Mime-Version: 1.0
|
yann@1
|
18 |
Content-Type: text/plain; charset=us-ascii
|
yann@1
|
19 |
Precedence: bulk
|
yann@1
|
20 |
Lines: 74
|
yann@1
|
21 |
List-Software: fml [fml 4.0.1]
|
yann@1
|
22 |
List-Post: <mailto:linux-sh@m17n.org>
|
yann@1
|
23 |
List-Owner: <mailto:linux-sh-admin@m17n.org>
|
yann@1
|
24 |
List-Help: <mailto:linux-sh-ctl@m17n.org?body=help>
|
yann@1
|
25 |
List-Unsubscribe: <mailto:linux-sh-ctl@m17n.org?body=unsubscribe>
|
yann@1
|
26 |
List-Id: linux-sh.m17n.org
|
yann@1
|
27 |
|
yann@1
|
28 |
I believe this flushes my current patches to make glibc work on SH. Issues:
|
yann@1
|
29 |
- MIPS pread functions have some wackiness in them for the MIPS calling
|
yann@1
|
30 |
conventions, which align long longs to even register pairs; it appears
|
yann@1
|
31 |
that SH does not do this. This fixes pread64/pwrite64.
|
yann@1
|
32 |
- st_ino is _NOT_ 64-bit in the latest SH kernel trees, or at least it
|
yann@1
|
33 |
wasn't when I checked in April. --enable-kernel=2.4.x breaks terribly
|
yann@1
|
34 |
without this patch; the errors are along the lines of "version GLIBC_2.3
|
yann@1
|
35 |
not found", because that's the first consequence of a messed up inode
|
yann@1
|
36 |
field - ld.so compares by inodes at some point.
|
yann@1
|
37 |
|
yann@1
|
38 |
--
|
yann@1
|
39 |
Daniel Jacobowitz
|
yann@1
|
40 |
MontaVista Software Debian GNU/Linux Developer
|
yann@1
|
41 |
|
yann@1
|
42 |
2003-06-19 Daniel Jacobowitz <drow@mvista.com>
|
yann@1
|
43 |
|
yann@1
|
44 |
* sysdeps/unix/sysv/linux/kernel-features.h: Update kernel features
|
yann@1
|
45 |
for the SH architecture.
|
yann@1
|
46 |
* sysdeps/unix/sysv/linux/sh/pread.c: Use generic Linux version
|
yann@1
|
47 |
instead of the MIPS version.
|
yann@1
|
48 |
* sysdeps/unix/sysv/linux/sh/pread64.c: Likewise.
|
yann@1
|
49 |
* sysdeps/unix/sysv/linux/sh/pwrite.c: Likewise.
|
yann@1
|
50 |
* sysdeps/unix/sysv/linux/sh/pwrite64.c: Likewise.
|
yann@1
|
51 |
|
yann@1
|
52 |
--- glibc-2.3.2/sysdeps/unix/sysv/linux/kernel-features.h.org 2003-04-21 10:57:55.000000000 -0400
|
yann@1
|
53 |
+++ glibc-2.3.2/sysdeps/unix/sysv/linux/kernel-features.h 2003-04-21 11:16:47.000000000 -0400
|
yann@1
|
54 |
@@ -151,11 +151,20 @@
|
yann@1
|
55 |
|
yann@1
|
56 |
/* The changed st_ino field appeared in 2.4.0-test6. But we cannot
|
yann@1
|
57 |
distinguish this version from other 2.4.0 releases. Therefore play
|
yann@1
|
58 |
- save and assume it available is for 2.4.1 and up. */
|
yann@1
|
59 |
-#if __LINUX_KERNEL_VERSION >= 132097
|
yann@1
|
60 |
+ save and assume it available is for 2.4.1 and up. However, SH is lame,
|
yann@1
|
61 |
+ and still does not have a 64-bit inode field. */
|
yann@1
|
62 |
+#if __LINUX_KERNEL_VERSION >= 132097 \
|
yann@1
|
63 |
+ && !defined __sh__
|
yann@1
|
64 |
# define __ASSUME_ST_INO_64_BIT 1
|
yann@1
|
65 |
#endif
|
yann@1
|
66 |
|
yann@1
|
67 |
+/* SH kernels got stat64, mmap2, and truncate64 during 2.4.0-test. */
|
yann@1
|
68 |
+#if __LINUX_KERNEL_VERSION >= 132096 && defined __sh__
|
yann@1
|
69 |
+# define __ASSUME_TRUNCATE64_SYSCALL 1
|
yann@1
|
70 |
+# define __ASSUME_MMAP2_SYSCALL 1
|
yann@1
|
71 |
+# define __ASSUME_STAT64_SYSCALL 1
|
yann@1
|
72 |
+#endif
|
yann@1
|
73 |
+
|
yann@1
|
74 |
/* To support locking of large files a new fcntl() syscall was introduced
|
yann@1
|
75 |
in 2.4.0-test7. We test for 2.4.1 for the earliest version we know
|
yann@1
|
76 |
the syscall is available. */
|
yann@1
|
77 |
|