summaryrefslogtreecommitdiffstats
path: root/meta/packages/glibc
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-12-20 12:07:48 +0000
committerRichard Purdie <richard@openedhand.com>2006-12-20 12:07:48 +0000
commit1292db8782c761fef640b09eef22bcef505985cb (patch)
tree42cb2393e5fd1d10fb1b7a07ca28543b9852b111 /meta/packages/glibc
parente46b2474872492e0e92d6bb43d6d1bda33057c06 (diff)
downloadpoky-1292db8782c761fef640b09eef22bcef505985cb.tar.gz
glibc: Update patches
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1062 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/glibc')
-rw-r--r--meta/packages/glibc/glibc-2.4/arm_eabi_ipc_fix.patch94
-rw-r--r--meta/packages/glibc/glibc-2.4/glibc-check_pf.patch343
-rw-r--r--meta/packages/glibc/glibc-2.4/powerpc-sqrt-hack.diff25
3 files changed, 462 insertions, 0 deletions
diff --git a/meta/packages/glibc/glibc-2.4/arm_eabi_ipc_fix.patch b/meta/packages/glibc/glibc-2.4/arm_eabi_ipc_fix.patch
new file mode 100644
index 0000000000..8b36960b04
--- /dev/null
+++ b/meta/packages/glibc/glibc-2.4/arm_eabi_ipc_fix.patch
@@ -0,0 +1,94 @@
1From libc-ports-return-430-listarch-libc-ports=sources dot redhat dot com at sourceware dot org Mon Aug 21 20:08:57 2006
2Return-Path: <libc-ports-return-430-listarch-libc-ports=sources dot redhat dot com at sourceware dot org>
3Delivered-To: listarch-libc-ports at sources dot redhat dot com
4Received: (qmail 9913 invoked by alias); 21 Aug 2006 20:08:56 -0000
5Received: (qmail 9893 invoked by uid 22791); 21 Aug 2006 20:08:53 -0000
6X-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,TW_HM,TW_SG,TW_SN
7X-Spam-Check-By: sourceware.org
8Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Mon, 21 Aug 2006 20:08:44 +0000
9Received: from drow by nevyn.them.org with local (Exim 4.54) id 1GFG4f-0007gO-TW for libc-ports@sourceware.org; Mon, 21 Aug 2006 16:08:42 -0400
10Date: Mon, 21 Aug 2006 16:08:41 -0400
11From: Daniel Jacobowitz <drow at false dot org>
12To: libc-ports at sourceware dot org
13Subject: ARM IPC fix
14Message-ID: <20060821200841.GA29502@nevyn.them.org>
15MIME-Version: 1.0
16Content-Type: text/plain; charset=us-ascii
17Content-Disposition: inline
18User-Agent: Mutt/1.5.11+cvs20060403
19X-IsSubscribed: yes
20Mailing-List: contact libc-ports-help at sourceware dot org; run by ezmlm
21Precedence: bulk
22List-Subscribe: <mailto:libc-ports-subscribe at sourceware dot org>
23List-Post: <mailto:libc-ports at sourceware dot org>
24List-Help: <mailto:libc-ports-help at sourceware dot org>, <http://sourceware dot org/lists dot html#faqs>
25Sender: libc-ports-owner at sourceware dot org
26Delivered-To: mailing list libc-ports at sourceware dot org
27
28We can't treat msgctl as a real syscall; if we don't add __IPC_64, we'll get
29a mismatched type for ipc_perm. Fixed by using the Alpha implementation,
30which is similar to the standard i386 implementation but doesn't use
31the multiplexer syscall.
32
33--
34Daniel Jacobowitz
35CodeSourcery
36
372006-08-21 Daniel Jacobowitz <dan@codesourcery.com>
38
39 * sysdeps/unix/sysv/linux/arm/eabi/syscalls.list: Remove msgctl,
40 shmctl, and semctl.
41 * sysdeps/unix/sysv/linux/arm/eabi/semctl.c,
42 sysdeps/unix/sysv/linux/arm/eabi/shmctl.c,
43 sysdeps/unix/sysv/linux/arm/eabi/msgctl.c: New files.
44
45Index: a/ports/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list
46===================================================================
47--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list (revision 147209)
48+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list (working copy)
49@@ -1,18 +1,16 @@
50 # File name Caller Syscall name # args Strong name Weak names
51
52-# semaphore and shm system calls
53-msgctl - msgctl i:iip __msgctl msgctl
54+# Semaphore and shm system calls. msgctl, shmctl, and semctl have C
55+# wrappers (to set __IPC_64).
56 msgget - msgget i:ii __msgget msgget
57 msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv
58 msgsnd - msgsnd Ci:ibni __msgsnd msgsnd
59 shmat - shmat i:ipi __shmat shmat
60-shmctl - shmctl i:iip __shmctl shmctl
61 shmdt - shmdt i:s __shmdt shmdt
62 shmget - shmget i:iii __shmget shmget
63 semop - semop i:ipi __semop semop
64 semtimedop - semtimedop i:ipip semtimedop
65 semget - semget i:iii __semget semget
66-semctl - semctl i:iiii __semctl semctl
67
68 # proper socket implementations:
69 accept - accept Ci:iBN __libc_accept __accept accept
70
71Property changes on: sysdeps/unix/sysv/linux/arm/eabi/syscalls.list
72___________________________________________________________________
73Name: svn:mime-type
74 - application/octet-stream
75
76Index: a/ports/sysdeps/unix/sysv/linux/arm/eabi/semctl.c
77===================================================================
78--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/semctl.c (revision 0)
79+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/semctl.c (revision 0)
80@@ -0,0 +1 @@
81+#include <sysdeps/unix/sysv/linux/alpha/semctl.c>
82Index: a/ports/sysdeps/unix/sysv/linux/arm/eabi/msgctl.c
83===================================================================
84--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/msgctl.c (revision 0)
85+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/msgctl.c (revision 0)
86@@ -0,0 +1 @@
87+#include <sysdeps/unix/sysv/linux/alpha/msgctl.c>
88Index: a/ports/sysdeps/unix/sysv/linux/arm/eabi/shmctl.c
89===================================================================
90--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/shmctl.c (revision 0)
91+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/shmctl.c (revision 0)
92@@ -0,0 +1 @@
93+#include <sysdeps/unix/sysv/linux/alpha/shmctl.c>
94
diff --git a/meta/packages/glibc/glibc-2.4/glibc-check_pf.patch b/meta/packages/glibc/glibc-2.4/glibc-check_pf.patch
new file mode 100644
index 0000000000..3cff6bbcfa
--- /dev/null
+++ b/meta/packages/glibc/glibc-2.4/glibc-check_pf.patch
@@ -0,0 +1,343 @@
1From libc-ports-return-550-listarch-libc-ports=sources dot redhat dot com at sourceware dot org Tue Oct 31 17:37:21 2006
2Return-Path: <libc-ports-return-550-listarch-libc-ports=sources dot redhat dot com at sourceware dot org>
3Delivered-To: listarch-libc-ports at sources dot redhat dot com
4Received: (qmail 17273 invoked by alias); 31 Oct 2006 17:37:20 -0000
5Received: (qmail 17262 invoked by uid 22791); 31 Oct 2006 17:37:19 -0000
6X-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,TW_CP
7X-Spam-Check-By: sourceware.org
8Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Tue, 31 Oct 2006 17:37:11 +0000
9Received: from drow by nevyn.them.org with local (Exim 4.54) id 1GexXw-0007Dj-30; Tue, 31 Oct 2006 12:37:08 -0500
10Date: Tue, 31 Oct 2006 12:37:08 -0500
11From: Daniel Jacobowitz <drow at false dot org>
12To: Mike Frysinger <vapier at gentoo dot org>
13Cc: libc-ports at sourceware dot org, Philip Balister <philip dot balister at gmail dot com>
14Subject: Re: Problem with glibc-2.5 on ARM
15Message-ID: <20061031173708.GJ20468@nevyn.them.org>
16References: <499146270610241149ibe030e0nd9d6b177a95b346e@mail.gmail.com> <499146270610241254u7cadf63ej2edf05cedbc5266f@mail.gmail.com> <20061024195837.GA20181@nevyn.them.org> <200610291954.27022.vapier@gentoo.org>
17MIME-Version: 1.0
18Content-Type: text/plain; charset=us-ascii
19Content-Disposition: inline
20In-Reply-To: <200610291954 dot 27022 dot vapier at gentoo dot org>
21User-Agent: Mutt/1.5.13 (2006-08-11)
22X-IsSubscribed: yes
23Mailing-List: contact libc-ports-help at sourceware dot org; run by ezmlm
24Precedence: bulk
25List-Subscribe: <mailto:libc-ports-subscribe at sourceware dot org>
26List-Post: <mailto:libc-ports at sourceware dot org>
27List-Help: <mailto:libc-ports-help at sourceware dot org>, <http://sourceware dot org/lists dot html#faqs>
28Sender: libc-ports-owner at sourceware dot org
29Delivered-To: mailing list libc-ports at sourceware dot org
30
31On Sun, Oct 29, 2006 at 07:54:25PM -0500, Mike Frysinger wrote:
32> On Tuesday 24 October 2006 15:58, Daniel Jacobowitz wrote:
33> > ARM is going to need a slightly different version of that file, I
34> > guess.
35>
36> would declaring req with attribute packed not help ?
37> -mike
38
39Nope. "struct rtgenmsg" would still have size 4.
40
41Philip, are you still at all interested in this for the old ABI?
42I don't have time to test this patch right now, but I think it
43will work.
44
45--
46Daniel Jacobowitz
47CodeSourcery
48
492006-10-31 Daniel Jacobowitz <dan@codesourcery.com>
50
51 * sysdeps/unix/sysv/linux/arm/check_pf.c: New file.
52 * sysdeps/unix/sysv/linux/arm/eabi/check_pf.c: New file.
53
54Index: sysdeps/unix/sysv/linux/arm/check_pf.c
55===================================================================
56RCS file: sysdeps/unix/sysv/linux/arm/check_pf.c
57diff -N sysdeps/unix/sysv/linux/arm/check_pf.c
58--- /dev/null 1 Jan 1970 00:00:00 -0000
59+++ sysdeps/unix/sysv/linux/arm/check_pf.c 31 Oct 2006 17:29:58 -0000
60@@ -0,0 +1,274 @@
61+/* Determine protocol families for which interfaces exist. ARM Linux version.
62+ Copyright (C) 2003, 2006 Free Software Foundation, Inc.
63+ This file is part of the GNU C Library.
64+
65+ The GNU C Library is free software; you can redistribute it and/or
66+ modify it under the terms of the GNU Lesser General Public
67+ License as published by the Free Software Foundation; either
68+ version 2.1 of the License, or (at your option) any later version.
69+
70+ The GNU C Library is distributed in the hope that it will be useful,
71+ but WITHOUT ANY WARRANTY; without even the implied warranty of
72+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
73+ Lesser General Public License for more details.
74+
75+ You should have received a copy of the GNU Lesser General Public
76+ License along with the GNU C Library; if not, write to the Free
77+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
78+ 02111-1307 USA. */
79+
80+#include <assert.h>
81+#include <errno.h>
82+#include <ifaddrs.h>
83+#include <netdb.h>
84+#include <stddef.h>
85+#include <string.h>
86+#include <time.h>
87+#include <unistd.h>
88+#include <sys/socket.h>
89+
90+#include <asm/types.h>
91+#include <linux/netlink.h>
92+#include <linux/rtnetlink.h>
93+
94+#include <not-cancel.h>
95+#include <kernel-features.h>
96+
97+
98+#ifndef IFA_F_TEMPORARY
99+# define IFA_F_TEMPORARY IFA_F_SECONDARY
100+#endif
101+#ifndef IFA_F_HOMEADDRESS
102+# define IFA_F_HOMEADDRESS 0
103+#endif
104+
105+
106+static int
107+make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6,
108+ struct in6addrinfo **in6ai, size_t *in6ailen)
109+{
110+ struct req
111+ {
112+ struct nlmsghdr nlh;
113+ struct rtgenmsg g;
114+ } req;
115+ struct sockaddr_nl nladdr;
116+
117+ /* struct rtgenmsg consists of a single byte but the ARM ABI rounds
118+ it up to a word. Clear the padding explicitly here. */
119+ assert (sizeof (req.g) == 4);
120+ memset (&req.g, '\0', sizeof (req.g));
121+
122+ req.nlh.nlmsg_len = sizeof (req);
123+ req.nlh.nlmsg_type = RTM_GETADDR;
124+ req.nlh.nlmsg_flags = NLM_F_ROOT | NLM_F_MATCH | NLM_F_REQUEST;
125+ req.nlh.nlmsg_pid = 0;
126+ req.nlh.nlmsg_seq = time (NULL);
127+ req.g.rtgen_family = AF_UNSPEC;
128+
129+ memset (&nladdr, '\0', sizeof (nladdr));
130+ nladdr.nl_family = AF_NETLINK;
131+
132+ if (TEMP_FAILURE_RETRY (__sendto (fd, (void *) &req, sizeof (req), 0,
133+ (struct sockaddr *) &nladdr,
134+ sizeof (nladdr))) < 0)
135+ return -1;
136+
137+ *seen_ipv4 = false;
138+ *seen_ipv6 = false;
139+
140+ bool done = false;
141+ char buf[4096];
142+ struct iovec iov = { buf, sizeof (buf) };
143+ struct in6ailist
144+ {
145+ struct in6addrinfo info;
146+ struct in6ailist *next;
147+ } *in6ailist = NULL;
148+ size_t in6ailistlen = 0;
149+
150+ do
151+ {
152+ struct msghdr msg =
153+ {
154+ (void *) &nladdr, sizeof (nladdr),
155+ &iov, 1,
156+ NULL, 0,
157+ 0
158+ };
159+
160+ ssize_t read_len = TEMP_FAILURE_RETRY (__recvmsg (fd, &msg, 0));
161+ if (read_len < 0)
162+ return -1;
163+
164+ if (msg.msg_flags & MSG_TRUNC)
165+ return -1;
166+
167+ struct nlmsghdr *nlmh;
168+ for (nlmh = (struct nlmsghdr *) buf;
169+ NLMSG_OK (nlmh, (size_t) read_len);
170+ nlmh = (struct nlmsghdr *) NLMSG_NEXT (nlmh, read_len))
171+ {
172+ if (nladdr.nl_pid != 0 || (pid_t) nlmh->nlmsg_pid != pid
173+ || nlmh->nlmsg_seq != req.nlh.nlmsg_seq)
174+ continue;
175+
176+ if (nlmh->nlmsg_type == RTM_NEWADDR)
177+ {
178+ struct ifaddrmsg *ifam = (struct ifaddrmsg *) NLMSG_DATA (nlmh);
179+
180+ switch (ifam->ifa_family)
181+ {
182+ case AF_INET:
183+ *seen_ipv4 = true;
184+ break;
185+ case AF_INET6:
186+ *seen_ipv6 = true;
187+
188+ if (ifam->ifa_flags & (IFA_F_DEPRECATED
189+ | IFA_F_TEMPORARY
190+ | IFA_F_HOMEADDRESS))
191+ {
192+ struct rtattr *rta = IFA_RTA (ifam);
193+ size_t len = (nlmh->nlmsg_len
194+ - NLMSG_LENGTH (sizeof (*ifam)));
195+ void *local = NULL;
196+ void *address = NULL;
197+ while (RTA_OK (rta, len))
198+ {
199+ switch (rta->rta_type)
200+ {
201+ case IFA_LOCAL:
202+ local = RTA_DATA (rta);
203+ break;
204+
205+ case IFA_ADDRESS:
206+ address = RTA_DATA (rta);
207+ break;
208+ }
209+
210+ rta = RTA_NEXT (rta, len);
211+ }
212+
213+ struct in6ailist *newp = alloca (sizeof (*newp));
214+ newp->info.flags = (((ifam->ifa_flags & IFA_F_DEPRECATED)
215+ ? in6ai_deprecated : 0)
216+ | ((ifam->ifa_flags
217+ & IFA_F_TEMPORARY)
218+ ? in6ai_temporary : 0)
219+ | ((ifam->ifa_flags
220+ & IFA_F_HOMEADDRESS)
221+ ? in6ai_homeaddress : 0));
222+ memcpy (newp->info.addr, address ?: local,
223+ sizeof (newp->info.addr));
224+ newp->next = in6ailist;
225+ in6ailist = newp;
226+ ++in6ailistlen;
227+ }
228+ break;
229+ default:
230+ /* Ignore. */
231+ break;
232+ }
233+ }
234+ else if (nlmh->nlmsg_type == NLMSG_DONE)
235+ /* We found the end, leave the loop. */
236+ done = true;
237+ }
238+ }
239+ while (! done);
240+
241+ close_not_cancel_no_status (fd);
242+
243+ if (in6ailist != NULL)
244+ {
245+ *in6ai = malloc (in6ailistlen * sizeof (**in6ai));
246+ if (*in6ai == NULL)
247+ return -1;
248+
249+ *in6ailen = in6ailistlen;
250+
251+ do
252+ {
253+ (*in6ai)[--in6ailistlen] = in6ailist->info;
254+ in6ailist = in6ailist->next;
255+ }
256+ while (in6ailist != NULL);
257+ }
258+
259+ return 0;
260+}
261+
262+
263+/* We don't know if we have NETLINK support compiled in in our
264+ Kernel. */
265+#if __ASSUME_NETLINK_SUPPORT == 0
266+/* Define in ifaddrs.h. */
267+extern int __no_netlink_support attribute_hidden;
268+#else
269+# define __no_netlink_support 0
270+#endif
271+
272+
273+void
274+attribute_hidden
275+__check_pf (bool *seen_ipv4, bool *seen_ipv6,
276+ struct in6addrinfo **in6ai, size_t *in6ailen)
277+{
278+ *in6ai = NULL;
279+ *in6ailen = 0;
280+
281+ if (! __no_netlink_support)
282+ {
283+ int fd = __socket (PF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
284+
285+ struct sockaddr_nl nladdr;
286+ memset (&nladdr, '\0', sizeof (nladdr));
287+ nladdr.nl_family = AF_NETLINK;
288+
289+ socklen_t addr_len = sizeof (nladdr);
290+
291+ if (fd >= 0
292+ && __bind (fd, (struct sockaddr *) &nladdr, sizeof (nladdr)) == 0
293+ && __getsockname (fd, (struct sockaddr *) &nladdr, &addr_len) == 0
294+ && make_request (fd, nladdr.nl_pid, seen_ipv4, seen_ipv6,
295+ in6ai, in6ailen) == 0)
296+ /* It worked. */
297+ return;
298+
299+ if (fd >= 0)
300+ __close (fd);
301+
302+#if __ASSUME_NETLINK_SUPPORT == 0
303+ /* Remember that there is no netlink support. */
304+ __no_netlink_support = 1;
305+#else
306+ /* We cannot determine what interfaces are available. Be
307+ pessimistic. */
308+ *seen_ipv4 = true;
309+ *seen_ipv6 = true;
310+#endif
311+ }
312+
313+#if __ASSUME_NETLINK_SUPPORT == 0
314+ /* No netlink. Get the interface list via getifaddrs. */
315+ struct ifaddrs *ifa = NULL;
316+ if (getifaddrs (&ifa) != 0)
317+ {
318+ /* We cannot determine what interfaces are available. Be
319+ pessimistic. */
320+ *seen_ipv4 = true;
321+ *seen_ipv6 = true;
322+ return;
323+ }
324+
325+ struct ifaddrs *runp;
326+ for (runp = ifa; runp != NULL; runp = runp->ifa_next)
327+ if (runp->ifa_addr->sa_family == PF_INET)
328+ *seen_ipv4 = true;
329+ else if (runp->ifa_addr->sa_family == PF_INET6)
330+ *seen_ipv6 = true;
331+
332+ (void) freeifaddrs (ifa);
333+#endif
334+}
335Index: sysdeps/unix/sysv/linux/arm/eabi/check_pf.c
336===================================================================
337RCS file: sysdeps/unix/sysv/linux/arm/eabi/check_pf.c
338diff -N sysdeps/unix/sysv/linux/arm/eabi/check_pf.c
339--- /dev/null 1 Jan 1970 00:00:00 -0000
340+++ sysdeps/unix/sysv/linux/arm/eabi/check_pf.c 31 Oct 2006 17:29:58 -0000
341@@ -0,0 +1 @@
342+#include <sysdeps/unix/sysv/linux/check_pf.c>
343
diff --git a/meta/packages/glibc/glibc-2.4/powerpc-sqrt-hack.diff b/meta/packages/glibc/glibc-2.4/powerpc-sqrt-hack.diff
new file mode 100644
index 0000000000..1046efb2a1
--- /dev/null
+++ b/meta/packages/glibc/glibc-2.4/powerpc-sqrt-hack.diff
@@ -0,0 +1,25 @@
1diff -Nurd ../glibc-initial-2.5-r4/glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c
2--- ../glibc-initial-2.5-r4/glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c 2006-04-14 07:44:30.000000000 +0200
3+++ glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c 2006-12-08 12:53:32.202227000 +0100
4@@ -25,6 +25,9 @@
5 #include <sysdep.h>
6 #include <ldsodefs.h>
7
8+#define __CPU_HAS_FSQRT ((GLRO(dl_hwcap) & PPC_FEATURE_64) != 0)
9+
10+
11 static const double almost_half = 0.5000000000000001; /* 0.5 + 2^-53 */
12 static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
13 static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
14diff -Nurd ../glibc-initial-2.5-r4/glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c
15--- ../glibc-initial-2.5-r4/glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c 2006-04-14 07:44:30.000000000 +0200
16+++ glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c 2006-12-08 12:53:36.992227000 +0100
17@@ -25,6 +25,8 @@
18 #include <sysdep.h>
19 #include <ldsodefs.h>
20
21+#define __CPU_HAS_FSQRT ((GLRO(dl_hwcap) & PPC_FEATURE_64) != 0)
22+
23 static const float almost_half = 0.50000006; /* 0.5 + 2^-24 */
24 static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
25 static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };