Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in src/patchsets/glibc/2.13: 0020_all_glibc-tweak-rfc1918-lookup.patch 0030_all_glibc-respect-env-CPPFLAGS.patch 0055_all_glibc-2.12-static-shared-getpagesize.patch 0085_all_glibc-disable-ldconfig.patch 1010_all_glibc-queue-header-updates.patch 1020_all_glibc-longjmp-chk-hidden-fortify.patch 1030_all_glibc-manual-no-perl.patch 1040_all_2.3.3-localedef-fix-trampoline.patch 1055_all_glibc-resolv-dynamic.patch 1060_all_glibc-localedef-mmap.patch 1070_all_glibc-fadvise64_64.patch 1075_all_glibc-section-comments.patch 1080_all_glibc-no-inline-gmon.patch 1085_all_glibc-2.9-check_native-headers.patch 1090_all_glibc-2.3.6-fix-pr631.patch 1095_all_glibc-2.9-assume-pipe2.patch 1100_all_glibc-2.3.3-china.patch 1103_all_glibc-new-valencian-locale.patch 1120_all_glibc-2.11-longjmp-chk-fallback.patch 1130_all_glibc-2.4-undefine-__i686.patch 1160_all_glibc-2.8-nscd-one-fork.patch 1503_hppa_glibc-2.7-hppa-nptl-carlos.patch 1505_hppa_glibc-2.11-hppa-npt l.patch 1509_all_ glibc-2.11-hppa-SOCK_CLOEXEC.patch 1530_all_glibc-m68k-sys-user.patch 3000_all_2.3.6-dl_execstack-PaX-support.patch 3010_all_2.3.3_pre20040117-pt_pax.patch 3020_all_glibc-tests-sandbox-libdl-paths.patch 5063_all_glibc-dont-build-timezone.patch 6018_all_alpha-glibc-2.8-cache-shape.patch 6020_all_alpha-fix-gcc-4.1-warnings.patch 6022_alpha_alpha-add-fdatasync-support.patch 6026_all_alpha-fix-rtld-fPIC.patch 6028_all_alpha-fix-memchr.patch 6029_all_alpha-fix-memchr.patch 6031_all_alpha-glibc-2.12-epoll_create1.patch 6032_all_alpha-syscall-6.patch 6120_all_ppc-glibc-2.9-atomic.patch 6130_all_ppc-glibc-2.11-cell-vector.patch 6220_all_glibc-2.4-arm-cirrus-ep93xx-maverick-crunch-fpu.patch 6230_all_arm-glibc-hardened.patch 6240_all_glibc-2.8-nptl-lowlevellock.patch 6600_mips_librt-mips.patch 6605_all_glibc-2.4-fpu-cw-mips.patch 6606_all_mips-glibc-delete-getpagesize.c.patch README.history
Date: Sat, 05 Feb 2011 19:13:17
Message-Id: 20110205191300.6E9B820054@flycatcher.gentoo.org
1 vapier 11/02/05 19:13:00
2
3 Added: 0020_all_glibc-tweak-rfc1918-lookup.patch
4 0030_all_glibc-respect-env-CPPFLAGS.patch
5 0055_all_glibc-2.12-static-shared-getpagesize.patch
6 0085_all_glibc-disable-ldconfig.patch
7 1010_all_glibc-queue-header-updates.patch
8 1020_all_glibc-longjmp-chk-hidden-fortify.patch
9 1030_all_glibc-manual-no-perl.patch
10 1040_all_2.3.3-localedef-fix-trampoline.patch
11 1055_all_glibc-resolv-dynamic.patch
12 1060_all_glibc-localedef-mmap.patch
13 1070_all_glibc-fadvise64_64.patch
14 1075_all_glibc-section-comments.patch
15 1080_all_glibc-no-inline-gmon.patch
16 1085_all_glibc-2.9-check_native-headers.patch
17 1090_all_glibc-2.3.6-fix-pr631.patch
18 1095_all_glibc-2.9-assume-pipe2.patch
19 1100_all_glibc-2.3.3-china.patch
20 1103_all_glibc-new-valencian-locale.patch
21 1120_all_glibc-2.11-longjmp-chk-fallback.patch
22 1130_all_glibc-2.4-undefine-__i686.patch
23 1160_all_glibc-2.8-nscd-one-fork.patch
24 1503_hppa_glibc-2.7-hppa-nptl-carlos.patch
25 1505_hppa_glibc-2.11-hppa-nptl.patch
26 1509_all_glibc-2.11-hppa-SOCK_CLOEXEC.patch
27 1530_all_glibc-m68k-sys-user.patch
28 3000_all_2.3.6-dl_execstack-PaX-support.patch
29 3010_all_2.3.3_pre20040117-pt_pax.patch
30 3020_all_glibc-tests-sandbox-libdl-paths.patch
31 5063_all_glibc-dont-build-timezone.patch
32 6018_all_alpha-glibc-2.8-cache-shape.patch
33 6020_all_alpha-fix-gcc-4.1-warnings.patch
34 6022_alpha_alpha-add-fdatasync-support.patch
35 6026_all_alpha-fix-rtld-fPIC.patch
36 6028_all_alpha-fix-memchr.patch
37 6029_all_alpha-fix-memchr.patch
38 6031_all_alpha-glibc-2.12-epoll_create1.patch
39 6032_all_alpha-syscall-6.patch
40 6120_all_ppc-glibc-2.9-atomic.patch
41 6130_all_ppc-glibc-2.11-cell-vector.patch
42 6220_all_glibc-2.4-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
43 6230_all_arm-glibc-hardened.patch
44 6240_all_glibc-2.8-nptl-lowlevellock.patch
45 6600_mips_librt-mips.patch
46 6605_all_glibc-2.4-fpu-cw-mips.patch
47 6606_all_mips-glibc-delete-getpagesize.c.patch
48 README.history
49 Log:
50 initial 2.13 patchset based on last 2.12.2 patchset
51
52 Revision Changes Path
53 1.1 src/patchsets/glibc/2.13/0020_all_glibc-tweak-rfc1918-lookup.patch
54
55 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/0020_all_glibc-tweak-rfc1918-lookup.patch?rev=1.1&view=markup
56 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/0020_all_glibc-tweak-rfc1918-lookup.patch?rev=1.1&content-type=text/plain
57
58 Index: 0020_all_glibc-tweak-rfc1918-lookup.patch
59 ===================================================================
60 http://bugs.gentoo.org/315977
61
62 diff --git a/posix/gai.conf b/posix/gai.conf
63 index 195287e..efba67b 100644
64 --- a/posix/gai.conf
65 +++ b/posix/gai.conf
66 @@ -56,9 +56,7 @@
67 #
68 # scopev4 <mask> <value>
69 # Add another rule to the RFC 3484 scope table for IPv4 addresses.
70 -# By default the scope IDs described in section 3.2 in RFC 3484 are
71 -# used. Changing these defaults should hardly ever be necessary.
72 -# The defaults are equivalent to:
73 +# The definitions in RFC 3484 are equivalent to:
74 #
75 #scopev4 ::ffff:169.254.0.0/112 2
76 #scopev4 ::ffff:127.0.0.0/104 2
77 @@ -72,6 +70,6 @@
78 # have the same scope and are therefore not sorted first. To change
79 # this use only these rules:
80 #
81 -#scopev4 ::ffff:169.254.0.0/112 2
82 -#scopev4 ::ffff:127.0.0.0/104 2
83 -#scopev4 ::ffff:0.0.0.0/96 14
84 +scopev4 ::ffff:169.254.0.0/112 2
85 +scopev4 ::ffff:127.0.0.0/104 2
86 +scopev4 ::ffff:0.0.0.0/96 14
87
88
89
90 1.1 src/patchsets/glibc/2.13/0030_all_glibc-respect-env-CPPFLAGS.patch
91
92 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/0030_all_glibc-respect-env-CPPFLAGS.patch?rev=1.1&view=markup
93 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/0030_all_glibc-respect-env-CPPFLAGS.patch?rev=1.1&content-type=text/plain
94
95 Index: 0030_all_glibc-respect-env-CPPFLAGS.patch
96 ===================================================================
97 Respect environment CPPFLAGS when we run ./configure so we can inject
98 random -D things without having to set CFLAGS/ASFLAGS
99
100 --- libc/Makeconfig
101 +++ libc/Makeconfig
102 @@ -672,6 +672,7 @@ CPPFLAGS = $($(subdir)-CPPFLAGS) $(+incl
103 $(foreach lib,$(libof-$(basename $(@F))) \
104 $(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \
105 $(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F)))
106 +CPPFLAGS += $(CPPFLAGS-config)
107 override CFLAGS = -std=gnu99 $(gnu89-inline-CFLAGS) \
108 $(filter-out %frame-pointer,$(+cflags)) $(+gccwarn-c) \
109 $(sysdep-CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) \
110 --- libc/config.make.in
111 +++ libc/config.make.in
112 @@ -95,6 +95,7 @@ CC = @CC@
113 CXX = @CXX@
114 BUILD_CC = @BUILD_CC@
115 CFLAGS = @CFLAGS@
116 +CPPFLAGS-config = @CPPFLAGS@
117 ASFLAGS-config = @ASFLAGS_config@
118 AR = @AR@
119 RANLIB = @RANLIB@
120
121
122
123 1.1 src/patchsets/glibc/2.13/0055_all_glibc-2.12-static-shared-getpagesize.patch
124
125 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/0055_all_glibc-2.12-static-shared-getpagesize.patch?rev=1.1&view=markup
126 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/0055_all_glibc-2.12-static-shared-getpagesize.patch?rev=1.1&content-type=text/plain
127
128 Index: 0055_all_glibc-2.12-static-shared-getpagesize.patch
129 ===================================================================
130 http://thread.gmane.org/gmane.comp.lib.glibc.user/579
131 http://sources.redhat.com/bugzilla/show_bug.cgi?id=11929
132 http://bugs.gentoo.org/332927
133
134 a simple statically linked app fails with glibc-2.12:
135 $ cat test.c
136 main(){getpwnam("root");}
137 $ gcc -static test.c
138 $ ./a.out
139 a.out: ../sysdeps/unix/sysv/linux/getpagesize.c:32: __getpagesize:
140 Assertion `_rtld_global_ro._dl_pagesize != 0' failed.
141 Aborted (core dumped)
142
143 the crux of the matter seems to be the fact that static apps with
144 glibc will dynamically load nss shared libraries when necessary. the
145 static code will initialize GLRO(dl_pagesize) just fine from the
146 kernel auxv, but this being the static code paths, GLRO(dl_pagesize)
147 expands into _dl_pagesize. when the nss shared libraries are loaded
148 up, the ldso is also mapped in, but it doesnt process the kernel auxv
149 (_dl_sysdep_start() is not called). so the shared library
150 GLRO(dl_pagesize) expands into _rtld_global_ro._dl_pagesize and that
151 field stays at 0.
152
153 then when the nss shared libs process the request and gets to the
154 standard "passwd" database, it calls the shared lib versions of
155 malloc/stdio which rely on the __getpagesize() function. but this
156 being in the shared library, it reads the shared GLRO(dl_pagesize)
157 which is 0, and the assert() is triggered.
158
159 i think running nscd makes things work because its nss module that
160 talks to the nscd daemon doesnt call any routines that implicitly rely
161 on __getpagesize().
162
163 this all started happening after this commit:
164 From 8f4a5048eea6536ee85c0f2670adbb97d71e427d Mon Sep 17 00:00:00 2001
165 From: Ulrich Drepper <drepper@××××××.com>
166 Date: Sat, 27 Mar 2010 06:19:50 -0700
167 Subject: [PATCH] Optimize __getpagesize a bit.
168
169 if we look at the ia64 port, we see that it has had similar logic for
170 its __getpagesize function forever. so take its DL_STATIC_INIT code
171 and move it up to the common linux tree.
172
173 2010-08-18 Mike Frysinger <vapier@g.o>
174
175 * sysdeps/unix/sysv/linux/ia64/Makefile: Move dl-static addition to
176 sysdep vars for subdir==elf to ...
177 * sysdeps/unix/sysv/linux/Makefile: ... here.
178 * sysdeps/unix/sysv/linux/ia64/dl-static.c: Move file to ...
179 * sysdeps/unix/sysv/linux/dl-static.c: ... here.
180 * sysdeps/unix/sysv/linux/ia64/ldsodefs.h: Delete, and move the
181 DL_STATIC_INIT defines to ...
182 * sysdeps/unix/sysv/linux/ldsodefs.h: ... here.
183 * sysdeps/unix/sysv/linux/ia64/getpagesize.c: Delete.
184
185 diff --git a/sysdeps/unix/sysv/linux/ia64/Makefile b/sysdeps/unix/sysv/linux/ia64/Makefile
186 index d9a35a7..3bb1ce0 100644
187 --- a/sysdeps/unix/sysv/linux/ia64/Makefile
188 +++ b/sysdeps/unix/sysv/linux/ia64/Makefile
189 @@ -12,12 +12,6 @@ sysdep_headers += sys/io.h
190 sysdep_routines += ioperm clone2
191 endif
192
193 -ifeq ($(subdir),elf)
194 -sysdep-dl-routines += dl-static
195 -sysdep_routines += $(sysdep-dl-routines)
196 -sysdep-rtld-routines += $(sysdep-dl-routines)
197 -endif
198 -
199 ifeq ($(subdir),rt)
200 librt-routines += rt-sysdep
201 endif
202 diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
203 index 4302bd3..37c56a3 100644
204 --- a/sysdeps/unix/sysv/linux/Makefile
205 +++ b/sysdeps/unix/sysv/linux/Makefile
206 @@ -147,7 +147,9 @@ sysdep_routines += xstatconv internal_statvfs internal_statvfs64 \
207 endif
208
209 ifeq ($(subdir),elf)
210 -sysdep-rtld-routines += dl-brk dl-sbrk
211 +sysdep-dl-routines += dl-static
212 +sysdep_routines += dl-static
213 +sysdep-rtld-routines += dl-brk dl-sbrk dl-static
214
215 CPPFLAGS-lddlibc4 += -DNOT_IN_libc
216 endif
217 diff --git a/sysdeps/unix/sysv/linux/ia64/dl-static.c b/sysdeps/unix/sysv/linux/ia64/dl-static.c
218 deleted file mode 100644
219 index 4efc077..0000000
220 --- a/sysdeps/unix/sysv/linux/ia64/dl-static.c
221 +++ /dev/null
222 @@ -1,69 +0,0 @@
223 -/* Variable initialization. IA-64 version.
224 - Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
225 - This file is part of the GNU C Library.
226 -
227 - The GNU C Library is free software; you can redistribute it and/or
228 - modify it under the terms of the GNU Lesser General Public
229 - License as published by the Free Software Foundation; either
230 - version 2.1 of the License, or (at your option) any later version.
231 -
232 - The GNU C Library is distributed in the hope that it will be useful,
233 - but WITHOUT ANY WARRANTY; without even the implied warranty of
234 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
235 - Lesser General Public License for more details.
236 -
237 - You should have received a copy of the GNU Lesser General Public
238 - License along with the GNU C Library; if not, write to the Free
239 - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
240 - 02111-1307 USA. */
241 -
242 -#include <ldsodefs.h>
243 -
244 -#ifdef SHARED
245 -
246 -void
247 -_dl_var_init (void *array[])
248 -{
249 - /* It has to match "variables" below. */
250 - enum
251 - {
252 - DL_PAGESIZE = 0,
253 - DL_CLKTCK
254 - };
255 -
256 - GLRO(dl_pagesize) = *((size_t *) array[DL_PAGESIZE]);
257 - GLRO(dl_clktck) = *((int *) array[DL_CLKTCK]);
258 -}
259 -
260 -#else
261 -#include <bits/libc-lock.h>
262 -
263 -__libc_lock_define_initialized_recursive (static, _dl_static_lock)
264 -
265 -static void *variables[] =
266 -{
267 - &GLRO(dl_pagesize),
268 - &GLRO(dl_clktck)
269 -};
270 -
271 -void
272 -_dl_static_init (struct link_map *map)
273 -{
274 - const ElfW(Sym) *ref = NULL;
275 - lookup_t loadbase;
276 - void (*f) (void *[]);
277 -
278 - __libc_lock_lock_recursive (_dl_static_lock);
279 -
280 - loadbase = _dl_lookup_symbol_x ("_dl_var_init", map, &ref,
281 - map->l_local_scope, NULL, 0, 1, NULL);
282 - if (ref != NULL)
283 - {
284 - f = (void (*) (void *[])) DL_SYMBOL_ADDRESS (loadbase, ref);
285 - f (variables);
286 - }
287 -
288 - __libc_lock_unlock_recursive (_dl_static_lock);
289 -}
290 -
291 -#endif
292 diff --git a/sysdeps/unix/sysv/linux/dl-static.c b/sysdeps/unix/sysv/linux/dl-static.c
293 new file mode 100644
294 index 0000000..fa70811
295 --- /dev/null
296 +++ b/sysdeps/unix/sysv/linux/dl-static.c
297 @@ -0,0 +1,69 @@
298 +/* Variable initialization.
299 + Copyright (C) 2001, 2002, 2003, 2004, 2010 Free Software Foundation, Inc.
300 + This file is part of the GNU C Library.
301 +
302 + The GNU C Library is free software; you can redistribute it and/or
303 + modify it under the terms of the GNU Lesser General Public
304 + License as published by the Free Software Foundation; either
305 + version 2.1 of the License, or (at your option) any later version.
306 +
307 + The GNU C Library is distributed in the hope that it will be useful,
308 + but WITHOUT ANY WARRANTY; without even the implied warranty of
309 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
310 + Lesser General Public License for more details.
311 +
312 + You should have received a copy of the GNU Lesser General Public
313 + License along with the GNU C Library; if not, write to the Free
314 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
315 + 02111-1307 USA. */
316 +
317 +#include <ldsodefs.h>
318 +
319 +#ifdef SHARED
320 +
321 +void
322 +_dl_var_init (void *array[])
323 +{
324 + /* It has to match "variables" below. */
325 + enum
326 + {
327 + DL_PAGESIZE = 0,
328 + DL_CLKTCK
329 + };
330 +
331 + GLRO(dl_pagesize) = *((size_t *) array[DL_PAGESIZE]);
332 + GLRO(dl_clktck) = *((int *) array[DL_CLKTCK]);
333 +}
334 +
335 +#else
336 +#include <bits/libc-lock.h>
337 +
338 +__libc_lock_define_initialized_recursive (static, _dl_static_lock)
339 +
340 +static void *variables[] =
341 +{
342 + &GLRO(dl_pagesize),
343 + &GLRO(dl_clktck)
344 +};
345 +
346 +void
347 +_dl_static_init (struct link_map *map)
348 +{
349 + const ElfW(Sym) *ref = NULL;
350 + lookup_t loadbase;
351 + void (*f) (void *[]);
352 +
353 + __libc_lock_lock_recursive (_dl_static_lock);
354 +
355 + loadbase = _dl_lookup_symbol_x ("_dl_var_init", map, &ref,
356 + map->l_local_scope, NULL, 0, 1, NULL);
357 + if (ref != NULL)
358 + {
359 + f = (void (*) (void *[])) DL_SYMBOL_ADDRESS (loadbase, ref);
360 + f (variables);
361 + }
362 +
363 + __libc_lock_unlock_recursive (_dl_static_lock);
364 +}
365 +
366 +#endif
367 diff --git a/sysdeps/unix/sysv/linux/ia64/ldsodefs.h b/sysdeps/unix/sysv/linux/ia64/ldsodefs.h
368 deleted file mode 100644
369 index 31af624..0000000
370 --- a/sysdeps/unix/sysv/linux/ia64/ldsodefs.h
371 +++ /dev/null
372 @@ -1,33 +0,0 @@
373 -/* Run-time dynamic linker data structures for loaded ELF shared objects. IA64.
374 - Copyright (C) 2001 Free Software Foundation, Inc.
375 - This file is part of the GNU C Library.
376 -
377 - The GNU C Library is free software; you can redistribute it and/or
378 - modify it under the terms of the GNU Lesser General Public
379 - License as published by the Free Software Foundation; either
380 - version 2.1 of the License, or (at your option) any later version.
381 -
382 - The GNU C Library is distributed in the hope that it will be useful,
383 - but WITHOUT ANY WARRANTY; without even the implied warranty of
384 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
385 - Lesser General Public License for more details.
386 -
387 - You should have received a copy of the GNU Lesser General Public
388 - License along with the GNU C Library; if not, write to the Free
389 - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
390 - 02111-1307 USA. */
391 -
392 -#ifndef _LDSODEFS_H
393 -
394 -/* Get the real definitions. */
395 -#include_next <ldsodefs.h>
396 -
397 -/* Now define our stuff. */
398 -
399 -/* We need special support to initialize DSO loaded for statically linked
400 - binaries. */
401 -extern void _dl_static_init (struct link_map *map);
402 -#undef DL_STATIC_INIT
403 -#define DL_STATIC_INIT(map) _dl_static_init (map)
404 -
405 -#endif /* ldsodefs.h */
406 diff --git a/sysdeps/unix/sysv/linux/ldsodefs.h b/sysdeps/unix/sysv/linux/ldsodefs.h
407 index 5d5b1b4..ecb5d4f 100644
408 --- a/sysdeps/unix/sysv/linux/ldsodefs.h
409 +++ b/sysdeps/unix/sysv/linux/ldsodefs.h
410 @@ -36,6 +36,12 @@ extern void _dl_aux_init (ElfW(auxv_t) *av) internal_function;
411 /* Initialization which is normally done by the dynamic linker. */
412 extern void _dl_non_dynamic_init (void) internal_function;
413
414 +/* We need special support to initialize DSO loaded for statically linked
415 + binaries. */
416 +extern void _dl_static_init (struct link_map *map);
417 +#undef DL_STATIC_INIT
418 +#define DL_STATIC_INIT(map) _dl_static_init (map)
419 +
420 /* We can assume that the kernel always provides the AT_UID, AT_EUID,
421 AT_GID, and AT_EGID values in the auxiliary vector from 2.4.0 or so on. */
422 #if __ASSUME_AT_XID
423 diff --git a/sysdeps/unix/sysv/linux/ia64/getpagesize.c b/sysdeps/unix/sysv/linux/ia64/getpagesize.c
424 deleted file mode 100644
425 index 1155dfd..0000000
426 --- a/sysdeps/unix/sysv/linux/ia64/getpagesize.c
427 +++ /dev/null
428 @@ -1,39 +0,0 @@
429 -/* Copyright (C) 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
430 - This file is part of the GNU C Library.
431 -
432 - The GNU C Library is free software; you can redistribute it and/or
433 - modify it under the terms of the GNU Lesser General Public
434 - License as published by the Free Software Foundation; either
435 - version 2.1 of the License, or (at your option) any later version.
436 -
437 - The GNU C Library is distributed in the hope that it will be useful,
438 - but WITHOUT ANY WARRANTY; without even the implied warranty of
439 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
440 - Lesser General Public License for more details.
441 -
442 - You should have received a copy of the GNU Lesser General Public
443 - License along with the GNU C Library; if not, write to the Free
444 - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
445 - 02111-1307 USA. */
446 -
447 -#include <assert.h>
448 -#include <unistd.h>
449 -#include <sys/param.h>
450 -
451 -#include <ldsodefs.h>
452 -#include <sysdep.h>
453 -#include <sys/syscall.h>
454 -
455 -/* Return the system page size. The return value will depend on how
456 - the kernel is configured. A program must use this call to
457 - determine the page size to ensure proper alignment for calls such
458 - as mmap and friends. --davidm 99/11/30 */
459 -
460 -int
461 -__getpagesize ()
462 -{
463 - assert (GLRO(dl_pagesize) != 0);
464 - return GLRO(dl_pagesize);
465 -}
466 -libc_hidden_def (__getpagesize)
467 -weak_alias (__getpagesize, getpagesize)
468
469
470
471 1.1 src/patchsets/glibc/2.13/0085_all_glibc-disable-ldconfig.patch
472
473 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/0085_all_glibc-disable-ldconfig.patch?rev=1.1&view=markup
474 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/0085_all_glibc-disable-ldconfig.patch?rev=1.1&content-type=text/plain
475
476 Index: 0085_all_glibc-disable-ldconfig.patch
477 ===================================================================
478 do not bother running ldconfig on DESTDIR. it wants to write the temp cache
479 file outside of the chroot. doesnt matter anyways as we wont use the cache
480 results (portage will rebuild cache), so running ldconfig is simply a waste
481 of time.
482
483 --- a/Makefile
484 +++ b/Makefile
485 @@ -117,4 +117,5 @@
486
487 install:
488 +dont-bother-with-destdir:
489 -test ! -x $(common-objpfx)elf/ldconfig || LC_ALL=C LANGUAGE=C \
490 $(common-objpfx)elf/ldconfig $(addprefix -r ,$(install_root)) \
491
492
493
494 1.1 src/patchsets/glibc/2.13/1010_all_glibc-queue-header-updates.patch
495
496 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1010_all_glibc-queue-header-updates.patch?rev=1.1&view=markup
497 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1010_all_glibc-queue-header-updates.patch?rev=1.1&content-type=text/plain
498
499 Index: 1010_all_glibc-queue-header-updates.patch
500 ===================================================================
501 grab some updates from FreeBSD
502
503 http://bugs.gentoo.org/201979
504
505 --- libc/misc/sys/queue.h
506 +++ libc/misc/sys/queue.h
507 @@ -136,6 +136,11 @@ struct { \
508 (var); \
509 (var) = ((var)->field.le_next))
510
511 +#define LIST_FOREACH_SAFE(var, head, field, tvar) \
512 + for ((var) = LIST_FIRST((head)); \
513 + (var) && ((tvar) = LIST_NEXT((var), field), 1); \
514 + (var) = (tvar))
515 +
516 /*
517 * List access methods.
518 */
519 @@ -197,6 +202,16 @@ struct { \
520 #define SLIST_FOREACH(var, head, field) \
521 for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next)
522
523 +#define SLIST_FOREACH_SAFE(var, head, field, tvar) \
524 + for ((var) = SLIST_FIRST((head)); \
525 + (var) && ((tvar) = SLIST_NEXT((var), field), 1); \
526 + (var) = (tvar))
527 +
528 +#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \
529 + for ((varp) = &SLIST_FIRST((head)); \
530 + ((var) = *(varp)) != NULL; \
531 + (varp) = &SLIST_NEXT((var), field))
532 +
533 /*
534 * Singly-linked List access methods.
535 */
536 @@ -242,6 +257,12 @@ struct { \
537 (head)->stqh_last = &(elm)->field.stqe_next; \
538 } while (/*CONSTCOND*/0)
539
540 +#define STAILQ_LAST(head, type, field) \
541 + (STAILQ_EMPTY((head)) ? \
542 + NULL : \
543 + ((struct type *)(void *) \
544 + ((char *)((head)->stqh_last) - offsetof(struct type, field))))
545 +
546 #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
547 if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\
548 (head)->stqh_last = &(elm)->field.stqe_next; \
549 @@ -271,6 +292,11 @@ struct { \
550 (var); \
551 (var) = ((var)->field.stqe_next))
552
553 +#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \
554 + for ((var) = STAILQ_FIRST((head)); \
555 + (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \
556 + (var) = (tvar))
557 +
558
559 /*
560 * Singly-linked Tail queue access methods.
561 @@ -437,10 +463,21 @@ struct { \
562 (var); \
563 (var) = ((var)->field.tqe_next))
564
565 +#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \
566 + for ((var) = TAILQ_FIRST((head)); \
567 + (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \
568 + (var) = (tvar))
569 +
570 #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \
571 for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \
572 (var); \
573 (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last)))
574 +
575 +#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \
576 + for ((var) = TAILQ_LAST((head), headname); \
577 + (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \
578 + (var) = (tvar))
579 +
580
581 /*
582 * Tail queue access methods.
583
584
585
586 1.1 src/patchsets/glibc/2.13/1020_all_glibc-longjmp-chk-hidden-fortify.patch
587
588 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1020_all_glibc-longjmp-chk-hidden-fortify.patch?rev=1.1&view=markup
589 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1020_all_glibc-longjmp-chk-hidden-fortify.patch?rev=1.1&content-type=text/plain
590
591 Index: 1020_all_glibc-longjmp-chk-hidden-fortify.patch
592 ===================================================================
593 http://bugs.gentoo.org/293637
594 http://sourceware.org/ml/libc-alpha/2009-12/msg00010.html
595
596 a bunch of ____longjmp_chk files mix PIC and SHARED code under just PIC.
597 use the HIDDEN_JUMPTARGET() function so the right function is called.
598
599 2009-11-27 Mike Frysinger <vapier@g.o>
600
601 * sysdeps/unix/sysv/linux/i386/____longjmp_chk.S (CALL_FAIL):
602 call HIDDEN_JUMPTARGET(__fortify_fail).
603 * sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S (CALL_FAIL):
604 Likewise.
605 * sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S (CALL_FAIL): Delete.
606 (CHECK_RSP): Branch to HIDDEN_JUMPTARGET(__fortify_fail).
607
608 --- a/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S
609 +++ b/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S
610 @@ -33,10 +33,10 @@ longjmp_msg:
611 cfi_register(%ebx,%ecx); \
612 LOAD_PIC_REG (bx); \
613 leal longjmp_msg@GOTOFF(%ebx), %eax; \
614 - call __GI___fortify_fail@PLT
615 + call HIDDEN_JUMPTARGET(__fortify_fail)
616 #else
617 # define CALL_FAIL movl $longjmp_msg, %eax; \
618 - call __fortify_fail
619 + call HIDDEN_JUMPTARGET(__fortify_fail)
620 #endif
621
622
623 --- a/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
624 +++ b/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
625 @@ -31,10 +31,10 @@ longjmp_msg:
626
627 #ifdef PIC
628 # define CALL_FAIL leaq longjmp_msg(%rip), %rdi; \
629 - call __GI___fortify_fail
630 + call HIDDEN_JUMPTARGET(__fortify_fail)
631 #else
632 # define CALL_FAIL movq $longjmp_msg, %rdi; \
633 - call __fortify_fail
634 + call HIDDEN_JUMPTARGET(__fortify_fail)
635 #endif
636
637 #define CHECK_RSP(reg) \
638 --- a/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S
639 +++ b/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S
640 @@ -30,19 +30,13 @@ longjmp_msg:
641
642 #define __longjmp ____longjmp_chk
643
644 -#ifdef PIC
645 -# define CALL_FAIL __GI___fortify_fail
646 -#else
647 -# define CALL_FAIL __fortify_fail
648 -#endif
649 -
650 #define CHECK_RSP(reg) \
651 cmp.ltu p0, p8 = reg, r12; \
652 (p8) br.cond.dpnt .Lok;; \
653 addl r28 = @ltoffx(longjmp_msg#), r1;; \
654 ld8.mov r28 = [r28], longjmp_msg#;; \
655 ld8 out0 = [r28]; \
656 - br.call.sptk.many b0 = CALL_FAIL#;; \
657 + br.call.sptk.many b0 = HIDDEN_JUMPTARGET(__fortify_fail)#;; \
658 .Lok:
659
660 #include "__longjmp.S"
661
662
663
664 1.1 src/patchsets/glibc/2.13/1030_all_glibc-manual-no-perl.patch
665
666 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1030_all_glibc-manual-no-perl.patch?rev=1.1&view=markup
667 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1030_all_glibc-manual-no-perl.patch?rev=1.1&content-type=text/plain
668
669 Index: 1030_all_glibc-manual-no-perl.patch
670 ===================================================================
671 If we're using a cvs snapshot which updates the source files, and
672 perl isn't installed yet, then we can't regen the docs. Not a big
673 deal, so just whine a little and continue on our merry way.
674
675 http://bugs.gentoo.org/60132
676
677 --- libc/manual/Makefile
678 +++ libc/manual/Makefile
679 @@ -104,9 +104,14 @@
680 libm-err.texi: stamp-libm-err
681 stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\
682 $(dir)/libm-test-ulps))
683 +ifneq ($(PERL),no)
684 pwd=`pwd`; \
685 $(PERL) $< $$pwd/.. > libm-err-tmp
686 $(move-if-change) libm-err-tmp libm-err.texi
687 +else
688 + echo "Unable to rebuild math docs, no perl installed"
689 + touch libm-err.texi
690 +endif
691 touch $@
692
693 # Generate Texinfo files from the C source for the example programs.
694
695
696
697 1.1 src/patchsets/glibc/2.13/1040_all_2.3.3-localedef-fix-trampoline.patch
698
699 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1040_all_2.3.3-localedef-fix-trampoline.patch?rev=1.1&view=markup
700 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1040_all_2.3.3-localedef-fix-trampoline.patch?rev=1.1&content-type=text/plain
701
702 Index: 1040_all_2.3.3-localedef-fix-trampoline.patch
703 ===================================================================
704 #! /bin/sh -e
705
706 # DP: Description: Fix localedef segfault when run under exec-shield,
707 # PaX or similar. (#231438, #198099)
708 # DP: Dpatch Author: James Troup <james@××××××.org>
709 # DP: Patch Author: (probably) Jakub Jelinek <jakub@××××××.com>
710 # DP: Upstream status: Unknown
711 # DP: Status Details: Unknown
712 # DP: Date: 2004-03-16
713
714 if [ $# -ne 2 ]; then
715 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
716 exit 1
717 fi
718 case "$1" in
719 -patch) patch -d "$2" -f --no-backup-if-mismatch -p1 < $0;;
720 -unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p1 < $0;;
721 *)
722 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
723 exit 1
724 esac
725 exit 0
726
727 --- glibc-2.3.3-net/locale/programs/3level.h 16 Jun 2003 07:19:09 -0000 1.1.1.5
728 +++ glibc-2.3.3-redhat/locale/programs/3level.h 16 Jun 2003 09:32:40 -0000 1.4
729 @@ -204,6 +204,42 @@ CONCAT(TABLE,_iterate) (struct TABLE *t,
730 }
731 }
732 }
733 +
734 +/* GCC ATM seems to do a poor job with pointers to nested functions passed
735 + to inlined functions. Help it a little bit with this hack. */
736 +#define wchead_table_iterate(tp, fn) \
737 +do \
738 + { \
739 + struct wchead_table *t = (tp); \
740 + uint32_t index1; \
741 + for (index1 = 0; index1 < t->level1_size; index1++) \
742 + { \
743 + uint32_t lookup1 = t->level1[index1]; \
744 + if (lookup1 != ((uint32_t) ~0)) \
745 + { \
746 + uint32_t lookup1_shifted = lookup1 << t->q; \
747 + uint32_t index2; \
748 + for (index2 = 0; index2 < (1 << t->q); index2++) \
749 + { \
750 + uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \
751 + if (lookup2 != ((uint32_t) ~0)) \
752 + { \
753 + uint32_t lookup2_shifted = lookup2 << t->p; \
754 + uint32_t index3; \
755 + for (index3 = 0; index3 < (1 << t->p); index3++) \
756 + { \
757 + struct element_t *lookup3 \
758 + = t->level3[index3 + lookup2_shifted]; \
759 + if (lookup3 != NULL) \
760 + fn ((((index1 << t->q) + index2) << t->p) + index3, \
761 + lookup3); \
762 + } \
763 + } \
764 + } \
765 + } \
766 + } \
767 + } while (0)
768 +
769 #endif
770
771 #ifndef NO_FINALIZE
772
773
774
775 1.1 src/patchsets/glibc/2.13/1055_all_glibc-resolv-dynamic.patch
776
777 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1055_all_glibc-resolv-dynamic.patch?rev=1.1&view=markup
778 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1055_all_glibc-resolv-dynamic.patch?rev=1.1&content-type=text/plain
779
780 Index: 1055_all_glibc-resolv-dynamic.patch
781 ===================================================================
782 ripped from SuSE
783
784 if /etc/resolv.conf is updated, then make sure applications
785 already running get the updated information.
786
787 http://bugs.gentoo.org/177416
788
789 --- libc/resolv/res_libc.c
790 +++ libc/resolv/res_libc.c
791 @@ -22,6 +22,7 @@
792 #include <arpa/nameser.h>
793 #include <resolv.h>
794 #include <bits/libc-lock.h>
795 +#include <sys/stat.h>
796
797
798 /* The following bit is copied from res_data.c (where it is #ifdef'ed
799 @@ -101,6 +102,20 @@
800 __res_maybe_init (res_state resp, int preinit)
801 {
802 if (resp->options & RES_INIT) {
803 + static time_t last_mtime, last_check;
804 + time_t now;
805 + struct stat statbuf;
806 +
807 + time (&now);
808 + if (now != last_check) {
809 + last_check = now;
810 + if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) {
811 + last_mtime = statbuf.st_mtime;
812 + atomicinclock (lock);
813 + atomicinc (__res_initstamp);
814 + atomicincunlock (lock);
815 + }
816 + }
817 if (__res_initstamp != resp->_u._ext.initstamp) {
818 if (resp->nscount > 0) {
819 __res_nclose (resp);
820
821
822
823 1.1 src/patchsets/glibc/2.13/1060_all_glibc-localedef-mmap.patch
824
825 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1060_all_glibc-localedef-mmap.patch?rev=1.1&view=markup
826 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1060_all_glibc-localedef-mmap.patch?rev=1.1&content-type=text/plain
827
828 Index: 1060_all_glibc-localedef-mmap.patch
829 ===================================================================
830 sniped from Debian
831 http://bugs.gentoo.org/289615
832
833 2009-10-27 Aurelien Jarno <aurelien@×××××××.net>
834
835 * locale/programs/locarchive.c: use MMAP_SHARED to reserve memory
836 used later with MMAP_FIXED | MMAP_SHARED to cope with different
837 alignment restrictions.
838
839 --- a/locale/programs/locarchive.c
840 +++ b/locale/programs/locarchive.c
841 @@ -134,7 +134,7 @@
842 size_t reserved = RESERVE_MMAP_SIZE;
843 int xflags = 0;
844 if (total < reserved
845 - && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
846 + && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON,
847 -1, 0)) != MAP_FAILED))
848 xflags = MAP_FIXED;
849 else
850 @@ -397,7 +397,7 @@
851 size_t reserved = RESERVE_MMAP_SIZE;
852 int xflags = 0;
853 if (total < reserved
854 - && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
855 + && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON,
856 -1, 0)) != MAP_FAILED))
857 xflags = MAP_FIXED;
858 else
859 @@ -615,7 +615,7 @@
860 int xflags = 0;
861 void *p;
862 if (st.st_size < reserved
863 - && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
864 + && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON,
865 -1, 0)) != MAP_FAILED))
866 xflags = MAP_FIXED;
867 else
868
869
870
871 1.1 src/patchsets/glibc/2.13/1070_all_glibc-fadvise64_64.patch
872
873 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1070_all_glibc-fadvise64_64.patch?rev=1.1&view=markup
874 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1070_all_glibc-fadvise64_64.patch?rev=1.1&content-type=text/plain
875
876 Index: 1070_all_glibc-fadvise64_64.patch
877 ===================================================================
878 ripped from Debian
879
880 ---
881 sysdeps/unix/sysv/linux/posix_fadvise.c | 13 +++++++++++++
882 1 file changed, 13 insertions(+)
883
884 --- a/sysdeps/unix/sysv/linux/posix_fadvise.c
885 +++ b/sysdeps/unix/sysv/linux/posix_fadvise.c
886 @@ -35,6 +35,19 @@
887 return INTERNAL_SYSCALL_ERRNO (ret, err);
888 return 0;
889 #else
890 +# ifdef __NR_fadvise64_64
891 + INTERNAL_SYSCALL_DECL (err);
892 + int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd,
893 + __LONG_LONG_PAIR ((long) (offset >> 31),
894 + (long) offset),
895 + __LONG_LONG_PAIR ((long) (len >> 31),
896 + (long) len),
897 + advise);
898 + if (INTERNAL_SYSCALL_ERROR_P (ret, err))
899 + return INTERNAL_SYSCALL_ERRNO (ret, err);
900 + return 0;
901 +# else
902 return ENOSYS;
903 +# endif
904 #endif
905 }
906
907
908
909 1.1 src/patchsets/glibc/2.13/1075_all_glibc-section-comments.patch
910
911 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1075_all_glibc-section-comments.patch?rev=1.1&view=markup
912 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1075_all_glibc-section-comments.patch?rev=1.1&content-type=text/plain
913
914 Index: 1075_all_glibc-section-comments.patch
915 ===================================================================
916 http://sources.redhat.com/ml/binutils/2004-04/msg00665.html
917
918 fixes building on some architectures (like m68k/arm/cris/etc...) because
919 it does the right thing
920
921 --- libc/include/libc-symbols.h
922 +++ libc/include/libc-symbols.h
923 @@ -232,12 +232,12 @@
924 # define __make_section_unallocated(section_string)
925 # endif
926
927 -/* Tacking on "\n\t#" to the section name makes gcc put it's bogus
928 +/* Tacking on "\n#APP\n\t#" to the section name makes gcc put it's bogus
929 section attributes on what looks like a comment to the assembler. */
930 # ifdef HAVE_SECTION_QUOTES
931 -# define __sec_comment "\"\n\t#\""
932 +# define __sec_comment "\"\n#APP\n\t#\""
933 # else
934 -# define __sec_comment "\n\t#"
935 +# define __sec_comment "\n#APP\n\t#"
936 # endif
937 # define link_warning(symbol, msg) \
938 __make_section_unallocated (".gnu.warning." #symbol) \
939
940
941
942 1.1 src/patchsets/glibc/2.13/1080_all_glibc-no-inline-gmon.patch
943
944 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1080_all_glibc-no-inline-gmon.patch?rev=1.1&view=markup
945 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1080_all_glibc-no-inline-gmon.patch?rev=1.1&content-type=text/plain
946
947 Index: 1080_all_glibc-no-inline-gmon.patch
948 ===================================================================
949 http://bugs.gentoo.org/196245
950 http://sourceware.org/ml/libc-alpha/2006-05/msg00017.html
951
952 Attached is a patch to add __attribute__ ((noinline)) to
953 call_gmon_start.
954
955 Without this patch, the sec script that processed initfini.s removes a
956 part of inlined call_gmon_start, causing undefined label errors.
957
958 This patch solves the problem by forcing gcc not to inline
959 call_gmon_start with __attribute__ ((noinline)).
960
961 Tested by building for arm-none-lixux-gnueabi. OK to apply?
962
963 Kazu Hirata
964
965 2006-05-07 Kazu Hirata &lt;kazu@××××××××××××.com&gt;
966
967 * sysdeps/generic/initfini.c (call_gmon_start): Add
968 __attribute__ ((noinline)).
969
970 Index: sysdeps/generic/initfini.c
971 ===================================================================
972 --- a/sysdeps/generic/initfini.c 16 Aug 2004 04:50:53 -0000 1.9
973 +++ b/sysdeps/generic/initfini.c 7 May 2006 15:31:08 -0000
974 @@ -70,7 +70,7 @@
975 /* The beginning of _init: */
976 asm (&quot;\n/*@_init_PROLOG_BEGINS*/&quot;);
977
978 -static void
979 +static void __attribute__ ((noinline))
980 call_gmon_start(void)
981 {
982 extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/
983
984
985
986 1.1 src/patchsets/glibc/2.13/1085_all_glibc-2.9-check_native-headers.patch
987
988 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1085_all_glibc-2.9-check_native-headers.patch?rev=1.1&view=markup
989 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1085_all_glibc-2.9-check_native-headers.patch?rev=1.1&content-type=text/plain
990
991 Index: 1085_all_glibc-2.9-check_native-headers.patch
992 ===================================================================
993 many ports hit this warning:
994 ../sysdeps/unix/sysv/linux/check_native.c:46: warning: implicit declaration of function 'memset'
995 ../sysdeps/unix/sysv/linux/check_native.c:46: warning: implicit declaration of function 'memset'
996
997 snipped from suse
998
999 --- a/sysdeps/unix/sysv/linux/check_native.c
1000 +++ b/sysdeps/unix/sysv/linux/check_native.c
1001 @@ -23,6 +23,7 @@
1002 #include <stddef.h>
1003 #include <stdint.h>
1004 #include <stdlib.h>
1005 +#include <string.h>
1006 #include <time.h>
1007 #include <unistd.h>
1008 #include <net/if.h>
1009
1010
1011
1012 1.1 src/patchsets/glibc/2.13/1090_all_glibc-2.3.6-fix-pr631.patch
1013
1014 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1090_all_glibc-2.3.6-fix-pr631.patch?rev=1.1&view=markup
1015 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1090_all_glibc-2.3.6-fix-pr631.patch?rev=1.1&content-type=text/plain
1016
1017 Index: 1090_all_glibc-2.3.6-fix-pr631.patch
1018 ===================================================================
1019 From dank@×××××.com
1020 Wed Jun 15 09:12:43 PDT 2005
1021
1022 Fixes
1023
1024 build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
1025 build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
1026 ... 53 lines deleted ...
1027 build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
1028 collect2: ld returned 1 exit status
1029 make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1
1030
1031 when building glibc with --enable-static-nss.
1032
1033 See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
1034
1035 --- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005
1036 +++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005
1037 @@ -487,7 +487,7 @@
1038
1039 # The static libraries.
1040 ifeq (yes,$(build-static))
1041 -link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
1042 +link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
1043 else
1044 ifeq (yes,$(build-shared))
1045 # We can try to link the programs with lib*_pic.a...
1046 --- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005
1047 +++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005
1048 @@ -115,6 +115,13 @@
1049 install-bin-script = ldd
1050 endif
1051
1052 +ifeq (yes,$(build-static-nss))
1053 +nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
1054 +resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
1055 +otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
1056 + $(resolvobjdir)/libresolv.a
1057 +endif
1058 +
1059 others = sprof sln
1060 install-bin = sprof
1061 others-static = sln
1062
1063 Signed-off-by: Robert P. J. Day <rpjday@××××××××××.com>
1064
1065
1066
1067 1.1 src/patchsets/glibc/2.13/1095_all_glibc-2.9-assume-pipe2.patch
1068
1069 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1095_all_glibc-2.9-assume-pipe2.patch?rev=1.1&view=markup
1070 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1095_all_glibc-2.9-assume-pipe2.patch?rev=1.1&content-type=text/plain
1071
1072 Index: 1095_all_glibc-2.9-assume-pipe2.patch
1073 ===================================================================
1074 http://bugs.gentoo.org/250342
1075 http://sources.redhat.com/bugzilla/show_bug.cgi?id=9685
1076
1077 we cant assume sock_cloexec and pipe2 are bound together as the former defines
1078 are found in glibc only while the latter are a combo of kernel headers and
1079 glibc. so if we do a runtime detection of SOCK_CLOEXEC, but pipe2() is a stub
1080 inside of glibc, we hit a problem. for example:
1081
1082 #include <grp.h>
1083 #include <stdio.h>
1084 main()
1085 {
1086 getgrnam("portage");
1087 if (!popen("ls", "r"))
1088 perror("popen()");
1089 }
1090
1091 getgrnam() will detect that the kernel supports SOCK_CLOEXEC and then set both
1092 __have_sock_cloexec and __have_pipe2 to true. but if glibc was built against
1093 older kernel headers where __NR_pipe2 does not exist, glibc will have a ENOSYS
1094 stub for it. so popen() will always fail as glibc assumes pipe2() works.
1095
1096 --- a/include/unistd.h
1097 +++ b/include/unistd.h
1098 @@ -167,9 +167,6 @@
1099 extern int __pause_nocancel (void) attribute_hidden;
1100
1101 extern int __have_sock_cloexec;
1102 -/* At lot of other functionality became available at the same time as
1103 - SOCK_CLOEXEC. Avoid defining separate variables for all of them
1104 - unless it is really necessary. */
1105 -#define __have_pipe2 __have_sock_cloexec
1106 +extern int __have_pipe2;
1107
1108 #endif
1109 --- a/socket/have_sock_cloexec.c
1110 +++ b/socket/have_sock_cloexec.c
1111 @@ -16,9 +16,14 @@
1112 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1113 02111-1307 USA. */
1114
1115 +#include <fcntl.h>
1116 #include <sys/socket.h>
1117 #include <kernel-features.h>
1118
1119 #if defined SOCK_CLOEXEC && !defined __ASSUME_SOCK_CLOEXEC
1120 int __have_sock_cloexec;
1121 #endif
1122 +
1123 +#if defined O_CLOEXEC && !defined __ASSUME_PIPE2
1124 +int __have_pipe2;
1125 +#endif
1126
1127
1128
1129 1.1 src/patchsets/glibc/2.13/1100_all_glibc-2.3.3-china.patch
1130
1131 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1100_all_glibc-2.3.3-china.patch?rev=1.1&view=markup
1132 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1100_all_glibc-2.3.3-china.patch?rev=1.1&content-type=text/plain
1133
1134 Index: 1100_all_glibc-2.3.3-china.patch
1135 ===================================================================
1136 --- a/localedata/locales/zh_TW
1137 +++ b/localedata/locales/zh_TW
1138 @@ -1,7 +1,7 @@
1139 comment_char %
1140 escape_char /
1141 %
1142 -% Chinese language locale for Taiwan R.O.C.
1143 +% Chinese language locale for Taiwan
1144 % charmap: BIG5-CP950
1145 %
1146 % Original Author:
1147 @@ -17,7 +17,7 @@
1148 % Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf
1149
1150 LC_IDENTIFICATION
1151 -title "Chinese locale for Taiwan R.O.C."
1152 +title "Chinese locale for Taiwan"
1153 source ""
1154 address ""
1155 contact ""
1156 @@ -25,7 +25,7 @@
1157 tel ""
1158 fax ""
1159 language "Chinese"
1160 -territory "Taiwan R.O.C."
1161 +territory "Taiwan"
1162 revision "0.2"
1163 date "2000-08-02"
1164 %
1165
1166
1167
1168 1.1 src/patchsets/glibc/2.13/1103_all_glibc-new-valencian-locale.patch
1169
1170 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1103_all_glibc-new-valencian-locale.patch?rev=1.1&view=markup
1171 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1103_all_glibc-new-valencian-locale.patch?rev=1.1&content-type=text/plain
1172
1173 Index: 1103_all_glibc-new-valencian-locale.patch
1174 ===================================================================
1175 http://bugs.gentoo.org/show_bug.cgi?id=131815
1176 http://sourceware.org/bugzilla/show_bug.cgi?id=2522
1177
1178 --- localedata/SUPPORTED
1179 +++ localedata/SUPPORTED
1180 @@ -68,6 +68,8 @@
1181 ca_ES.UTF-8/UTF-8 \
1182 ca_ES/ISO-8859-1 \
1183 ca_ES@euro/ISO-8859-15 \
1184 +ca_ES.UTF-8@valencia/UTF-8 \
1185 +ca_ES@valencia/ISO-8859-15 \
1186 ca_FR.UTF-8/UTF-8 \
1187 ca_FR/ISO-8859-15 \
1188 ca_IT.UTF-8/UTF-8 \
1189 --- localedata/locales/ca_ES@valencia
1190 +++ localedata/locales/ca_ES@valencia
1191 @@ -0,0 +1,96 @@
1192 +comment_char %
1193 +escape_char /
1194 +%
1195 +% Valencian (southern Catalan) locale for Spain with Euro
1196 +%
1197 +% Note that this locale is almost the same as ca_ES@euro. The point of having
1198 +% a separate locale is only for PO translations, which have a lot of social
1199 +% support and are very appreciated by the Valencian-speaking community.
1200 +%
1201 +% Contact: Jordi Mallach
1202 +% Email: jordi@×××.org
1203 +% Tel:
1204 +% Fax:
1205 +% Language: ca
1206 +% Territory: ES
1207 +% Option: euro
1208 +% Revision: 1.0
1209 +% Date: 2006-04-06
1210 +% Application: general
1211 +% Users: general
1212 +% Repertoiremap: mnemonic,ds
1213 +% Charset: ISO-8859-15
1214 +% Distribution and use is free, also
1215 +% for commercial purposes.
1216 +
1217 +LC_IDENTIFICATION
1218 +title "Valencian (southern Catalan) locale for Spain with Euro"
1219 +source ""
1220 +address ""
1221 +contact "Jordi Mallach"
1222 +email "jordi@×××.org"
1223 +tel ""
1224 +fax ""
1225 +language "Catalan"
1226 +territory "Spain"
1227 +revision "1.0"
1228 +date "2006-04-06"
1229 +%
1230 +category "ca_ES@valencia:2006";LC_IDENTIFICATION
1231 +category "ca_ES@valencia:2006";LC_CTYPE
1232 +category "ca_ES@valencia:2006";LC_COLLATE
1233 +category "ca_ES@valencia:2006";LC_MONETARY
1234 +category "ca_ES@valencia:2006";LC_NUMERIC
1235 +category "ca_ES@valencia:2006";LC_TIME
1236 +category "ca_ES@valencia:2006";LC_MESSAGES
1237 +category "ca_ES@valencia:2006";LC_PAPER
1238 +category "ca_ES@valencia:2006";LC_NAME
1239 +category "ca_ES@valencia:2006";LC_ADDRESS
1240 +category "ca_ES@valencia:2006";LC_TELEPHONE
1241 +category "ca_ES@valencia:2006";LC_MEASUREMENT
1242 +
1243 +END LC_IDENTIFICATION
1244 +
1245 +LC_CTYPE
1246 +copy "i18n"
1247 +END LC_CTYPE
1248 +
1249 +LC_COLLATE
1250 +copy "ca_ES"
1251 +END LC_COLLATE
1252 +
1253 +LC_MONETARY
1254 +copy "ca_ES"
1255 +END LC_MONETARY
1256 +
1257 +LC_NUMERIC
1258 +copy "ca_ES"
1259 +END LC_NUMERIC
1260 +
1261 +LC_TIME
1262 +copy "ca_ES"
1263 +END LC_TIME
1264 +
1265 +LC_MESSAGES
1266 +copy "ca_ES"
1267 +END LC_MESSAGES
1268 +
1269 +LC_PAPER
1270 +copy "ca_ES"
1271 +END LC_PAPER
1272 +
1273 +LC_NAME
1274 +copy "ca_ES"
1275 +END LC_NAME
1276 +
1277 +LC_ADDRESS
1278 +copy "ca_ES"
1279 +END LC_ADDRESS
1280 +
1281 +LC_TELEPHONE
1282 +copy "ca_ES"
1283 +END LC_TELEPHONE
1284 +
1285 +LC_MEASUREMENT
1286 +copy "ca_ES"
1287 +END LC_MEASUREMENT
1288
1289
1290
1291 1.1 src/patchsets/glibc/2.13/1120_all_glibc-2.11-longjmp-chk-fallback.patch
1292
1293 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1120_all_glibc-2.11-longjmp-chk-fallback.patch?rev=1.1&view=markup
1294 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1120_all_glibc-2.11-longjmp-chk-fallback.patch?rev=1.1&content-type=text/plain
1295
1296 Index: 1120_all_glibc-2.11-longjmp-chk-fallback.patch
1297 ===================================================================
1298 --- debug/____longjmp_chk.c
1299 +++ debug/____longjmp_chk.c
1300 @@ -0,0 +1,7 @@
1301 +/* Stub to make building happy -- no fortify checks, but
1302 + it at least does the correct thing (longjmps). */
1303 +#include <setjmp.h>
1304 +void ____longjmp_chk (__jmp_buf env, int val)
1305 +{
1306 + return __longjmp (env, val);
1307 +}
1308
1309
1310
1311 1.1 src/patchsets/glibc/2.13/1130_all_glibc-2.4-undefine-__i686.patch
1312
1313 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1130_all_glibc-2.4-undefine-__i686.patch?rev=1.1&view=markup
1314 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1130_all_glibc-2.4-undefine-__i686.patch?rev=1.1&content-type=text/plain
1315
1316 Index: 1130_all_glibc-2.4-undefine-__i686.patch
1317 ===================================================================
1318 If gcc is configured to generate i686 code or better by default (like
1319 when using the --with-arch=pentium3 configure option), then the __i686
1320 macro will always be defined automatically and thus screw up the
1321 compilation of some .S files.
1322 http://bugs.gentoo.org/131108
1323 http://sourceware.org/ml/libc-alpha/2006-04/msg00090.html
1324
1325 2006-04-25 Mike Frysinger <vapier@g.o>
1326
1327 * sysdeps/i386/sysdep.h (__i686): Undefine.
1328
1329 --- sysdeps/i386/sysdep.h
1330 +++ sysdeps/i386/sysdep.h
1331 @@ -17,6 +17,14 @@
1332 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1333 02111-1307 USA. */
1334
1335 +/*
1336 + * When building for i686 targets or better, gcc automatically defines
1337 + * '__i686' to '1' for us which causes trouble when using section names
1338 + * like '__i686.get_pc_thunk.reg'. Since we check for __i686__ in the
1339 + * code, killing '__i686' shouldn't be a problem.
1340 + */
1341 +#undef __i686
1342 +
1343 #include <sysdeps/generic/sysdep.h>
1344
1345 #ifdef __ASSEMBLER__
1346
1347 Note: this breaks mips so we wrap it in a hackish __i686__ for now ...
1348
1349 2006-04-25 Mike Frysinger <vapier@g.o>
1350
1351 * sysdeps/pthread/pt-initfini.c: Include sysdep.h.
1352
1353 --- nptl/sysdeps/pthread/pt-initfini.c
1354 +++ nptl/sysdeps/pthread/pt-initfini.c
1355 @@ -45,6 +45,9 @@
1356 /* Embed an #include to pull in the alignment and .end directives. */
1357 asm ("\n#include \"defs.h\"");
1358
1359 +/* Embed an #include to pull in asm settings. */
1360 +asm ("\n#ifdef __i686__\n#include <sysdep.h>\n#endif");
1361 +
1362 /* The initial common code ends here. */
1363 asm ("\n/*@HEADER_ENDS*/");
1364
1365
1366
1367
1368 1.1 src/patchsets/glibc/2.13/1160_all_glibc-2.8-nscd-one-fork.patch
1369
1370 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1160_all_glibc-2.8-nscd-one-fork.patch?rev=1.1&view=markup
1371 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1160_all_glibc-2.8-nscd-one-fork.patch?rev=1.1&content-type=text/plain
1372
1373 Index: 1160_all_glibc-2.8-nscd-one-fork.patch
1374 ===================================================================
1375 only fork one to assist in stop-start-daemon assumptions about daemon behavior
1376
1377 http://bugs.gentoo.org/190785
1378
1379 --- libc/nscd/nscd.c
1380 +++ libc/nscd/nscd.c
1381 @@ -178,6 +178,9 @@
1382 if (pid != 0)
1383 exit (0);
1384
1385 + if (write_pid (_PATH_NSCDPID) < 0)
1386 + dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno));
1387 +
1388 int nullfd = open (_PATH_DEVNULL, O_RDWR);
1389 if (nullfd != -1)
1390 {
1391 @@ -227,12 +230,6 @@
1392 for (i = min_close_fd; i < getdtablesize (); i++)
1393 close (i);
1394
1395 - pid = fork ();
1396 - if (pid == -1)
1397 - error (EXIT_FAILURE, errno, _("cannot fork"));
1398 - if (pid != 0)
1399 - exit (0);
1400 -
1401 setsid ();
1402
1403 if (chdir ("/") != 0)
1404 @@ -241,9 +238,6 @@
1405
1406 openlog ("nscd", LOG_CONS | LOG_ODELAY, LOG_DAEMON);
1407
1408 - if (write_pid (_PATH_NSCDPID) < 0)
1409 - dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno));
1410 -
1411 if (!init_logfile ())
1412 dbg_log (_("Could not create log file"));
1413
1414
1415
1416 1.1 src/patchsets/glibc/2.13/1503_hppa_glibc-2.7-hppa-nptl-carlos.patch
1417
1418 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1503_hppa_glibc-2.7-hppa-nptl-carlos.patch?rev=1.1&view=markup
1419 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1503_hppa_glibc-2.7-hppa-nptl-carlos.patch?rev=1.1&content-type=text/plain
1420
1421 Index: 1503_hppa_glibc-2.7-hppa-nptl-carlos.patch
1422 ===================================================================
1423 --- elf/rtld.c.orig
1424 +++ elf/rtld.c
1425 @@ -379,14 +379,14 @@
1426 know it is available. We do not have to clear the memory if we
1427 do not have to use the temporary bootstrap_map. Global variables
1428 are initialized to zero by default. */
1429 -#ifndef DONT_USE_BOOTSTRAP_MAP
1430 +#if !defined DONT_USE_BOOTSTRAP_MAP
1431 # ifdef HAVE_BUILTIN_MEMSET
1432 __builtin_memset (bootstrap_map.l_info, '\0', sizeof (bootstrap_map.l_info));
1433 # else
1434 - for (size_t cnt = 0;
1435 - cnt < sizeof (bootstrap_map.l_info) / sizeof (bootstrap_map.l_info[0]);
1436 - ++cnt)
1437 - bootstrap_map.l_info[cnt] = 0;
1438 + /* Clear the whole bootstrap_map structure */
1439 + for (char *cnt = (char *)&(bootstrap_map);
1440 + cnt < ((char *)&(bootstrap_map) + sizeof (bootstrap_map));
1441 + *cnt++ = '\0');
1442 # endif
1443 # if USE___THREAD
1444 bootstrap_map.l_tls_modid = 0;
1445 --- include/atomic.h.orig
1446 +++ include/atomic.h
1447 @@ -174,7 +174,7 @@
1448 __typeof (*(mem)) __atg5_value = (newvalue); \
1449 \
1450 do \
1451 - __atg5_oldval = *__atg5_memp; \
1452 + __atg5_oldval = *(volatile __typeof (mem))__atg5_memp; \
1453 while (__builtin_expect \
1454 (atomic_compare_and_exchange_bool_acq (__atg5_memp, __atg5_value, \
1455 __atg5_oldval), 0)); \
1456 @@ -195,7 +195,7 @@
1457 __typeof (*(mem)) __atg6_value = (value); \
1458 \
1459 do \
1460 - __atg6_oldval = *__atg6_memp; \
1461 + __atg6_oldval = *(volatile __typeof (mem))__atg6_memp; \
1462 while (__builtin_expect \
1463 (atomic_compare_and_exchange_bool_acq (__atg6_memp, \
1464 __atg6_oldval \
1465 @@ -213,7 +213,7 @@
1466 __typeof (*(mem)) __atg7_value = (value); \
1467 \
1468 do \
1469 - __atg7_oldv = *__atg7_memp; \
1470 + __atg7_oldv = *(volatile __typeof (mem))__atg7_memp; \
1471 while (__builtin_expect \
1472 (catomic_compare_and_exchange_bool_acq (__atg7_memp, \
1473 __atg7_oldv \
1474 @@ -231,7 +231,7 @@
1475 __typeof (mem) __atg8_memp = (mem); \
1476 __typeof (*(mem)) __atg8_value = (value); \
1477 do { \
1478 - __atg8_oldval = *__atg8_memp; \
1479 + __atg8_oldval = *(volatile __typeof (mem))__atg8_memp; \
1480 if (__atg8_oldval >= __atg8_value) \
1481 break; \
1482 } while (__builtin_expect \
1483 @@ -248,7 +248,7 @@
1484 __typeof (mem) __atg9_memp = (mem); \
1485 __typeof (*(mem)) __atg9_value = (value); \
1486 do { \
1487 - __atg9_oldv = *__atg9_memp; \
1488 + __atg9_oldv = *(volatile __typeof (mem))__atg9_memp; \
1489 if (__atg9_oldv >= __atg9_value) \
1490 break; \
1491 } while (__builtin_expect \
1492 @@ -266,7 +266,7 @@
1493 __typeof (mem) __atg10_memp = (mem); \
1494 __typeof (*(mem)) __atg10_value = (value); \
1495 do { \
1496 - __atg10_oldval = *__atg10_memp; \
1497 + __atg10_oldval = *(volatile __typeof (mem))__atg10_memp; \
1498 if (__atg10_oldval <= __atg10_value) \
1499 break; \
1500 } while (__builtin_expect \
1501 @@ -350,7 +350,7 @@
1502 \
1503 do \
1504 { \
1505 - __atg11_oldval = *__atg11_memp; \
1506 + __atg11_oldval = *(volatile __typeof (mem))__atg11_memp; \
1507 if (__builtin_expect (__atg11_oldval <= 0, 0)) \
1508 break; \
1509 } \
1510 @@ -389,7 +389,7 @@
1511 __typeof (*(mem)) __atg14_mask = ((__typeof (*(mem))) 1 << (bit)); \
1512 \
1513 do \
1514 - __atg14_old = (*__atg14_memp); \
1515 + __atg14_old = (*(volatile __typeof (mem))__atg14_memp); \
1516 while (__builtin_expect \
1517 (atomic_compare_and_exchange_bool_acq (__atg14_memp, \
1518 __atg14_old | __atg14_mask,\
1519 @@ -407,7 +407,7 @@
1520 __typeof (*(mem)) __atg15_mask = (mask); \
1521 \
1522 do \
1523 - __atg15_old = (*__atg15_memp); \
1524 + __atg15_old = (*(volatile __typeof (mem))__atg15_memp); \
1525 while (__builtin_expect \
1526 (atomic_compare_and_exchange_bool_acq (__atg15_memp, \
1527 __atg15_old & __atg15_mask, \
1528 @@ -423,7 +423,7 @@
1529 __typeof (*(mem)) __atg16_mask = (mask); \
1530 \
1531 do \
1532 - __atg16_old = (*__atg16_memp); \
1533 + __atg16_old = (*(volatile __typeof (mem))__atg16_memp); \
1534 while (__builtin_expect \
1535 (atomic_compare_and_exchange_bool_acq (__atg16_memp, \
1536 __atg16_old & __atg16_mask,\
1537 @@ -441,7 +441,7 @@
1538 __typeof (*(mem)) __atg17_mask = (mask); \
1539 \
1540 do \
1541 - __atg17_old = (*__atg17_memp); \
1542 + __atg17_old = (*(volatile __typeof (mem))__atg17_memp); \
1543 while (__builtin_expect \
1544 (atomic_compare_and_exchange_bool_acq (__atg17_memp, \
1545 __atg17_old | __atg17_mask, \
1546 @@ -457,7 +457,7 @@
1547 __typeof (*(mem)) __atg18_mask = (mask); \
1548 \
1549 do \
1550 - __atg18_old = (*__atg18_memp); \
1551 + __atg18_old = (*(volatile __typeof (mem))__atg18_memp); \
1552 while (__builtin_expect \
1553 (catomic_compare_and_exchange_bool_acq (__atg18_memp, \
1554 __atg18_old | __atg18_mask,\
1555 @@ -473,7 +473,7 @@
1556 __typeof (*(mem)) __atg19_mask = (mask); \
1557 \
1558 do \
1559 - __atg19_old = (*__atg19_memp); \
1560 + __atg19_old = (*(volatile __typeof (mem))__atg19_memp); \
1561 while (__builtin_expect \
1562 (atomic_compare_and_exchange_bool_acq (__atg19_memp, \
1563 __atg19_old | __atg19_mask,\
1564 --- nptl/Makefile.orig
1565 +++ nptl/Makefile
1566 @@ -263,9 +263,9 @@
1567 # Files which must not be linked with libpthread.
1568 tests-nolibpthread = tst-unload
1569
1570 -# This sets the stack resource limit to 1023kb, which is not a multiple
1571 -# of the page size since every architecture's page size is > 1k.
1572 -tst-oddstacklimit-ENV = ; ulimit -s 1023;
1573 +# This sets the stack resource limit to 8193kb, which is not a multiple
1574 +# of the page size since every architecture's page size is 4096 bytes.
1575 +tst-oddstacklimit-ENV = ; ulimit -s 8193;
1576
1577 distribute = eintr.c tst-cleanup4aux.c
1578
1579 @@ -424,6 +424,35 @@
1580 CFLAGS-tst-cleanupx4.c += -fexceptions
1581 CFLAGS-tst-oncex3.c += -fexceptions
1582 CFLAGS-tst-oncex4.c += -fexceptions
1583 +
1584 +ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed
1585 +LDFLAGS-tst-cancelx2 += $(ldflags-libgcc_s)
1586 +LDFLAGS-tst-cancelx3 += $(ldflags-libgcc_s)
1587 +LDFLAGS-tst-cancelx4 += $(ldflags-libgcc_s)
1588 +LDFLAGS-tst-cancelx5 += $(ldflags-libgcc_s)
1589 +LDFLAGS-tst-cancelx6 += $(ldflags-libgcc_s)
1590 +LDFLAGS-tst-cancelx7 += $(ldflags-libgcc_s)
1591 +LDFLAGS-tst-cancelx8 += $(ldflags-libgcc_s)
1592 +LDFLAGS-tst-cancelx9 += $(ldflags-libgcc_s)
1593 +LDFLAGS-tst-cancelx10 += $(ldflags-libgcc_s)
1594 +LDFLAGS-tst-cancelx11 += $(ldflags-libgcc_s)
1595 +LDFLAGS-tst-cancelx12 += $(ldflags-libgcc_s)
1596 +LDFLAGS-tst-cancelx13 += $(ldflags-libgcc_s)
1597 +LDFLAGS-tst-cancelx14 += $(ldflags-libgcc_s)
1598 +LDFLAGS-tst-cancelx15 += $(ldflags-libgcc_s)
1599 +LDFLAGS-tst-cancelx16 += $(ldflags-libgcc_s)
1600 +LDFLAGS-tst-cancelx17 += $(ldflags-libgcc_s)
1601 +LDFLAGS-tst-cancelx18 += $(ldflags-libgcc_s)
1602 +LDFLAGS-tst-cancelx20 += $(ldflags-libgcc_s)
1603 +LDFLAGS-tst-cancelx21 += $(ldflags-libgcc_s)
1604 +LDFLAGS-tst-cleanupx0 += $(ldflags-libgcc_s)
1605 +LDFLAGS-tst-cleanupx1 += $(ldflags-libgcc_s)
1606 +LDFLAGS-tst-cleanupx2 += $(ldflags-libgcc_s)
1607 +LDFLAGS-tst-cleanupx3 += $(ldflags-libgcc_s)
1608 +LDFLAGS-tst-cleanupx4 += $(ldflags-libgcc_s)
1609 +LDFLAGS-tst-oncex3 += $(ldflags-libgcc_s)
1610 +LDFLAGS-tst-oncex4 += $(ldflags-libgcc_s)
1611 +
1612 CFLAGS-tst-align.c += $(stack-align-test-flags)
1613 CFLAGS-tst-align3.c += $(stack-align-test-flags)
1614 CFLAGS-tst-initializers1.c = -W -Wall -Werror
1615 --- nptl.orig/pthread_barrier_wait.c
1616 +++ nptl/pthread_barrier_wait.c
1617 @@ -64,7 +64,7 @@
1618 do
1619 lll_futex_wait (&ibarrier->curr_event, event,
1620 ibarrier->private ^ FUTEX_PRIVATE_FLAG);
1621 - while (event == ibarrier->curr_event);
1622 + while (event == *(volatile unsigned int *)&ibarrier->curr_event);
1623 }
1624
1625 /* Make sure the init_count is stored locally or in a register. */
1626 --- nptl/sysdeps/pthread/Makefile.orig
1627 +++ nptl/sysdeps/pthread/Makefile
1628 @@ -41,7 +41,9 @@
1629
1630 ifeq ($(have-forced-unwind),yes)
1631 tests += tst-mqueue8x
1632 +ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed
1633 CFLAGS-tst-mqueue8x.c += -fexceptions
1634 +LDFLAGS-tst-mqueue8x += $(ldflags-libgcc_s)
1635 endif
1636 endif
1637
1638 --- stdio-common/Makefile.orig
1639 +++ stdio-common/Makefile
1640 @@ -79,7 +79,7 @@
1641 $(SHELL) -e tst-printf.sh $(common-objpfx) '$(run-program-prefix)'
1642 endif
1643
1644 -CFLAGS-vfprintf.c = -Wno-uninitialized
1645 +CFLAGS-vfprintf.c = -Wno-uninitialized -fno-delayed-branch
1646 CFLAGS-vfwprintf.c = -Wno-uninitialized
1647 CFLAGS-tst-printf.c = -Wno-format
1648 CFLAGS-tstdiomisc.c = -Wno-format
1649 --- sunrpc/clnt_udp.c.orig
1650 +++ sunrpc/clnt_udp.c
1651 @@ -419,7 +419,7 @@
1652 while (inlen < 0 && errno == EINTR);
1653 if (inlen < 0)
1654 {
1655 - if (errno == EWOULDBLOCK)
1656 + if (errno == EWOULDBLOCK || errno == EAGAIN)
1657 continue;
1658 cu->cu_error.re_errno = errno;
1659 return (cu->cu_error.re_status = RPC_CANTRECV);
1660
1661
1662
1663 1.1 src/patchsets/glibc/2.13/1505_hppa_glibc-2.11-hppa-nptl.patch
1664
1665 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1505_hppa_glibc-2.11-hppa-nptl.patch?rev=1.1&view=markup
1666 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1505_hppa_glibc-2.11-hppa-nptl.patch?rev=1.1&content-type=text/plain
1667
1668 Index: 1505_hppa_glibc-2.11-hppa-nptl.patch
1669 ===================================================================
1670 http://bugs.gentoo.org/301642
1671
1672 diff -uNr glibc-2.11.2.orig/ChangeLog glibc-2.11.2/ChangeLog
1673 --- glibc-2.11.2.orig/ChangeLog 2010-07-25 21:58:31.317129388 +0200
1674 +++ glibc-2.11.2/ChangeLog 2010-07-25 22:01:24.035435289 +0200
1675 @@ -211,6 +211,14 @@
1676 * io/ftw.c (ftw_startup): Close descriptor for initial directory
1677 after changing back to it.
1678
1679 +2010-02-09 Carlos O'Donell <carlos@××××××××××××.com>
1680 +
1681 + * elf/dl-fptr.c: Update copyright year.
1682 + (struct local): Don't initialize root.
1683 + (make_fdesc): Initialize root table pointer.
1684 + (_dl_fptr_init): New function.
1685 + * sysdeps/generic/dl-fptr.h (_dl_fptr_init): New prototype.
1686 +
1687 2010-02-09 Ulrich Drepper <drepper@××××××.com>
1688
1689 * sysdeps/i386/lshift.S: Fix unwind information.
1690 diff -uNr glibc-2.11.2.orig/elf/dl-fptr.c glibc-2.11.2/elf/dl-fptr.c
1691 --- glibc-2.11.2.orig/elf/dl-fptr.c 2010-07-25 21:58:31.241131107 +0200
1692 +++ glibc-2.11.2/elf/dl-fptr.c 2010-07-25 22:00:54.323726976 +0200
1693 @@ -1,5 +1,5 @@
1694 /* Manage function descriptors. Generic version.
1695 - Copyright (C) 1999-2004, 2006 Free Software Foundation, Inc.
1696 + Copyright (C) 1999-2004, 2006, 2010 Free Software Foundation, Inc.
1697 This file is part of the GNU C Library.
1698
1699 The GNU C Library is free software; you can redistribute it and/or
1700 @@ -56,7 +56,8 @@
1701 }
1702 local =
1703 {
1704 - .root = &local.boot_table,
1705 + /* Address of .boot_table is not known until runtime. */
1706 + .root = 0,
1707 .npages = 2,
1708 .boot_table =
1709 {
1710 @@ -93,6 +94,17 @@
1711 return new_table;
1712 }
1713
1714 +/* Must call _dl_fptr_init before using any other function. */
1715 +void
1716 +_dl_fptr_init (void)
1717 +{
1718 + struct local *l;
1719 +
1720 + ELF_MACHINE_LOAD_ADDRESS (l, local);
1721 + /* Initialize root once. */
1722 + if (__builtin_expect (l->root == 0, 0))
1723 + l->root = &l->boot_table;
1724 +}
1725
1726 static ElfW(Addr)
1727 make_fdesc (ElfW(Addr) ip, ElfW(Addr) gp)
1728 diff -uNr glibc-2.11.2.orig/nptl/ChangeLog glibc-2.11.2/nptl/ChangeLog
1729 --- glibc-2.11.2.orig/nptl/ChangeLog 2010-07-25 21:58:30.721135832 +0200
1730 +++ glibc-2.11.2/nptl/ChangeLog 2010-07-25 22:00:00.884251052 +0200
1731 @@ -1,3 +1,21 @@
1732 +2010-02-09 Carlos O'Donell <carlos@××××××××××××.com>
1733 +
1734 + * allocatestack.c (allocate_stack): Define
1735 + _STACK_GROWS_DOWN and _STACK_GROWS_UP cases for
1736 + user defined stacks. Adjust define indentation.
1737 + Remove assert for _STACK_GROWS_UP case.
1738 + * pthread_create.c: Update coprigyt year.
1739 + (start_thread): Implement _STACK_GROWS_UP case.
1740 + * pthread_attr_getstack.c: Update copyright year.
1741 + (__pthread_attr_getstack): Define _STACK_GROWS_UP
1742 + case.
1743 + * pthread_attr_setstack.c: Update copyright year.
1744 + (__pthread_attr_setstack): Define _STACK_GROWS_UP
1745 + case.
1746 + (__old_pthread_attr_setstack): Likewise.
1747 + * pthread_getattr_np: Update copyright year.
1748 + (pthread_getattr_np): Define _STACK_GROWS_UP cases.
1749 +
1750 2009-11-27 Andreas Schwab <schwab@××××××.com>
1751
1752 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
1753 diff -uNr glibc-2.11.2.orig/nptl/allocatestack.c glibc-2.11.2/nptl/allocatestack.c
1754 --- glibc-2.11.2.orig/nptl/allocatestack.c 2010-07-25 21:58:30.669136153 +0200
1755 +++ glibc-2.11.2/nptl/allocatestack.c 2010-07-25 21:59:05.528795435 +0200
1756 @@ -1,4 +1,4 @@
1757 -/* Copyright (C) 2002-2007, 2009 Free Software Foundation, Inc.
1758 +/* Copyright (C) 2002-2007, 2009, 2010 Free Software Foundation, Inc.
1759 This file is part of the GNU C Library.
1760 Contributed by Ulrich Drepper <drepper@××××××.com>, 2002.
1761
1762 @@ -354,6 +354,15 @@
1763 if (__builtin_expect (attr->flags & ATTR_FLAG_STACKADDR, 0))
1764 {
1765 uintptr_t adj;
1766 +#if _STACK_GROWS_DOWN
1767 + char * stackaddr = (char *) attr->stackaddr;
1768 +#else
1769 + /* Assume the same layout as the _STACK_GROWS_DOWN case,
1770 + with struct pthread at the top of the stack block.
1771 + Later we adjust the guard location and stack address
1772 + to match the _STACK_GROWS_UP case. */
1773 + char * stackaddr = (char *) attr->stackaddr + attr->stacksize;
1774 +#endif
1775
1776 /* If the user also specified the size of the stack make sure it
1777 is large enough. */
1778 @@ -363,11 +372,11 @@
1779
1780 /* Adjust stack size for alignment of the TLS block. */
1781 #if TLS_TCB_AT_TP
1782 - adj = ((uintptr_t) attr->stackaddr - TLS_TCB_SIZE)
1783 + adj = ((uintptr_t) stackaddr - TLS_TCB_SIZE)
1784 & __static_tls_align_m1;
1785 assert (size > adj + TLS_TCB_SIZE);
1786 #elif TLS_DTV_AT_TP
1787 - adj = ((uintptr_t) attr->stackaddr - __static_tls_size)
1788 + adj = ((uintptr_t) stackaddr - __static_tls_size)
1789 & __static_tls_align_m1;
1790 assert (size > adj);
1791 #endif
1792 @@ -377,10 +386,10 @@
1793 the stack. It is the user's responsibility to do this if it
1794 is wanted. */
1795 #if TLS_TCB_AT_TP
1796 - pd = (struct pthread *) ((uintptr_t) attr->stackaddr
1797 + pd = (struct pthread *) ((uintptr_t) stackaddr
1798 - TLS_TCB_SIZE - adj);
1799 #elif TLS_DTV_AT_TP
1800 - pd = (struct pthread *) (((uintptr_t) attr->stackaddr
1801 + pd = (struct pthread *) (((uintptr_t) stackaddr
1802 - __static_tls_size - adj)
1803 - TLS_PRE_TCB_SIZE);
1804 #endif
1805 @@ -392,7 +401,7 @@
1806 pd->specific[0] = pd->specific_1stblock;
1807
1808 /* Remember the stack-related values. */
1809 - pd->stackblock = (char *) attr->stackaddr - size;
1810 + pd->stackblock = (char *) stackaddr - size;
1811 pd->stackblock_size = size;
1812
1813 /* This is a user-provided stack. It will not be queued in the
1814 @@ -617,7 +626,7 @@
1815 char *guard = mem + (((size - guardsize) / 2) & ~pagesize_m1);
1816 #elif _STACK_GROWS_DOWN
1817 char *guard = mem;
1818 -# elif _STACK_GROWS_UP
1819 +#elif _STACK_GROWS_UP
1820 char *guard = (char *) (((uintptr_t) pd - guardsize) & ~pagesize_m1);
1821 #endif
1822 if (mprotect (guard, guardsize, PROT_NONE) != 0)
1823 @@ -716,7 +725,6 @@
1824 *stack = stacktop;
1825 #elif _STACK_GROWS_UP
1826 *stack = pd->stackblock;
1827 - assert (*stack > 0);
1828 #endif
1829
1830 return 0;
1831 diff -uNr glibc-2.11.2.orig/nptl/pthread_attr_getstack.c glibc-2.11.2/nptl/pthread_attr_getstack.c
1832 --- glibc-2.11.2.orig/nptl/pthread_attr_getstack.c 2010-07-25 21:58:30.717135358 +0200
1833 +++ glibc-2.11.2/nptl/pthread_attr_getstack.c 2010-07-25 21:59:05.532796982 +0200
1834 @@ -1,4 +1,4 @@
1835 -/* Copyright (C) 2002 Free Software Foundation, Inc.
1836 +/* Copyright (C) 2002, 2010 Free Software Foundation, Inc.
1837 This file is part of the GNU C Library.
1838 Contributed by Ulrich Drepper <drepper@××××××.com>, 2002.
1839
1840 @@ -33,7 +33,11 @@
1841 iattr = (struct pthread_attr *) attr;
1842
1843 /* Store the result. */
1844 +#ifdef _STACK_GROWS_DOWN
1845 *stackaddr = (char *) iattr->stackaddr - iattr->stacksize;
1846 +#else
1847 + *stackaddr = (char *) iattr->stackaddr;
1848 +#endif
1849 *stacksize = iattr->stacksize;
1850
1851 return 0;
1852 diff -uNr glibc-2.11.2.orig/nptl/pthread_attr_setstack.c glibc-2.11.2/nptl/pthread_attr_setstack.c
1853 --- glibc-2.11.2.orig/nptl/pthread_attr_setstack.c 2010-07-25 21:58:30.717135358 +0200
1854 +++ glibc-2.11.2/nptl/pthread_attr_setstack.c 2010-07-25 21:59:05.532796982 +0200
1855 @@ -1,4 +1,4 @@
1856 -/* Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
1857 +/* Copyright (C) 2002, 2003, 2006, 2010 Free Software Foundation, Inc.
1858 This file is part of the GNU C Library.
1859 Contributed by Ulrich Drepper <drepper@××××××.com>, 2002.
1860
1861 @@ -48,7 +48,11 @@
1862 #endif
1863
1864 iattr->stacksize = stacksize;
1865 +#if _STACK_GROWS_DOWN
1866 iattr->stackaddr = (char *) stackaddr + stacksize;
1867 +#else
1868 + iattr->stackaddr = (char *) stackaddr;
1869 +#endif
1870 iattr->flags |= ATTR_FLAG_STACKADDR;
1871
1872 return 0;
1873 @@ -81,7 +85,11 @@
1874 # endif
1875
1876 iattr->stacksize = stacksize;
1877 +#if _STACK_GROWS_DOWN
1878 iattr->stackaddr = (char *) stackaddr + stacksize;
1879 +#else
1880 + iattr->stackaddr = (char *) stackaddr;
1881 +#endif
1882 iattr->flags |= ATTR_FLAG_STACKADDR;
1883
1884 return 0;
1885 diff -uNr glibc-2.11.2.orig/nptl/pthread_create.c glibc-2.11.2/nptl/pthread_create.c
1886 --- glibc-2.11.2.orig/nptl/pthread_create.c 2010-07-25 21:58:30.713135617 +0200
1887 +++ glibc-2.11.2/nptl/pthread_create.c 2010-07-25 21:59:05.536794818 +0200
1888 @@ -1,4 +1,4 @@
1889 -/* Copyright (C) 2002-2007,2008,2009 Free Software Foundation, Inc.
1890 +/* Copyright (C) 2002-2007,2008,2009,2010 Free Software Foundation, Inc.
1891 This file is part of the GNU C Library.
1892 Contributed by Ulrich Drepper <drepper@××××××.com>, 2002.
1893
1894 @@ -383,12 +383,18 @@
1895 #ifdef _STACK_GROWS_DOWN
1896 char *sp = CURRENT_STACK_FRAME;
1897 size_t freesize = (sp - (char *) pd->stackblock) & ~pagesize_m1;
1898 -#else
1899 -# error "to do"
1900 -#endif
1901 assert (freesize < pd->stackblock_size);
1902 if (freesize > PTHREAD_STACK_MIN)
1903 madvise (pd->stackblock, freesize - PTHREAD_STACK_MIN, MADV_DONTNEED);
1904 +#else
1905 + char *sp = CURRENT_STACK_FRAME;
1906 + size_t freesize = ((char *) pd->stackblock + pd->stackblock_size - sp)
1907 + & ~pagesize_m1;
1908 + void *freeblock = (void *) (sp + PTHREAD_STACK_MIN);
1909 + assert (freesize < pd->stackblock_size);
1910 + if (freesize > PTHREAD_STACK_MIN)
1911 + madvise (freeblock, freesize - PTHREAD_STACK_MIN, MADV_DONTNEED);
1912 +#endif
1913
1914 /* If the thread is detached free the TCB. */
1915 if (IS_DETACHED (pd))
1916 diff -uNr glibc-2.11.2.orig/nptl/pthread_getattr_np.c glibc-2.11.2/nptl/pthread_getattr_np.c
1917 --- glibc-2.11.2.orig/nptl/pthread_getattr_np.c 2010-07-25 21:58:30.713135617 +0200
1918 +++ glibc-2.11.2/nptl/pthread_getattr_np.c 2010-07-25 21:59:05.536794818 +0200
1919 @@ -1,4 +1,5 @@
1920 -/* Copyright (C) 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
1921 +/* Copyright (C) 2002, 2003, 2004, 2006, 2007,
1922 + 2010 Free Software Foundation, Inc.
1923 This file is part of the GNU C Library.
1924 Contributed by Ulrich Drepper <drepper@××××××.com>, 2002.
1925
1926 @@ -61,7 +62,11 @@
1927 if (__builtin_expect (thread->stackblock != NULL, 1))
1928 {
1929 iattr->stacksize = thread->stackblock_size;
1930 +#ifdef _STACK_GROWS_DOWN
1931 iattr->stackaddr = (char *) thread->stackblock + iattr->stacksize;
1932 +#else
1933 + iattr->stackaddr = (char *) thread->stackblock;
1934 +#endif
1935 }
1936 else
1937 {
1938 @@ -110,13 +115,21 @@
1939 {
1940 /* Found the entry. Now we have the info we need. */
1941 iattr->stacksize = rl.rlim_cur;
1942 +#ifdef _STACK_GROWS_DOWN
1943 iattr->stackaddr = (void *) to;
1944
1945 /* The limit might be too high. */
1946 if ((size_t) iattr->stacksize
1947 > (size_t) iattr->stackaddr - last_to)
1948 iattr->stacksize = (size_t) iattr->stackaddr - last_to;
1949 +#else
1950 + iattr->stackaddr = (void *) from;
1951
1952 + /* The limit might be too high. */
1953 + if ((size_t) iattr->stacksize
1954 + > to - (size_t) iattr->stackaddr)
1955 + iattr->stacksize = to - (size_t) iattr->stackaddr;
1956 +#endif
1957 /* We succeed and no need to look further. */
1958 ret = 0;
1959 break;
1960 diff -uNr glibc-2.11.2.orig/ports/ChangeLog.hppa glibc-2.11.2/ports/ChangeLog.hppa
1961 --- glibc-2.11.2.orig/ports/ChangeLog.hppa 2010-07-25 21:58:30.213140619 +0200
1962 +++ glibc-2.11.2/ports/ChangeLog.hppa 2010-07-25 22:02:52.062583751 +0200
1963 @@ -1,3 +1,8 @@
1964 +2010-02-09 Carlos O'Donell <carlos@××××××××××××.com>
1965 +
1966 + * sysdeps/hppa/dl-machine.h (ELF_MACHINE_BEFORE_RTLD_RELOC):
1967 + Call _dl_fptr_init.
1968 +
1969 2009-11-15 Carlos O'Donell <carlos@××××××××××××.com>
1970
1971 [BZ #6676]
1972 diff -uNr glibc-2.11.2.orig/ports/sysdeps/hppa/dl-machine.h glibc-2.11.2/ports/sysdeps/hppa/dl-machine.h
1973 --- glibc-2.11.2.orig/ports/sysdeps/hppa/dl-machine.h 2010-07-25 21:58:30.189140390 +0200
1974 +++ glibc-2.11.2/ports/sysdeps/hppa/dl-machine.h 2010-07-25 22:02:25.502848298 +0200
1975 @@ -64,7 +64,8 @@
1976 }
1977
1978 #define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info) \
1979 - __hppa_init_bootstrap_fdesc_table (&bootstrap_map);
1980 + __hppa_init_bootstrap_fdesc_table (&bootstrap_map); \
1981 + _dl_fptr_init();
1982
1983 /* Return nonzero iff ELF header is compatible with the running host. */
1984 static inline int
1985 diff -uNr glibc-2.11.2.orig/sysdeps/generic/dl-fptr.h glibc-2.11.2/sysdeps/generic/dl-fptr.h
1986 --- glibc-2.11.2.orig/sysdeps/generic/dl-fptr.h 2010-07-25 21:58:30.525138223 +0200
1987 +++ glibc-2.11.2/sysdeps/generic/dl-fptr.h 2010-07-25 22:00:54.323726976 +0200
1988 @@ -40,6 +40,9 @@
1989
1990 extern ElfW(Addr) _dl_boot_fptr_table [];
1991
1992 +/* Must be called before any other function. */
1993 +extern void _dl_fptr_init (void);
1994 +
1995 extern ElfW(Addr) _dl_make_fptr (struct link_map *, const ElfW(Sym) *,
1996 ElfW(Addr));
1997
1998
1999
2000
2001 1.1 src/patchsets/glibc/2.13/1509_all_glibc-2.11-hppa-SOCK_CLOEXEC.patch
2002
2003 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1509_all_glibc-2.11-hppa-SOCK_CLOEXEC.patch?rev=1.1&view=markup
2004 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1509_all_glibc-2.11-hppa-SOCK_CLOEXEC.patch?rev=1.1&content-type=text/plain
2005
2006 Index: 1509_all_glibc-2.11-hppa-SOCK_CLOEXEC.patch
2007 ===================================================================
2008 CLOEXEC and NONBLOCK values are different on hppa, so it needs its own headers
2009
2010 https://bugs.gentoo.org/331119
2011
2012 --- ports/sysdeps/unix/sysv/linux/hppa/sys/epoll.h
2013 +++ ports/sysdeps/unix/sysv/linux/hppa/sys/epoll.h
2014 @@ -0,0 +1,144 @@
2015 +/* Copyright (C) 2002-2006, 2007, 2008, 2009 Free Software Foundation, Inc.
2016 + This file is part of the GNU C Library.
2017 +
2018 + The GNU C Library is free software; you can redistribute it and/or
2019 + modify it under the terms of the GNU Lesser General Public
2020 + License as published by the Free Software Foundation; either
2021 + version 2.1 of the License, or (at your option) any later version.
2022 +
2023 + The GNU C Library is distributed in the hope that it will be useful,
2024 + but WITHOUT ANY WARRANTY; without even the implied warranty of
2025 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2026 + Lesser General Public License for more details.
2027 +
2028 + You should have received a copy of the GNU Lesser General Public
2029 + License along with the GNU C Library; if not, write to the Free
2030 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
2031 + 02111-1307 USA. */
2032 +
2033 +#ifndef _SYS_EPOLL_H
2034 +#define _SYS_EPOLL_H 1
2035 +
2036 +#include <stdint.h>
2037 +#include <sys/types.h>
2038 +
2039 +/* Get __sigset_t. */
2040 +#include <bits/sigset.h>
2041 +
2042 +#ifndef __sigset_t_defined
2043 +# define __sigset_t_defined
2044 +typedef __sigset_t sigset_t;
2045 +#endif
2046 +
2047 +
2048 +/* Flags to be passed to epoll_create1. */
2049 +enum
2050 + {
2051 + EPOLL_CLOEXEC = 010000000,
2052 +#define EPOLL_CLOEXEC EPOLL_CLOEXEC
2053 + EPOLL_NONBLOCK = 00200004 /* HPUX has separate NDELAY & NONBLOCK */
2054 +#define EPOLL_NONBLOCK EPOLL_NONBLOCK
2055 + };
2056 +
2057 +
2058 +enum EPOLL_EVENTS
2059 + {
2060 + EPOLLIN = 0x001,
2061 +#define EPOLLIN EPOLLIN
2062 + EPOLLPRI = 0x002,
2063 +#define EPOLLPRI EPOLLPRI
2064 + EPOLLOUT = 0x004,
2065 +#define EPOLLOUT EPOLLOUT
2066 + EPOLLRDNORM = 0x040,
2067 +#define EPOLLRDNORM EPOLLRDNORM
2068 + EPOLLRDBAND = 0x080,
2069 +#define EPOLLRDBAND EPOLLRDBAND
2070 + EPOLLWRNORM = 0x100,
2071 +#define EPOLLWRNORM EPOLLWRNORM
2072 + EPOLLWRBAND = 0x200,
2073 +#define EPOLLWRBAND EPOLLWRBAND
2074 + EPOLLMSG = 0x400,
2075 +#define EPOLLMSG EPOLLMSG
2076 + EPOLLERR = 0x008,
2077 +#define EPOLLERR EPOLLERR
2078 + EPOLLHUP = 0x010,
2079 +#define EPOLLHUP EPOLLHUP
2080 + EPOLLRDHUP = 0x2000,
2081 +#define EPOLLRDHUP EPOLLRDHUP
2082 + EPOLLONESHOT = (1 << 30),
2083 +#define EPOLLONESHOT EPOLLONESHOT
2084 + EPOLLET = (1 << 31)
2085 +#define EPOLLET EPOLLET
2086 + };
2087 +
2088 +
2089 +/* Valid opcodes ( "op" parameter ) to issue to epoll_ctl(). */
2090 +#define EPOLL_CTL_ADD 1 /* Add a file descriptor to the interface. */
2091 +#define EPOLL_CTL_DEL 2 /* Remove a file descriptor from the interface. */
2092 +#define EPOLL_CTL_MOD 3 /* Change file descriptor epoll_event structure. */
2093 +
2094 +
2095 +typedef union epoll_data
2096 +{
2097 + void *ptr;
2098 + int fd;
2099 + uint32_t u32;
2100 + uint64_t u64;
2101 +} epoll_data_t;
2102 +
2103 +struct epoll_event
2104 +{
2105 + uint32_t events; /* Epoll events */
2106 + epoll_data_t data; /* User data variable */
2107 +};
2108 +
2109 +
2110 +__BEGIN_DECLS
2111 +
2112 +/* Creates an epoll instance. Returns an fd for the new instance.
2113 + The "size" parameter is a hint specifying the number of file
2114 + descriptors to be associated with the new instance. The fd
2115 + returned by epoll_create() should be closed with close(). */
2116 +extern int epoll_create (int __size) __THROW;
2117 +
2118 +/* Same as epoll_create but with an FLAGS parameter. The unused SIZE
2119 + parameter has been dropped. */
2120 +extern int epoll_create1 (int __flags) __THROW;
2121 +
2122 +
2123 +/* Manipulate an epoll instance "epfd". Returns 0 in case of success,
2124 + -1 in case of error ( the "errno" variable will contain the
2125 + specific error code ) The "op" parameter is one of the EPOLL_CTL_*
2126 + constants defined above. The "fd" parameter is the target of the
2127 + operation. The "event" parameter describes which events the caller
2128 + is interested in and any associated user data. */
2129 +extern int epoll_ctl (int __epfd, int __op, int __fd,
2130 + struct epoll_event *__event) __THROW;
2131 +
2132 +
2133 +/* Wait for events on an epoll instance "epfd". Returns the number of
2134 + triggered events returned in "events" buffer. Or -1 in case of
2135 + error with the "errno" variable set to the specific error code. The
2136 + "events" parameter is a buffer that will contain triggered
2137 + events. The "maxevents" is the maximum number of events to be
2138 + returned ( usually size of "events" ). The "timeout" parameter
2139 + specifies the maximum wait time in milliseconds (-1 == infinite).
2140 +
2141 + This function is a cancellation point and therefore not marked with
2142 + __THROW. */
2143 +extern int epoll_wait (int __epfd, struct epoll_event *__events,
2144 + int __maxevents, int __timeout);
2145 +
2146 +
2147 +/* Same as epoll_wait, but the thread's signal mask is temporarily
2148 + and atomically replaced with the one provided as parameter.
2149 +
2150 + This function is a cancellation point and therefore not marked with
2151 + __THROW. */
2152 +extern int epoll_pwait (int __epfd, struct epoll_event *__events,
2153 + int __maxevents, int __timeout,
2154 + __const __sigset_t *__ss);
2155 +
2156 +__END_DECLS
2157 +
2158 +#endif /* sys/epoll.h */
2159 --- ports/sysdeps/unix/sysv/linux/hppa/sys/eventfd.h
2160 +++ ports/sysdeps/unix/sysv/linux/hppa/sys/eventfd.h
2161 @@ -0,0 +1,54 @@
2162 +/* Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
2163 + This file is part of the GNU C Library.
2164 +
2165 + The GNU C Library is free software; you can redistribute it and/or
2166 + modify it under the terms of the GNU Lesser General Public
2167 + License as published by the Free Software Foundation; either
2168 + version 2.1 of the License, or (at your option) any later version.
2169 +
2170 + The GNU C Library is distributed in the hope that it will be useful,
2171 + but WITHOUT ANY WARRANTY; without even the implied warranty of
2172 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2173 + Lesser General Public License for more details.
2174 +
2175 + You should have received a copy of the GNU Lesser General Public
2176 + License along with the GNU C Library; if not, write to the Free
2177 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
2178 + 02111-1307 USA. */
2179 +
2180 +#ifndef _SYS_EVENTFD_H
2181 +#define _SYS_EVENTFD_H 1
2182 +
2183 +#include <stdint.h>
2184 +
2185 +
2186 +/* Type for event counter. */
2187 +typedef uint64_t eventfd_t;
2188 +
2189 +/* Flags for signalfd. */
2190 +enum
2191 + {
2192 + EFD_SEMAPHORE = 1,
2193 +#define EFD_SEMAPHORE EFD_SEMAPHORE
2194 + EFD_CLOEXEC = 010000000,
2195 +#define EFD_CLOEXEC EFD_CLOEXEC
2196 + EFD_NONBLOCK = 00200004 /* HPUX has separate NDELAY & NONBLOCK */
2197 +#define EFD_NONBLOCK EFD_NONBLOCK
2198 + };
2199 +
2200 +
2201 +__BEGIN_DECLS
2202 +
2203 +/* Return file descriptor for generic event channel. Set initial
2204 + value to COUNT. */
2205 +extern int eventfd (int __count, int __flags) __THROW;
2206 +
2207 +/* Read event counter and possibly wait for events. */
2208 +extern int eventfd_read (int __fd, eventfd_t *__value);
2209 +
2210 +/* Increment event counter. */
2211 +extern int eventfd_write (int __fd, eventfd_t __value);
2212 +
2213 +__END_DECLS
2214 +
2215 +#endif /* sys/eventfd.h */
2216 --- ports/sysdeps/unix/sysv/linux/hppa/sys/inotify.h
2217 +++ ports/sysdeps/unix/sysv/linux/hppa/sys/inotify.h
2218 @@ -0,0 +1,105 @@
2219 +/* Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
2220 + This file is part of the GNU C Library.
2221 +
2222 + The GNU C Library is free software; you can redistribute it and/or
2223 + modify it under the terms of the GNU Lesser General Public
2224 + License as published by the Free Software Foundation; either
2225 + version 2.1 of the License, or (at your option) any later version.
2226 +
2227 + The GNU C Library is distributed in the hope that it will be useful,
2228 + but WITHOUT ANY WARRANTY; without even the implied warranty of
2229 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2230 + Lesser General Public License for more details.
2231 +
2232 + You should have received a copy of the GNU Lesser General Public
2233 + License along with the GNU C Library; if not, write to the Free
2234 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
2235 + 02111-1307 USA. */
2236 +
2237 +#ifndef _SYS_INOTIFY_H
2238 +#define _SYS_INOTIFY_H 1
2239 +
2240 +#include <stdint.h>
2241 +
2242 +
2243 +/* Flags for the parameter of inotify_init1. */
2244 +enum
2245 + {
2246 + IN_CLOEXEC = 010000000,
2247 +#define IN_CLOEXEC IN_CLOEXEC
2248 + IN_NONBLOCK = 000200004 /* HPUX has separate NDELAY & NONBLOCK */
2249 +#define IN_NONBLOCK IN_NONBLOCK
2250 + };
2251 +
2252 +
2253 +/* Structure describing an inotify event. */
2254 +struct inotify_event
2255 +{
2256 + int wd; /* Watch descriptor. */
2257 + uint32_t mask; /* Watch mask. */
2258 + uint32_t cookie; /* Cookie to synchronize two events. */
2259 + uint32_t len; /* Length (including NULs) of name. */
2260 + char name __flexarr; /* Name. */
2261 +};
2262 +
2263 +
2264 +/* Supported events suitable for MASK parameter of INOTIFY_ADD_WATCH. */
2265 +#define IN_ACCESS 0x00000001 /* File was accessed. */
2266 +#define IN_MODIFY 0x00000002 /* File was modified. */
2267 +#define IN_ATTRIB 0x00000004 /* Metadata changed. */
2268 +#define IN_CLOSE_WRITE 0x00000008 /* Writtable file was closed. */
2269 +#define IN_CLOSE_NOWRITE 0x00000010 /* Unwrittable file closed. */
2270 +#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */
2271 +#define IN_OPEN 0x00000020 /* File was opened. */
2272 +#define IN_MOVED_FROM 0x00000040 /* File was moved from X. */
2273 +#define IN_MOVED_TO 0x00000080 /* File was moved to Y. */
2274 +#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */
2275 +#define IN_CREATE 0x00000100 /* Subfile was created. */
2276 +#define IN_DELETE 0x00000200 /* Subfile was deleted. */
2277 +#define IN_DELETE_SELF 0x00000400 /* Self was deleted. */
2278 +#define IN_MOVE_SELF 0x00000800 /* Self was moved. */
2279 +
2280 +/* Events sent by the kernel. */
2281 +#define IN_UNMOUNT 0x00002000 /* Backing fs was unmounted. */
2282 +#define IN_Q_OVERFLOW 0x00004000 /* Event queued overflowed. */
2283 +#define IN_IGNORED 0x00008000 /* File was ignored. */
2284 +
2285 +/* Helper events. */
2286 +#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */
2287 +#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */
2288 +
2289 +/* Special flags. */
2290 +#define IN_ONLYDIR 0x01000000 /* Only watch the path if it is a
2291 + directory. */
2292 +#define IN_DONT_FOLLOW 0x02000000 /* Do not follow a sym link. */
2293 +#define IN_MASK_ADD 0x20000000 /* Add to the mask of an already
2294 + existing watch. */
2295 +#define IN_ISDIR 0x40000000 /* Event occurred against dir. */
2296 +#define IN_ONESHOT 0x80000000 /* Only send event once. */
2297 +
2298 +/* All events which a program can wait on. */
2299 +#define IN_ALL_EVENTS (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE \
2300 + | IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM \
2301 + | IN_MOVED_TO | IN_CREATE | IN_DELETE \
2302 + | IN_DELETE_SELF | IN_MOVE_SELF)
2303 +
2304 +
2305 +__BEGIN_DECLS
2306 +
2307 +/* Create and initialize inotify instance. */
2308 +extern int inotify_init (void) __THROW;
2309 +
2310 +/* Create and initialize inotify instance. */
2311 +extern int inotify_init1 (int __flags) __THROW;
2312 +
2313 +/* Add watch of object NAME to inotify instance FD. Notify about
2314 + events specified by MASK. */
2315 +extern int inotify_add_watch (int __fd, const char *__name, uint32_t __mask)
2316 + __THROW;
2317 +
2318 +/* Remove the watch specified by WD from the inotify instance FD. */
2319 +extern int inotify_rm_watch (int __fd, int __wd) __THROW;
2320 +
2321 +__END_DECLS
2322 +
2323 +#endif /* sys/inotify.h */
2324 --- ports/sysdeps/unix/sysv/linux/hppa/sys/signalfd.h
2325 +++ ports/sysdeps/unix/sysv/linux/hppa/sys/signalfd.h
2326 @@ -0,0 +1,66 @@
2327 +/* Copyright (C) 2007, 2008 Free Software Foundation, Inc.
2328 + This file is part of the GNU C Library.
2329 +
2330 + The GNU C Library is free software; you can redistribute it and/or
2331 + modify it under the terms of the GNU Lesser General Public
2332 + License as published by the Free Software Foundation; either
2333 + version 2.1 of the License, or (at your option) any later version.
2334 +
2335 + The GNU C Library is distributed in the hope that it will be useful,
2336 + but WITHOUT ANY WARRANTY; without even the implied warranty of
2337 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2338 + Lesser General Public License for more details.
2339 +
2340 + You should have received a copy of the GNU Lesser General Public
2341 + License along with the GNU C Library; if not, write to the Free
2342 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
2343 + 02111-1307 USA. */
2344 +
2345 +#ifndef _SYS_SIGNALFD_H
2346 +#define _SYS_SIGNALFD_H 1
2347 +
2348 +#define __need_sigset_t
2349 +#include <signal.h>
2350 +#include <stdint.h>
2351 +
2352 +
2353 +struct signalfd_siginfo
2354 +{
2355 + uint32_t ssi_signo;
2356 + int32_t ssi_errno;
2357 + int32_t ssi_code;
2358 + uint32_t ssi_pid;
2359 + uint32_t ssi_uid;
2360 + int32_t ssi_fd;
2361 + uint32_t ssi_tid;
2362 + uint32_t ssi_band;
2363 + uint32_t ssi_overrun;
2364 + uint32_t ssi_trapno;
2365 + int32_t ssi_status;
2366 + int32_t ssi_int;
2367 + uint64_t ssi_ptr;
2368 + uint64_t ssi_utime;
2369 + uint64_t ssi_stime;
2370 + uint64_t ssi_addr;
2371 + uint8_t __pad[48];
2372 +};
2373 +
2374 +/* Flags for signalfd. */
2375 +enum
2376 + {
2377 + SFD_CLOEXEC = 010000000,
2378 +#define SFD_CLOEXEC SFD_CLOEXEC
2379 + SFD_NONBLOCK = 00200004 /* HPUX has separate NDELAY & NONBLOCK */
2380 +#define SFD_NONBLOCK SFD_NONBLOCK
2381 + };
2382 +
2383 +__BEGIN_DECLS
2384 +
2385 +/* Request notification for delivery of signals in MASK to be
2386 + performed using descriptor FD.*/
2387 +extern int signalfd (int __fd, const sigset_t *__mask, int __flags)
2388 + __THROW __nonnull ((2));
2389 +
2390 +__END_DECLS
2391 +
2392 +#endif /* sys/signalfd.h */
2393 --- ports/sysdeps/unix/sysv/linux/hppa/sys/timerfd.h
2394 +++ ports/sysdeps/unix/sysv/linux/hppa/sys/timerfd.h
2395 @@ -0,0 +1,60 @@
2396 +/* Copyright (C) 2008 Free Software Foundation, Inc.
2397 + This file is part of the GNU C Library.
2398 +
2399 + The GNU C Library is free software; you can redistribute it and/or
2400 + modify it under the terms of the GNU Lesser General Public
2401 + License as published by the Free Software Foundation; either
2402 + version 2.1 of the License, or (at your option) any later version.
2403 +
2404 + The GNU C Library is distributed in the hope that it will be useful,
2405 + but WITHOUT ANY WARRANTY; without even the implied warranty of
2406 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2407 + Lesser General Public License for more details.
2408 +
2409 + You should have received a copy of the GNU Lesser General Public
2410 + License along with the GNU C Library; if not, write to the Free
2411 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
2412 + 02111-1307 USA. */
2413 +
2414 +#ifndef _SYS_TIMERFD_H
2415 +#define _SYS_TIMERFD_H 1
2416 +
2417 +#include <time.h>
2418 +
2419 +
2420 +/* Bits to be set in the FLAGS parameter of `timerfd_create'. */
2421 +enum
2422 + {
2423 + TFD_CLOEXEC = 010000000,
2424 +#define TFD_CLOEXEC TFD_CLOEXEC
2425 + TFD_NONBLOCK = 000200004 /* HPUX has separate NDELAY & NONBLOCK */
2426 +#define TFD_NONBLOCK TFD_NONBLOCK
2427 + };
2428 +
2429 +
2430 +/* Bits to be set in the FLAGS parameter of `timerfd_settime'. */
2431 +enum
2432 + {
2433 + TFD_TIMER_ABSTIME = 1 << 0
2434 +#define TFD_TIMER_ABSTIME TFD_TIMER_ABSTIME
2435 + };
2436 +
2437 +
2438 +__BEGIN_DECLS
2439 +
2440 +/* Return file descriptor for new interval timer source. */
2441 +extern int timerfd_create (clockid_t __clock_id, int __flags) __THROW;
2442 +
2443 +/* Set next expiration time of interval timer source UFD to UTMR. If
2444 + FLAGS has the TFD_TIMER_ABSTIME flag set the timeout value is
2445 + absolute. Optionally return the old expiration time in OTMR. */
2446 +extern int timerfd_settime (int __ufd, int __flags,
2447 + __const struct itimerspec *__utmr,
2448 + struct itimerspec *__otmr) __THROW;
2449 +
2450 +/* Return the next expiration time of UFD. */
2451 +extern int timerfd_gettime (int __ufd, struct itimerspec *__otmr) __THROW;
2452 +
2453 +__END_DECLS
2454 +
2455 +#endif /* sys/timerfd.h */
2456
2457
2458
2459 1.1 src/patchsets/glibc/2.13/1530_all_glibc-m68k-sys-user.patch
2460
2461 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1530_all_glibc-m68k-sys-user.patch?rev=1.1&view=markup
2462 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/1530_all_glibc-m68k-sys-user.patch?rev=1.1&content-type=text/plain
2463
2464 Index: 1530_all_glibc-m68k-sys-user.patch
2465 ===================================================================
2466 copied from kernel as it is sanitized now
2467
2468 --- libc/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h
2469 +++ libc/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h
2470 @@ -0,0 +1,87 @@
2471 +#ifndef _SYS_USER_H
2472 +#define _SYS_USER_H
2473 +
2474 +/* Core file format: The core file is written in such a way that gdb
2475 + can understand it and provide useful information to the user (under
2476 + linux we use the 'trad-core' bfd). There are quite a number of
2477 + obstacles to being able to view the contents of the floating point
2478 + registers, and until these are solved you will not be able to view the
2479 + contents of them. Actually, you can read in the core file and look at
2480 + the contents of the user struct to find out what the floating point
2481 + registers contain.
2482 + The actual file contents are as follows:
2483 + UPAGE: 1 page consisting of a user struct that tells gdb what is present
2484 + in the file. Directly after this is a copy of the task_struct, which
2485 + is currently not used by gdb, but it may come in useful at some point.
2486 + All of the registers are stored as part of the upage. The upage should
2487 + always be only one page.
2488 + DATA: The data area is stored. We use current->end_text to
2489 + current->brk to pick up all of the user variables, plus any memory
2490 + that may have been malloced. No attempt is made to determine if a page
2491 + is demand-zero or if a page is totally unused, we just cover the entire
2492 + range. All of the addresses are rounded in such a way that an integral
2493 + number of pages is written.
2494 + STACK: We need the stack information in order to get a meaningful
2495 + backtrace. We need to write the data from (esp) to
2496 + current->start_stack, so we round each of these off in order to be able
2497 + to write an integer number of pages.
2498 + The minimum core file size is 3 pages, or 12288 bytes.
2499 +*/
2500 +
2501 +struct user_m68kfp_struct {
2502 + unsigned long fpregs[8*3]; /* fp0-fp7 registers */
2503 + unsigned long fpcntl[3]; /* fp control regs */
2504 +};
2505 +
2506 +/* This is the old layout of "struct pt_regs" as of Linux 1.x, and
2507 + is still the layout used by user (the new pt_regs doesn't have
2508 + all registers). */
2509 +struct user_regs_struct {
2510 + long d1,d2,d3,d4,d5,d6,d7;
2511 + long a0,a1,a2,a3,a4,a5,a6;
2512 + long d0;
2513 + long usp;
2514 + long orig_d0;
2515 + short stkadj;
2516 + short sr;
2517 + long pc;
2518 + short fmtvec;
2519 + short __fill;
2520 +};
2521 +
2522 +
2523 +/* When the kernel dumps core, it starts by dumping the user struct -
2524 + this will be used by gdb to figure out where the data and stack segments
2525 + are within the file, and what virtual addresses to use. */
2526 +struct user{
2527 +/* We start with the registers, to mimic the way that "memory" is returned
2528 + from the ptrace(3,...) function. */
2529 + struct user_regs_struct regs; /* Where the registers are actually stored */
2530 +/* ptrace does not yet supply these. Someday.... */
2531 + int u_fpvalid; /* True if math co-processor being used. */
2532 + /* for this mess. Not yet used. */
2533 + struct user_m68kfp_struct m68kfp; /* Math Co-processor registers. */
2534 +/* The rest of this junk is to help gdb figure out what goes where */
2535 + unsigned long int u_tsize; /* Text segment size (pages). */
2536 + unsigned long int u_dsize; /* Data segment size (pages). */
2537 + unsigned long int u_ssize; /* Stack segment size (pages). */
2538 + unsigned long start_code; /* Starting virtual address of text. */
2539 + unsigned long start_stack; /* Starting virtual address of stack area.
2540 + This is actually the bottom of the stack,
2541 + the top of the stack is always found in the
2542 + esp register. */
2543 + long int signal; /* Signal that caused the core dump. */
2544 + int reserved; /* No longer used */
2545 + struct user_regs_struct *u_ar0;
2546 + /* Used by gdb to help find the values for */
2547 + /* the registers. */
2548 + struct user_m68kfp_struct* u_fpstate; /* Math Co-processor pointer. */
2549 + unsigned long magic; /* To uniquely identify a core file */
2550 + char u_comm[32]; /* User command that was responsible */
2551 +};
2552 +#define NBPG 4096
2553 +#define UPAGES 1
2554 +#define HOST_TEXT_START_ADDR (u.start_code)
2555 +#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
2556 +
2557 +#endif
2558
2559
2560
2561 1.1 src/patchsets/glibc/2.13/3000_all_2.3.6-dl_execstack-PaX-support.patch
2562
2563 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/3000_all_2.3.6-dl_execstack-PaX-support.patch?rev=1.1&view=markup
2564 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/3000_all_2.3.6-dl_execstack-PaX-support.patch?rev=1.1&content-type=text/plain
2565
2566 Index: 3000_all_2.3.6-dl_execstack-PaX-support.patch
2567 ===================================================================
2568 With latest versions of glibc, a lot of apps failed on a PaX enabled
2569 system with:
2570 cannot enable executable stack as shared object requires: Permission denied
2571
2572 This is due to PaX 'exec-protecting' the stack, and ld.so then trying
2573 to make the stack executable due to some libraries not containing the
2574 PT_GNU_STACK section. Bug #32960. <azarah@g.o> (12 Nov 2003).
2575
2576 Patch also NPTL. Bug #116086. <kevquinn@g.o> (20 Dec 2005).
2577
2578 --- sysdeps/unix/sysv/linux/dl-execstack.c
2579 +++ sysdeps/unix/sysv/linux/dl-execstack.c
2580 @@ -63,7 +63,10 @@
2581 else
2582 # endif
2583 {
2584 - result = errno;
2585 + if (errno == EACCES) /* PAX is enabled */
2586 + result = 0;
2587 + else
2588 + result = errno;
2589 goto out;
2590 }
2591 }
2592 @@ -89,7 +92,12 @@
2593 page -= size;
2594 else
2595 {
2596 - if (errno != ENOMEM) /* Unexpected failure mode. */
2597 + if (errno == EACCES) /* PAX is enabled */
2598 + {
2599 + result = 0;
2600 + goto out;
2601 + }
2602 + else if (errno != ENOMEM) /* Unexpected failure mode. */
2603 {
2604 result = errno;
2605 goto out;
2606 @@ -115,7 +123,12 @@
2607 page += size;
2608 else
2609 {
2610 - if (errno != ENOMEM) /* Unexpected failure mode. */
2611 + if (errno == EACCES) /* PAX is enabled */
2612 + {
2613 + result = 0;
2614 + goto out;
2615 + }
2616 + else if (errno != ENOMEM) /* Unexpected failure mode. */
2617 {
2618 result = errno;
2619 goto out;
2620 --- nptl/allocatestack.c
2621 +++ nptl/allocatestack.c
2622 @@ -279,7 +279,8 @@
2623 size_t len = pd->stackblock_size - pd->guardsize;
2624 #endif
2625 if (mprotect (stack, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0)
2626 - return errno;
2627 + if (errno != EACCES) /* PAX is enabled */
2628 + return errno;
2629
2630 return 0;
2631 }
2632
2633
2634
2635 1.1 src/patchsets/glibc/2.13/3010_all_2.3.3_pre20040117-pt_pax.patch
2636
2637 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/3010_all_2.3.3_pre20040117-pt_pax.patch?rev=1.1&view=markup
2638 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/3010_all_2.3.3_pre20040117-pt_pax.patch?rev=1.1&content-type=text/plain
2639
2640 Index: 3010_all_2.3.3_pre20040117-pt_pax.patch
2641 ===================================================================
2642 --- elf/elf.h
2643 +++ elf/elf.h
2644 @@ -568,6 +568,7 @@
2645 #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */
2646 #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */
2647 #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */
2648 +#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */
2649 #define PT_LOSUNW 0x6ffffffa
2650 #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */
2651 #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */
2652 @@ -581,6 +582,18 @@
2653 #define PF_X (1 << 0) /* Segment is executable */
2654 #define PF_W (1 << 1) /* Segment is writable */
2655 #define PF_R (1 << 2) /* Segment is readable */
2656 +#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */
2657 +#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */
2658 +#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */
2659 +#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */
2660 +#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */
2661 +#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */
2662 +#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */
2663 +#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */
2664 +#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */
2665 +#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */
2666 +#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */
2667 +#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */
2668 #define PF_MASKOS 0x0ff00000 /* OS-specific */
2669 #define PF_MASKPROC 0xf0000000 /* Processor-specific */
2670
2671
2672
2673
2674 1.1 src/patchsets/glibc/2.13/3020_all_glibc-tests-sandbox-libdl-paths.patch
2675
2676 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/3020_all_glibc-tests-sandbox-libdl-paths.patch?rev=1.1&view=markup
2677 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/3020_all_glibc-tests-sandbox-libdl-paths.patch?rev=1.1&content-type=text/plain
2678
2679 Index: 3020_all_glibc-tests-sandbox-libdl-paths.patch
2680 ===================================================================
2681 when glibc runs its tests, it does so by invoking the local library loader.
2682 in Gentoo, we build/run inside of our "sandbox" which itself is linked against
2683 libdl (so that it can load libraries and pull out symbols). the trouble
2684 is that when you upgrade from an older glibc to the new one, often times
2685 internal symbols change name or abi. this is normally OK as you cannot use
2686 libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so
2687 we always say "keep all of the glibc libraries from the same build". but
2688 when glibc runs its tests, it uses dynamic paths to point to its new local
2689 copies of libraries. if the test doesnt use libdl, then glibc doesnt add
2690 its path, and when sandbox triggers the loading of libdl, glibc does so
2691 from the host system system. this gets us into the case of all libraries
2692 are from the locally compiled version of glibc except for libdl.so.
2693
2694 Fix by Wormo
2695
2696 http://bugs.gentoo.org/56898
2697
2698 --- libc/grp/tst_fgetgrent.sh
2699 +++ libc/grp/tst_fgetgrent.sh
2700 @@ -24,7 +24,8 @@
2701 rtld_installed_name=$1; shift
2702
2703 testout=${common_objpfx}/grp/tst_fgetgrent.out
2704 -library_path=${common_objpfx}
2705 +# make sure libdl is also in path in case sandbox is in use
2706 +library_path=${common_objpfx}:${common_objpfx}/dlfcn
2707
2708 result=0
2709
2710 --- libc/iconvdata/run-iconv-test.sh
2711 +++ libc/iconvdata/run-iconv-test.sh
2712 @@ -34,7 +34,7 @@
2713 export GCONV_PATH
2714
2715 # We have to have some directories in the library path.
2716 -LIBPATH=$codir:$codir/iconvdata
2717 +LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn
2718
2719 # How the start the iconv(1) program.
2720 ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \
2721 --- libc/iconvdata/tst-table.sh
2722 +++ libc/iconvdata/tst-table.sh
2723 @@ -59,8 +59,11 @@
2724 irreversible=${charset}.irreversible
2725 fi
2726
2727 +# make sure libdl is also in path in case sandbox is in use
2728 +library_path=${common_objpfx}:${common_objpfx}/dlfcn
2729 +
2730 # iconv in one direction.
2731 -${common_objpfx}elf/ld.so --library-path $common_objpfx \
2732 +${common_objpfx}elf/ld.so --library-path $library_path \
2733 ${objpfx}tst-table-from ${charset} \
2734 > ${objpfx}tst-${charset}.table
2735
2736 --- libc/intl/tst-codeset.sh
2737 +++ libc/intl/tst-codeset.sh
2738 @@ -37,6 +37,9 @@
2739 LOCPATH=${common_objpfx}localedata
2740 export LOCPATH
2741
2742 +# make sure libdl is also in path in case sandbox is in use
2743 +library_path=${common_objpfx}:${common_objpfx}/dlfcn
2744 +
2745 ${common_objpfx}elf/ld.so --library-path $common_objpfx \
2746 ${objpfx}tst-codeset > ${objpfx}tst-codeset.out
2747
2748 --- libc/intl/tst-gettext.sh
2749 +++ libc/intl/tst-gettext.sh
2750 @@ -51,9 +51,12 @@
2751 LOCPATH=${common_objpfx}localedata
2752 export LOCPATH
2753
2754 +# make sure libdl is also in path in case sandbox is in use
2755 +library_path=${common_objpfx}:${common_objpfx}/dlfcn
2756 +
2757 # Now run the test.
2758 MALLOC_TRACE=$malloc_trace LOCPATH=${objpfx}localedir:$LOCPATH \
2759 -${common_objpfx}elf/ld.so --library-path $common_objpfx \
2760 +${common_objpfx}elf/ld.so --library-path $library_path \
2761 ${objpfx}tst-gettext > ${objpfx}tst-gettext.out ${objpfx}domaindir
2762
2763 exit $?
2764 --- libc/intl/tst-gettext2.sh
2765 +++ libc/intl/tst-gettext2.sh
2766 @@ -65,8 +65,11 @@
2767 LOCPATH=${objpfx}domaindir
2768 export LOCPATH
2769
2770 +# make sure libdl is also in path in case sandbox is in use
2771 +library_path=${common_objpfx}:${common_objpfx}/dlfcn
2772 +
2773 # Now run the test.
2774 -${common_objpfx}elf/ld.so --library-path $common_objpfx \
2775 +${common_objpfx}elf/ld.so --library-path $library_path \
2776 ${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir &&
2777 cmp ${objpfx}tst-gettext2.out - <<EOF
2778 String1 - Lang1: 1st string
2779 --- libc/intl/tst-translit.sh
2780 +++ libc/intl/tst-translit.sh
2781 @@ -36,7 +36,10 @@
2782 LOCPATH=${common_objpfx}localedata
2783 export LOCPATH
2784
2785 -${common_objpfx}elf/ld.so --library-path $common_objpfx \
2786 +# make sure libdl is also in path in case sandbox is in use
2787 +library_path=${common_objpfx}:${common_objpfx}/dlfcn
2788 +
2789 +${common_objpfx}elf/ld.so --library-path $library_path \
2790 ${objpfx}tst-translit > ${objpfx}tst-translit.out ${objpfx}domaindir
2791
2792 exit $?
2793 --- libc/malloc/tst-mtrace.sh
2794 +++ libc/malloc/tst-mtrace.sh
2795 @@ -24,9 +24,12 @@
2796 status=0
2797 trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15
2798
2799 +# make sure libdl is also in path in case sandbox is in use
2800 +library_path=${common_objpfx}:${common_objpfx}/dlfcn
2801 +
2802 MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \
2803 LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \
2804 -${common_objpfx}elf/ld.so --library-path $common_objpfx \
2805 +${common_objpfx}elf/ld.so --library-path $library_path \
2806 ${common_objpfx}malloc/tst-mtrace || status=1
2807
2808 if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then
2809 --- libc/nptl/tst-tls6.sh
2810 +++ libc/nptl/tst-tls6.sh
2811 @@ -5,8 +5,8 @@
2812 rtld_installed_name=$1; shift
2813 logfile=$common_objpfx/nptl/tst-tls6.out
2814
2815 -# We have to find libc and nptl
2816 -library_path=${common_objpfx}:${common_objpfx}nptl
2817 +# We have to find libc and nptl (also libdl in case sandbox is in use)
2818 +library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn
2819 tst_tls5="${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
2820 ${common_objpfx}/nptl/tst-tls5"
2821
2822 --- libc/posix/globtest.sh
2823 +++ libc/posix/globtest.sh
2824 @@ -18,7 +18,7 @@
2825 esac
2826
2827 # We have to find the libc and the NSS modules.
2828 -library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod
2829 +library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod:${common_objpfx}/dlfcn
2830
2831 # Since we use `sort' we must make sure to use the same locale everywhere.
2832 LC_ALL=C
2833 --- libc/posix/tst-getconf.sh
2834 +++ libc/posix/tst-getconf.sh
2835 @@ -10,7 +10,10 @@
2836 else
2837 rtld_installed_name=$1; shift
2838 runit() {
2839 - ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} "$@"
2840 +
2841 + # make sure libdl is also in path in case sandbox is in use
2842 + library_path=${common_objpfx}:${common_objpfx}/dlfcn
2843 + ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} "$@"
2844 }
2845 fi
2846
2847 --- libc/posix/wordexp-tst.sh
2848 +++ libc/posix/wordexp-tst.sh
2849 @@ -19,8 +19,11 @@
2850 "
2851 export IFS
2852
2853 +# make sure libdl is also in path in case sandbox is in use
2854 +library_path=${common_objpfx}:${common_objpfx}/dlfcn
2855 +
2856 failed=0
2857 -${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \
2858 +${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
2859 ${common_objpfx}posix/wordexp-test '$*' > ${testout}1
2860 cat <<"EOF" | cmp - ${testout}1 >> $logfile || failed=1
2861 wordexp returned 0
2862
2863
2864
2865 1.1 src/patchsets/glibc/2.13/5063_all_glibc-dont-build-timezone.patch
2866
2867 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/5063_all_glibc-dont-build-timezone.patch?rev=1.1&view=markup
2868 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/5063_all_glibc-dont-build-timezone.patch?rev=1.1&content-type=text/plain
2869
2870 Index: 5063_all_glibc-dont-build-timezone.patch
2871 ===================================================================
2872 timezone data has been split into the package sys-libs/timezone-data
2873
2874 --- glibc/Makeconfig
2875 +++ glibc/Makeconfig
2876 @@ -922,1 +922,1 @@
2877 - crypt nss localedata timezone rt conform debug \
2878 + crypt nss localedata rt conform debug \
2879
2880
2881
2882 1.1 src/patchsets/glibc/2.13/6018_all_alpha-glibc-2.8-cache-shape.patch
2883
2884 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/6018_all_alpha-glibc-2.8-cache-shape.patch?rev=1.1&view=markup
2885 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/6018_all_alpha-glibc-2.8-cache-shape.patch?rev=1.1&content-type=text/plain
2886
2887 Index: 6018_all_alpha-glibc-2.8-cache-shape.patch
2888 ===================================================================
2889 older verisons of glibc would build dl-sysdep as shared-only and dl-support as
2890 static-only. alpha hooks in a cache variable via dl-auxv.h. newer versions of
2891 glibc build dl-sysdep as both shared and static which means we now have symbol
2892 duplication for static builds with dl-sysdep and dl-support. since dl-sysdep
2893 is both shared/static, there is no point in hooking dl-support anymore, so we
2894 can punt it.
2895
2896 --- ports/sysdeps/unix/sysv/linux/alpha/dl-support.c
2897 +++ ports/sysdeps/unix/sysv/linux/alpha/dl-support.c
2898 @@ -1,2 +0,0 @@
2899 -#include "dl-auxv.h"
2900 -#include <elf/dl-support.c>
2901
2902
2903
2904 1.1 src/patchsets/glibc/2.13/6020_all_alpha-fix-gcc-4.1-warnings.patch
2905
2906 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/6020_all_alpha-fix-gcc-4.1-warnings.patch?rev=1.1&view=markup
2907 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/6020_all_alpha-fix-gcc-4.1-warnings.patch?rev=1.1&content-type=text/plain
2908
2909 Index: 6020_all_alpha-fix-gcc-4.1-warnings.patch
2910 ===================================================================
2911 2006-05-30 Falk Hueffner <falk@××××××.org>
2912
2913 * sysdeps/unix/sysv/linux/alpha/ioperm.c: force the architecture
2914 to ev6 in assembly code.
2915
2916 {standard input}: Assembler messages:
2917 {standard input}:341: Error: macro requires $at register while noat in effect
2918 {standard input}:374: Error: macro requires $at register while noat in effect
2919 {standard input}:438: Error: macro requires $at register while noat in effect
2920 {standard input}:471: Error: macro requires $at register while noat in effect
2921 make[3]: *** [/tmp/buildd/glibc-2.3.6/build-tree/alpha-libc/misc/ioperm.o] Error 1
2922
2923 Hrm. gcc puts .arch ev4 into the .s, and this overrides -mev6 for as.
2924 I cannot really think of anything better than
2925
2926 ---
2927 ports/sysdeps/unix/sysv/linux/alpha/ioperm.c | 8 ++++----
2928 1 file changed, 4 insertions(+), 4 deletions(-)
2929
2930 --- ports/sysdeps/unix/sysv/linux/alpha/ioperm.c
2931 +++ ports/sysdeps/unix/sysv/linux/alpha/ioperm.c
2932 @@ -178,13 +178,13 @@
2933 static inline void
2934 stb_mb(unsigned char val, unsigned long addr)
2935 {
2936 - __asm__("stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val));
2937 + __asm__(".arch ev6; stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val));
2938 }
2939
2940 static inline void
2941 stw_mb(unsigned short val, unsigned long addr)
2942 {
2943 - __asm__("stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val));
2944 + __asm__(".arch ev6; stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val));
2945 }
2946
2947 static inline void
2948 @@ -356,7 +356,7 @@
2949 unsigned long int addr = dense_port_to_cpu_addr (port);
2950 unsigned char r;
2951
2952 - __asm__ ("ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr));
2953 + __asm__ (".arch ev6; ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr));
2954 return r;
2955 }
2956
2957 @@ -366,7 +366,7 @@
2958 unsigned long int addr = dense_port_to_cpu_addr (port);
2959 unsigned short r;
2960
2961 - __asm__ ("ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr));
2962 + __asm__ (".arch ev6; ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr));
2963 return r;
2964 }
2965
2966
2967
2968
2969 1.1 src/patchsets/glibc/2.13/6022_alpha_alpha-add-fdatasync-support.patch
2970
2971 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/6022_alpha_alpha-add-fdatasync-support.patch?rev=1.1&view=markup
2972 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/6022_alpha_alpha-add-fdatasync-support.patch?rev=1.1&content-type=text/plain
2973
2974 Index: 6022_alpha_alpha-add-fdatasync-support.patch
2975 ===================================================================
2976 2009-07-25 Aurelien Jarno <aurelien@×××××××.net>
2977
2978 * sysdeps/unix/sysv/linux/kernel-features.h: define
2979 __ASSUME_FDATASYNC.
2980 * sysdeps/unix/sysv/linux/fdatasync.c: New file.
2981 * sysdeps/unix/sysv/linux/Makefile: compile fdatasync.c with
2982 -fexceptions.
2983 * sysdeps/unix/sysv/linux/syscalls.list: Remove fdatasync.
2984
2985 ---
2986 sysdeps/unix/sysv/linux/Makefile | 1
2987 sysdeps/unix/sysv/linux/fdatasync.c | 69 ++++++++++++++++++++++++++++++
2988 sysdeps/unix/sysv/linux/kernel-features.h | 6 ++
2989 sysdeps/unix/sysv/linux/syscalls.list | 1
2990 4 files changed, 76 insertions(+), 1 deletion(-)
2991
2992 --- a/sysdeps/unix/sysv/linux/kernel-features.h
2993 +++ b/sysdeps/unix/sysv/linux/kernel-features.h
2994 @@ -474,6 +474,12 @@
2995 # define __ASSUME_FUTEX_LOCK_PI 1
2996 #endif
2997
2998 +/* Support for fsyncdata syscall was added in 2.6.22 on alpha, but it
2999 + was already present in 2.0 kernels on other architectures. */
3000 +#if (!defined __alpha || __LINUX_KERNEL_VERSION >= 0x020616)
3001 +# define __ASSUME_FDATASYNC 1
3002 +#endif
3003 +
3004 /* Support for utimensat syscall was added in 2.6.22, on SH
3005 only after 2.6.22-rc1. */
3006 #if __LINUX_KERNEL_VERSION >= 0x020616 \
3007 --- /dev/null
3008 +++ b/sysdeps/unix/sysv/linux/fdatasync.c
3009 @@ -0,0 +1,69 @@
3010 +/* fdatasync -- synchronize at least the data part of a file with
3011 + the underlying media. Linux version.
3012 +
3013 + Copyright (C) 2007 Free Software Foundation, Inc.
3014 + This file is part of the GNU C Library.
3015 +
3016 + The GNU C Library is free software; you can redistribute it and/or
3017 + modify it under the terms of the GNU Lesser General Public
3018 + License as published by the Free Software Foundation; either
3019 + version 2.1 of the License, or (at your option) any later version.
3020 +
3021 + The GNU C Library is distributed in the hope that it will be useful,
3022 + but WITHOUT ANY WARRANTY; without even the implied warranty of
3023 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3024 + Lesser General Public License for more details.
3025 +
3026 + You should have received a copy of the GNU Lesser General Public
3027 + License along with the GNU C Library; if not, write to the Free
3028 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
3029 + 02111-1307 USA. */
3030 +
3031 +#include <errno.h>
3032 +#include <unistd.h>
3033 +
3034 +#include <sysdep-cancel.h>
3035 +#include <sys/syscall.h>
3036 +#include <bp-checks.h>
3037 +
3038 +#include <kernel-features.h>
3039 +
3040 +#if defined __NR_fdatasync && !defined __ASSUME_FDATASYNC
3041 +static int __have_no_fdatasync;
3042 +#endif
3043 +
3044 +static int
3045 +do_fdatasync (int fd)
3046 +{
3047 +#ifdef __ASSUME_FDATASYNC
3048 + return INLINE_SYSCALL (fdatasync, 1, fd);
3049 +#elif defined __NR_fdatasync
3050 + if (!__builtin_expect (__have_no_fdatasync, 0))
3051 + {
3052 + int result = INLINE_SYSCALL (fdatasync, 1, fd);
3053 + if (__builtin_expect (result, 0) != -1 || errno != ENOSYS)
3054 + return result;
3055 +
3056 + __have_no_fdatasync = 1;
3057 + }
3058 +#endif
3059 + return INLINE_SYSCALL (fsync, 1, fd);
3060 +}
3061 +
3062 +int
3063 +__fdatasync (int fd)
3064 +{
3065 + if (SINGLE_THREAD_P)
3066 + return do_fdatasync (fd);
3067 +
3068 + int oldtype = LIBC_CANCEL_ASYNC ();
3069 +
3070 + int result = do_fdatasync (fd);
3071 +
3072 + LIBC_CANCEL_RESET (oldtype);
3073 +
3074 + return result;
3075 +}
3076 +
3077 +weak_alias (__fdatasync, fdatasync)
3078 +
3079 --- a/sysdeps/unix/sysv/linux/syscalls.list
3080 +++ b/sysdeps/unix/sysv/linux/syscalls.list
3081 @@ -11,7 +11,6 @@
3082 epoll_create1 EXTRA epoll_create1 i:i epoll_create1
3083 epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl
3084 epoll_wait EXTRA epoll_wait Ci:ipii epoll_wait
3085 -fdatasync - fdatasync Ci:i fdatasync
3086 flock - flock i:ii __flock flock
3087 fork - fork i: __libc_fork __fork fork
3088 get_kernel_syms EXTRA get_kernel_syms i:p get_kernel_syms
3089 --- a/sysdeps/unix/sysv/linux/Makefile
3090 +++ b/sysdeps/unix/sysv/linux/Makefile
3091 @@ -17,6 +17,7 @@
3092 eventfd eventfd_read eventfd_write
3093
3094
3095 +CFLAGS-fdatasync.c = -fexceptions
3096 CFLAGS-gethostid.c = -fexceptions
3097
3098 sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \
3099
3100
3101
3102 1.1 src/patchsets/glibc/2.13/6026_all_alpha-fix-rtld-fPIC.patch
3103
3104 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/6026_all_alpha-fix-rtld-fPIC.patch?rev=1.1&view=markup
3105 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/6026_all_alpha-fix-rtld-fPIC.patch?rev=1.1&content-type=text/plain
3106
3107 Index: 6026_all_alpha-fix-rtld-fPIC.patch
3108 ===================================================================
3109 2009-05-26 Aurelien Jarno <aurelien@×××××××.net>
3110
3111 * sysdeps/alpha/Makefile (CFLAGS-rtld.c): add $(PIC-ccflag).
3112 (CFLAGS-dl-close.c): Likewise.
3113
3114 --- ports/sysdeps/alpha/Makefile
3115 +++ ports/sysdeps/alpha/Makefile
3116 @@ -35,6 +35,9 @@
3117 ifeq ($(subdir),elf)
3118 # The ld.so startup code cannot use literals until it self-relocates.
3119 CFLAGS-rtld.c = -mbuild-constants
3120 +# It uses more than 64k for the small data area.
3121 +CFLAGS-rtld.c += $(PIC-ccflag)
3122 +CFLAGS-dl-close.c = $(PIC-ccflag)
3123 endif
3124
3125 # Build everything with full IEEE math support, and with dynamic rounding;
3126
3127
3128
3129 1.1 src/patchsets/glibc/2.13/6028_all_alpha-fix-memchr.patch
3130
3131 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/6028_all_alpha-fix-memchr.patch?rev=1.1&view=markup
3132 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/6028_all_alpha-fix-memchr.patch?rev=1.1&content-type=text/plain
3133
3134 Index: 6028_all_alpha-fix-memchr.patch
3135 ===================================================================
3136 From 926cf114f7ca2b19116cac005303040648e17e77 Mon Sep 17 00:00:00 2001
3137 From: Richard Henderson <rth@×××××××.net>
3138 Date: Wed, 15 Sep 2010 10:41:43 -0700
3139 Subject: [PATCH] alpha: rewrite memchr.
3140
3141 [BZ #12019]
3142 The new implementation does not read too much data.
3143
3144 2010-09-23 Richard Henderson <rth@××××××.com>
3145
3146 [BZ #12019]
3147 * sysdeps/alpha/alphaev6/memchr.S: Remove.
3148 * sysdeps/alpha/memchr.S: Remove.
3149 * sysdeps/alpha/memchr.c: New.
3150
3151 ---
3152 ChangeLog.alpha | 9 ++-
3153 sysdeps/alpha/alphaev6/memchr.S | 193 ---------------------------------------
3154 sysdeps/alpha/memchr.S | 176 -----------------------------------
3155 sysdeps/alpha/memchr.c | 175 +++++++++++++++++++++++++++++++++++
3156 4 files changed, 183 insertions(+), 370 deletions(-)
3157 delete mode 100644 sysdeps/alpha/alphaev6/memchr.S
3158 delete mode 100644 sysdeps/alpha/memchr.S
3159 create mode 100644 sysdeps/alpha/memchr.c
3160
3161 diff --git a/sysdeps/alpha/alphaev6/memchr.S b/sysdeps/alpha/alphaev6/memchr.S
3162 deleted file mode 100644
3163 index fe77cd8..0000000
3164 --- ports/sysdeps/alpha/alphaev6/memchr.S
3165 +++ /dev/null
3166 @@ -1,193 +0,0 @@
3167 -/* Copyright (C) 2000, 2003 Free Software Foundation, Inc.
3168 - This file is part of the GNU C Library.
3169 - Contributed by David Mosberger (davidm@××××××××××.edu).
3170 - EV6 optimized by Rick Gorton <rick.gorton@×××××××××××××××.com>.
3171 -
3172 - The GNU C Library is free software; you can redistribute it and/or
3173 - modify it under the terms of the GNU Lesser General Public
3174 - License as published by the Free Software Foundation; either
3175 - version 2.1 of the License, or (at your option) any later version.
3176 -
3177 - The GNU C Library is distributed in the hope that it will be useful,
3178 - but WITHOUT ANY WARRANTY; without even the implied warranty of
3179 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3180 - Lesser General Public License for more details.
3181 -
3182 - You should have received a copy of the GNU Lesser General Public
3183 - License along with the GNU C Library; if not, write to the Free
3184 - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
3185 - 02111-1307 USA. */
3186 -
3187 -#include <sysdep.h>
3188 -
3189 - .arch ev6
3190 - .set noreorder
3191 - .set noat
3192 -
3193 -ENTRY(__memchr)
3194 -#ifdef PROF
3195 - ldgp gp, 0(pv)
3196 - lda AT, _mcount
3197 - jsr AT, (AT), _mcount
3198 - .prologue 1
3199 -#else
3200 - .prologue 0
3201 -#endif
3202 -
3203 - # Hack -- if someone passes in (size_t)-1, hoping to just
3204 - # search til the end of the address space, we will overflow
3205 - # below when we find the address of the last byte. Given
3206 - # that we will never have a 56-bit address space, cropping
3207 - # the length is the easiest way to avoid trouble.
3208 - zap $18, 0x80, $5 # U : Bound length
3209 - beq $18, $not_found # U :
3210 - ldq_u $1, 0($16) # L : load first quadword Latency=3
3211 - and $17, 0xff, $17 # E : L L U U : 00000000000000ch
3212 -
3213 - insbl $17, 1, $2 # U : 000000000000ch00
3214 - cmpult $18, 9, $4 # E : small (< 1 quad) string?
3215 - or $2, $17, $17 # E : 000000000000chch
3216 - lda $3, -1($31) # E : U L L U
3217 -
3218 - sll $17, 16, $2 # U : 00000000chch0000
3219 - addq $16, $5, $5 # E : Max search address
3220 - or $2, $17, $17 # E : 00000000chchchch
3221 - sll $17, 32, $2 # U : U L L U : chchchch00000000
3222 -
3223 - or $2, $17, $17 # E : chchchchchchchch
3224 - extql $1, $16, $7 # U : $7 is upper bits
3225 - beq $4, $first_quad # U :
3226 - ldq_u $6, -1($5) # L : L U U L : eight or less bytes to search Latency=3
3227 -
3228 - extqh $6, $16, $6 # U : 2 cycle stall for $6
3229 - mov $16, $0 # E :
3230 - nop # E :
3231 - or $7, $6, $1 # E : L U L U $1 = quadword starting at $16
3232 -
3233 - # Deal with the case where at most 8 bytes remain to be searched
3234 - # in $1. E.g.:
3235 - # $18 = 6
3236 - # $1 = ????c6c5c4c3c2c1
3237 -$last_quad:
3238 - negq $18, $6 # E :
3239 - xor $17, $1, $1 # E :
3240 - srl $3, $6, $6 # U : $6 = mask of $18 bits set
3241 - cmpbge $31, $1, $2 # E : L U L U
3242 -
3243 - nop
3244 - nop
3245 - and $2, $6, $2 # E :
3246 - beq $2, $not_found # U : U L U L
3247 -
3248 -$found_it:
3249 -#if defined(__alpha_fix__) && defined(__alpha_cix__)
3250 - /*
3251 - * Since we are guaranteed to have set one of the bits, we don't
3252 - * have to worry about coming back with a 0x40 out of cttz...
3253 - */
3254 - cttz $2, $3 # U0 :
3255 - addq $0, $3, $0 # E : All done
3256 - nop # E :
3257 - ret # L0 : L U L U
3258 -#else
3259 - /*
3260 - * Slow and clunky. It can probably be improved.
3261 - * An exercise left for others.
3262 - */
3263 - negq $2, $3 # E :
3264 - and $2, $3, $2 # E :
3265 - and $2, 0x0f, $1 # E :
3266 - addq $0, 4, $3 # E :
3267 -
3268 - cmoveq $1, $3, $0 # E : Latency 2, extra map cycle
3269 - nop # E : keep with cmov
3270 - and $2, 0x33, $1 # E :
3271 - addq $0, 2, $3 # E : U L U L : 2 cycle stall on $0
3272 -
3273 - cmoveq $1, $3, $0 # E : Latency 2, extra map cycle
3274 - nop # E : keep with cmov
3275 - and $2, 0x55, $1 # E :
3276 - addq $0, 1, $3 # E : U L U L : 2 cycle stall on $0
3277 -
3278 - cmoveq $1, $3, $0 # E : Latency 2, extra map cycle
3279 - nop
3280 - nop
3281 - ret # L0 : L U L U
3282 -#endif
3283 -
3284 - # Deal with the case where $18 > 8 bytes remain to be
3285 - # searched. $16 may not be aligned.
3286 - .align 4
3287 -$first_quad:
3288 - andnot $16, 0x7, $0 # E :
3289 - insqh $3, $16, $2 # U : $2 = 0000ffffffffffff ($16<0:2> ff)
3290 - xor $1, $17, $1 # E :
3291 - or $1, $2, $1 # E : U L U L $1 = ====ffffffffffff
3292 -
3293 - cmpbge $31, $1, $2 # E :
3294 - bne $2, $found_it # U :
3295 - # At least one byte left to process.
3296 - ldq $31, 8($0) # L :
3297 - subq $5, 1, $18 # E : U L U L
3298 -
3299 - addq $0, 8, $0 # E :
3300 - # Make $18 point to last quad to be accessed (the
3301 - # last quad may or may not be partial).
3302 - andnot $18, 0x7, $18 # E :
3303 - cmpult $0, $18, $2 # E :
3304 - beq $2, $final # U : U L U L
3305 -
3306 - # At least two quads remain to be accessed.
3307 -
3308 - subq $18, $0, $4 # E : $4 <- nr quads to be processed
3309 - and $4, 8, $4 # E : odd number of quads?
3310 - bne $4, $odd_quad_count # U :
3311 - # At least three quads remain to be accessed
3312 - nop # E : L U L U : move prefetched value to correct reg
3313 -
3314 - .align 4
3315 -$unrolled_loop:
3316 - ldq $1, 0($0) # L : load quad
3317 - xor $17, $1, $2 # E :
3318 - ldq $31, 8($0) # L : prefetch next quad
3319 - cmpbge $31, $2, $2 # E : U L U L
3320 -
3321 - bne $2, $found_it # U :
3322 - addq $0, 8, $0 # E :
3323 - nop # E :
3324 - nop # E :
3325 -
3326 -$odd_quad_count:
3327 - ldq $1, 0($0) # L : load quad
3328 - xor $17, $1, $2 # E :
3329 - ldq $31, 8($0) # L : prefetch $4
3330 - cmpbge $31, $2, $2 # E :
3331 -
3332 - addq $0, 8, $6 # E :
3333 - bne $2, $found_it # U :
3334 - cmpult $6, $18, $6 # E :
3335 - addq $0, 8, $0 # E :
3336 -
3337 - bne $6, $unrolled_loop # U :
3338 - nop # E :
3339 - nop # E :
3340 - nop # E :
3341 -
3342 -$final: ldq $1, 0($0) # L : load last quad
3343 - subq $5, $0, $18 # E : $18 <- number of bytes left to do
3344 - nop # E :
3345 - bne $18, $last_quad # U :
3346 -
3347 -$not_found:
3348 - mov $31, $0 # E :
3349 - nop # E :
3350 - nop # E :
3351 - ret # L0 :
3352 -
3353 - END(__memchr)
3354 -
3355 -weak_alias (__memchr, memchr)
3356 -#if !__BOUNDED_POINTERS__
3357 -weak_alias (__memchr, __ubp_memchr)
3358 -#endif
3359 -libc_hidden_builtin_def (memchr)
3360 diff --git a/sysdeps/alpha/memchr.S b/sysdeps/alpha/memchr.S
3361 deleted file mode 100644
3362 index 87c7fb1..0000000
3363 --- ports/sysdeps/alpha/memchr.S
3364 +++ /dev/null
3365 @@ -1,176 +0,0 @@
3366 -/* Copyright (C) 1996, 2000, 2003 Free Software Foundation, Inc.
3367 - This file is part of the GNU C Library.
3368 - Contributed by David Mosberger (davidm@××××××××××.edu).
3369 -
3370 - The GNU C Library is free software; you can redistribute it and/or
3371 - modify it under the terms of the GNU Lesser General Public
3372 - License as published by the Free Software Foundation; either
3373 - version 2.1 of the License, or (at your option) any later version.
3374 -
3375 - The GNU C Library is distributed in the hope that it will be useful,
3376 - but WITHOUT ANY WARRANTY; without even the implied warranty of
3377 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3378 - Lesser General Public License for more details.
3379 -
3380 - You should have received a copy of the GNU Lesser General Public
3381 - License along with the GNU C Library; if not, write to the Free
3382 - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
3383 - 02111-1307 USA. */
3384 -
3385 -/* Finds characters in a memory area. Optimized for the Alpha:
3386 -
3387 - - memory accessed as aligned quadwords only
3388 - - uses cmpbge to compare 8 bytes in parallel
3389 - - does binary search to find 0 byte in last
3390 - quadword (HAKMEM needed 12 instructions to
3391 - do this instead of the 9 instructions that
3392 - binary search needs).
3393 -
3394 -For correctness consider that:
3395 -
3396 - - only minimum number of quadwords may be accessed
3397 - - the third argument is an unsigned long
3398 -*/
3399 -
3400 -#include <sysdep.h>
3401 -
3402 - .set noreorder
3403 - .set noat
3404 -
3405 -ENTRY(__memchr)
3406 -#ifdef PROF
3407 - ldgp gp, 0(pv)
3408 - lda AT, _mcount
3409 - jsr AT, (AT), _mcount
3410 - .prologue 1
3411 -#else
3412 - .prologue 0
3413 -#endif
3414 -
3415 - # Hack -- if someone passes in (size_t)-1, hoping to just
3416 - # search til the end of the address space, we will overflow
3417 - # below when we find the address of the last byte. Given
3418 - # that we will never have a 56-bit address space, cropping
3419 - # the length is the easiest way to avoid trouble.
3420 - zap a2, 0x80, t4 #-e0 :
3421 -
3422 - beq a2, $not_found # .. e1 :
3423 - ldq_u t0, 0(a0) # e1 : load first quadword
3424 - insbl a1, 1, t1 # .. e0 : t1 = 000000000000ch00
3425 - and a1, 0xff, a1 #-e0 : a1 = 00000000000000ch
3426 - cmpult a2, 9, t3 # .. e1 :
3427 - or t1, a1, a1 # e0 : a1 = 000000000000chch
3428 - lda t2, -1(zero) # .. e1 :
3429 - sll a1, 16, t1 #-e0 : t1 = 00000000chch0000
3430 - addq a0, t4, t4 # .. e1 :
3431 - or t1, a1, a1 # e1 : a1 = 00000000chchchch
3432 - unop # :
3433 - sll a1, 32, t1 #-e0 : t1 = chchchch00000000
3434 - or t1, a1, a1 # e1 : a1 = chchchchchchchch
3435 - extql t0, a0, t6 # e0 :
3436 - beq t3, $first_quad # .. e1 :
3437 -
3438 - ldq_u t5, -1(t4) #-e1 : eight or less bytes to search
3439 - extqh t5, a0, t5 # .. e0 :
3440 - mov a0, v0 # e0 :
3441 - or t6, t5, t0 # .. e1 : t0 = quadword starting at a0
3442 -
3443 - # Deal with the case where at most 8 bytes remain to be searched
3444 - # in t0. E.g.:
3445 - # a2 = 6
3446 - # t0 = ????c6c5c4c3c2c1
3447 -$last_quad:
3448 - negq a2, t5 #-e0 :
3449 - xor a1, t0, t0 # .. e1 :
3450 - srl t2, t5, t5 # e0 : t5 = mask of a2 bits set
3451 - cmpbge zero, t0, t1 # .. e1 :
3452 - and t1, t5, t1 #-e0 :
3453 - beq t1, $not_found # .. e1 :
3454 -
3455 -$found_it:
3456 - # Now, determine which byte matched:
3457 - negq t1, t2 # e0 :
3458 - and t1, t2, t1 # e1 :
3459 -
3460 - and t1, 0x0f, t0 #-e0 :
3461 - addq v0, 4, t2 # .. e1 :
3462 - cmoveq t0, t2, v0 # e0 :
3463 -
3464 - addq v0, 2, t2 # .. e1 :
3465 - and t1, 0x33, t0 #-e0 :
3466 - cmoveq t0, t2, v0 # .. e1 :
3467 -
3468 - and t1, 0x55, t0 # e0 :
3469 - addq v0, 1, t2 # .. e1 :
3470 - cmoveq t0, t2, v0 #-e0 :
3471 -
3472 -$done: ret # .. e1 :
3473 -
3474 - # Deal with the case where a2 > 8 bytes remain to be
3475 - # searched. a0 may not be aligned.
3476 - .align 4
3477 -$first_quad:
3478 - andnot a0, 0x7, v0 #-e1 :
3479 - insqh t2, a0, t1 # .. e0 : t1 = 0000ffffffffffff (a0<0:2> ff)
3480 - xor t0, a1, t0 # e0 :
3481 - or t0, t1, t0 # e1 : t0 = ====ffffffffffff
3482 - cmpbge zero, t0, t1 #-e0 :
3483 - bne t1, $found_it # .. e1 :
3484 -
3485 - # At least one byte left to process.
3486 -
3487 - ldq zero, 8(v0) # e0 : prefetch next quad
3488 - subq t4, 1, a2 # .. e1 :
3489 - addq v0, 8, v0 #-e0 :
3490 -
3491 - # Make a2 point to last quad to be accessed (the
3492 - # last quad may or may not be partial).
3493 -
3494 - andnot a2, 0x7, a2 # .. e1 :
3495 - cmpult v0, a2, t1 # e0 :
3496 - beq t1, $final # .. e1 :
3497 -
3498 - # At least two quads remain to be accessed.
3499 -
3500 - subq a2, v0, t3 #-e0 : t3 <- nr quads to be processed
3501 - and t3, 8, t3 # e1 : odd number of quads?
3502 - bne t3, $odd_quad_count # e1 :
3503 -
3504 - # At least three quads remain to be accessed
3505 -
3506 - .align 4
3507 -$unrolled_loop:
3508 - ldq t0, 0(v0) # e0 : load quad
3509 - xor a1, t0, t1 # .. e1 :
3510 - ldq zero, 8(v0) # e0 : prefetch next quad
3511 - cmpbge zero, t1, t1 # .. e1:
3512 - bne t1, $found_it # e0 :
3513 -
3514 - addq v0, 8, v0 # e1 :
3515 -$odd_quad_count:
3516 - ldq t0, 0(v0) # e0 : load quad
3517 - xor a1, t0, t1 # .. e1 :
3518 - ldq zero, 8(v0) # e0 : prefetch next quad
3519 - cmpbge zero, t1, t1 # .. e1 :
3520 - addq v0, 8, t5 #-e0 :
3521 - bne t1, $found_it # .. e1 :
3522 -
3523 - cmpult t5, a2, t5 # e0 :
3524 - addq v0, 8, v0 # .. e1 :
3525 - bne t5, $unrolled_loop #-e1 :
3526 -
3527 -$final: ldq t0, 0(v0) # e0 : load last quad
3528 - subq t4, v0, a2 # .. e1 : a2 <- number of bytes left to do
3529 - bne a2, $last_quad # e1 :
3530 -
3531 -$not_found:
3532 - mov zero, v0 #-e0 :
3533 - ret # .. e1 :
3534 -
3535 - END(__memchr)
3536 -
3537 -weak_alias (__memchr, memchr)
3538 -#if !__BOUNDED_POINTERS__
3539 -weak_alias (__memchr, __ubp_memchr)
3540 -#endif
3541 -libc_hidden_builtin_def (memchr)
3542 diff --git a/sysdeps/alpha/memchr.c b/sysdeps/alpha/memchr.c
3543 new file mode 100644
3544 index 0000000..c52841b
3545 --- /dev/null
3546 +++ ports/sysdeps/alpha/memchr.c
3547 @@ -0,0 +1,175 @@
3548 +/* Copyright (C) 2010 Free Software Foundation, Inc.
3549 + This file is part of the GNU C Library.
3550 +
3551 + The GNU C Library is free software; you can redistribute it and/or
3552 + modify it under the terms of the GNU Lesser General Public
3553 + License as published by the Free Software Foundation; either
3554 + version 2.1 of the License, or (at your option) any later version.
3555 +
3556 + The GNU C Library is distributed in the hope that it will be useful,
3557 + but WITHOUT ANY WARRANTY; without even the implied warranty of
3558 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3559 + Lesser General Public License for more details.
3560 +
3561 + You should have received a copy of the GNU Lesser General Public
3562 + License along with the GNU C Library; if not, write to the Free
3563 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
3564 + 02111-1307 USA. */
3565 +
3566 +#include <string.h>
3567 +
3568 +typedef unsigned long word;
3569 +
3570 +static inline word
3571 +ldq_u(const void *s)
3572 +{
3573 + return *(const word *)((word)s & -8);
3574 +}
3575 +
3576 +#define unlikely(X) __builtin_expect ((X), 0)
3577 +#define prefetch(X) __builtin_prefetch ((void *)(X), 0)
3578 +
3579 +#define cmpbeq0(X) __builtin_alpha_cmpbge(0, (X))
3580 +#define find(X, Y) cmpbeq0 ((X) ^ (Y))
3581 +
3582 +/* Search no more than N bytes of S for C. */
3583 +
3584 +void *
3585 +__memchr (const void *s, int xc, size_t n)
3586 +{
3587 + const word *s_align;
3588 + word t, current, found, mask, offset;
3589 +
3590 + if (unlikely (n == 0))
3591 + return 0;
3592 +
3593 + current = ldq_u (s);
3594 +
3595 + /* Replicate low byte of XC into all bytes of C. */
3596 + t = xc & 0xff; /* 0000000c */
3597 + t = (t << 8) | t; /* 000000cc */
3598 + t = (t << 16) | t; /* 0000cccc */
3599 + const word c = (t << 32) | t; /* cccccccc */
3600 +
3601 + /* Align the source, and decrement the count by the number
3602 + of bytes searched in the first word. */
3603 + s_align = (const word *)(s & -8);
3604 + n += (s & 7);
3605 +
3606 + /* Deal with misalignment in the first word for the comparison. */
3607 + mask = (1ul << (s & 7)) - 1;
3608 +
3609 + /* If the entire string fits within one word, we may need masking
3610 + at both the front and the back of the string. */
3611 + if (unlikely (n <= 8))
3612 + {
3613 + mask |= -1ul << n;
3614 + goto last_quad;
3615 + }
3616 +
3617 + found = find (current, c) & ~mask;
3618 + if (unlikely (found))
3619 + goto found_it;
3620 +
3621 + s_align++;
3622 + n -= 8;
3623 +
3624 + /* If the block is sufficiently large, align to cacheline and prefetch. */
3625 + if (unlikely (n >= 256))
3626 + {
3627 + /* Prefetch 3 cache lines beyond the one we're working on. */
3628 + prefetch (s_align + 8);
3629 + prefetch (s_align + 16);
3630 + prefetch (s_align + 24);
3631 +
3632 + while ((word)s_align & 63)
3633 + {
3634 + current = *s_align;
3635 + found = find (current, c);
3636 + if (found)
3637 + goto found_it;
3638 + s_align++;
3639 + n -= 8;
3640 + }
3641 +
3642 + /* Within each cacheline, advance the load for the next word
3643 + before the test for the previous word is complete. This
3644 + allows us to hide the 3 cycle L1 cache load latency. We
3645 + only perform this advance load within a cacheline to prevent
3646 + reading across page boundary. */
3647 +#define CACHELINE_LOOP \
3648 + do { \
3649 + word i, next = s_align[0]; \
3650 + for (i = 0; i < 7; ++i) \
3651 + { \
3652 + current = next; \
3653 + next = s_align[1]; \
3654 + found = find (current, c); \
3655 + if (unlikely (found)) \
3656 + goto found_it; \
3657 + s_align++; \
3658 + } \
3659 + current = next; \
3660 + found = find (current, c); \
3661 + if (unlikely (found)) \
3662 + goto found_it; \
3663 + s_align++; \
3664 + n -= 64; \
3665 + } while (0)
3666 +
3667 + /* While there's still lots more data to potentially be read,
3668 + continue issuing prefetches for the 4th cacheline out. */
3669 + while (n >= 256)
3670 + {
3671 + prefetch (s_align + 24);
3672 + CACHELINE_LOOP;
3673 + }
3674 +
3675 + /* Up to 3 cache lines remaining. Continue issuing advanced
3676 + loads, but stop prefetching. */
3677 + while (n >= 64)
3678 + CACHELINE_LOOP;
3679 +
3680 + /* We may have exhausted the buffer. */
3681 + if (n == 0)
3682 + return NULL;
3683 + }
3684 +
3685 + /* Quadword aligned loop. */
3686 + current = *s_align;
3687 + while (n > 8)
3688 + {
3689 + found = find (current, c);
3690 + if (unlikely (found))
3691 + goto found_it;
3692 + current = *++s_align;
3693 + n -= 8;
3694 + }
3695 +
3696 + /* The last word may need masking at the tail of the compare. */
3697 + mask = -1ul << n;
3698 + last_quad:
3699 + found = find (current, c) & ~mask;
3700 + if (found == 0)
3701 + return NULL;
3702 +
3703 + found_it:
3704 +#ifdef __alpha_cix__
3705 + offset = __builtin_alpha_cttz (found);
3706 +#else
3707 + /* Extract LSB. */
3708 + found &= -found;
3709 +
3710 + /* Binary search for the LSB. */
3711 + offset = (found & 0x0f ? 0 : 4);
3712 + offset += (found & 0x33 ? 0 : 2);
3713 + offset += (found & 0x55 ? 0 : 1);
3714 +#endif
3715 +
3716 + return (void *)((word)s_align + offset);
3717 +}
3718 +
3719 +#ifdef weak_alias
3720 +weak_alias (__memchr, BP_SYM (memchr))
3721 +#endif
3722 +libc_hidden_builtin_def (memchr)
3723 --
3724 1.7.3
3725
3726
3727
3728 1.1 src/patchsets/glibc/2.13/6029_all_alpha-fix-memchr.patch
3729
3730 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/6029_all_alpha-fix-memchr.patch?rev=1.1&view=markup
3731 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/6029_all_alpha-fix-memchr.patch?rev=1.1&content-type=text/plain
3732
3733 Index: 6029_all_alpha-fix-memchr.patch
3734 ===================================================================
3735 From b54f998dc380ce327a7faf2c40e569fb2cf39bf0 Mon Sep 17 00:00:00 2001
3736 From: Michael Cree <mcree@×××××××××.nz>
3737 Date: Sun, 26 Sep 2010 21:15:51 +1300
3738 Subject: [PATCH] alpha: Fix compile errors in memchr
3739
3740 Include missing header file and make some casts explicit.
3741 ---
3742 sysdeps/alpha/memchr.c | 7 ++++---
3743 1 files changed, 4 insertions(+), 3 deletions(-)
3744
3745 diff --git a/sysdeps/alpha/memchr.c b/sysdeps/alpha/memchr.c
3746 index c52841b..7e16f8a 100644
3747 --- ports/sysdeps/alpha/memchr.c
3748 +++ ports/sysdeps/alpha/memchr.c
3749 @@ -17,6 +17,7 @@
3750 02111-1307 USA. */
3751
3752 #include <string.h>
3753 +#include <bp-sym.h>
3754
3755 typedef unsigned long word;
3756
3757 @@ -53,11 +54,11 @@ __memchr (const void *s, int xc, size_t n)
3758
3759 /* Align the source, and decrement the count by the number
3760 of bytes searched in the first word. */
3761 - s_align = (const word *)(s & -8);
3762 - n += (s & 7);
3763 + s_align = (const word *)((word)s & -8);
3764 + n += ((word)s & 7);
3765
3766 /* Deal with misalignment in the first word for the comparison. */
3767 - mask = (1ul << (s & 7)) - 1;
3768 + mask = (1ul << ((word)s & 7)) - 1;
3769
3770 /* If the entire string fits within one word, we may need masking
3771 at both the front and the back of the string. */
3772 --
3773 1.7.3
3774
3775
3776
3777 1.1 src/patchsets/glibc/2.13/6031_all_alpha-glibc-2.12-epoll_create1.patch
3778
3779 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/6031_all_alpha-glibc-2.12-epoll_create1.patch?rev=1.1&view=markup
3780 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/6031_all_alpha-glibc-2.12-epoll_create1.patch?rev=1.1&content-type=text/plain
3781
3782 Index: 6031_all_alpha-glibc-2.12-epoll_create1.patch
3783 ===================================================================
3784 https://bugs.gentoo.org/331639
3785
3786 From 3fe89ea4365a2294f56ddba91f3a84086fd15d42 Mon Sep 17 00:00:00 2001
3787 From: Mike Frysinger <vapier@g.o>
3788 Date: Tue, 31 Aug 2010 16:06:02 -0400
3789 Subject: [PATCH] linux/alpha: convert from epoll_create2 to epoll_create1
3790
3791 Alpha's epoll.h was missed when epoll_create2 was changed to epoll_create1.
3792
3793 Signed-off-by: Mike Frysinger <vapier@g.o>
3794
3795 2010-08-31 Mike Frysinger <vapier@g.o>
3796
3797 * sysdeps/unix/sysv/linux/alpha/sys/epoll.h (epoll_create2): Delete.
3798 (epoll_create1): Add.
3799 ---
3800 sysdeps/unix/sysv/linux/alpha/sys/epoll.h | 9 +++++----
3801 1 files changed, 5 insertions(+), 4 deletions(-)
3802
3803 diff --git a/sysdeps/unix/sysv/linux/alpha/sys/epoll.h b/sysdeps/unix/sysv/linux/alpha/sys/epoll.h
3804 index 9f983a5..9177c31 100644
3805 --- ports/sysdeps/unix/sysv/linux/alpha/sys/epoll.h
3806 +++ ports/sysdeps/unix/sysv/linux/alpha/sys/epoll.h
3807 @@ -31,7 +31,7 @@ typedef __sigset_t sigset_t;
3808 #endif
3809
3810
3811 -/* Flags to be passed to epoll_create2. */
3812 +/* Flags to be passed to epoll_create1. */
3813 enum
3814 {
3815 EPOLL_CLOEXEC = 010000000,
3816 @@ -101,8 +101,9 @@ __BEGIN_DECLS
3817 returned by epoll_create() should be closed with close(). */
3818 extern int epoll_create (int __size) __THROW;
3819
3820 -/* Same as epoll_create but with an additional FLAGS parameter. */
3821 -extern int epoll_create2 (int __size, int __flags) __THROW;
3822 +/* Same as epoll_create but with an FLAGS parameter. The unused SIZE
3823 + parameter has been dropped. */
3824 +extern int epoll_create1 (int __flags) __THROW;
3825
3826
3827 /* Manipulate an epoll instance "epfd". Returns 0 in case of success,
3828 --
3829 1.7.2
3830
3831
3832
3833
3834 1.1 src/patchsets/glibc/2.13/6032_all_alpha-syscall-6.patch
3835
3836 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/6032_all_alpha-syscall-6.patch?rev=1.1&view=markup
3837 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/6032_all_alpha-syscall-6.patch?rev=1.1&content-type=text/plain
3838
3839 Index: 6032_all_alpha-syscall-6.patch
3840 ===================================================================
3841 http://sourceware.org/bugzilla/show_bug.cgi?id=11677
3842
3843 2009-05-31 Mike Hommey <mh+reportbug@××××××××.org>
3844
3845 * sysdeps/unix/sysv/linux/alpha/syscall.S: add support for 6th
3846 argument.
3847
3848 --- ports/sysdeps/unix/sysv/linux/alpha/syscall.S
3849 +++ ports/sysdeps/unix/sysv/linux/alpha/syscall.S
3850 @@ -31,13 +31,13 @@
3851 *
3852 * Usage:
3853 *
3854 - * long syscall(syscall_number, arg1, arg2, arg3, arg4, arg5)
3855 + * long syscall(syscall_number, arg1, arg2, arg3, arg4, arg5, arg6)
3856 *
3857 * syscall_number = the index of the system call we're invoking
3858 - * arg1-arg5 = up to 5 integer arguments to the system call
3859 + * arg1-arg6 = up to 6 integer arguments to the system call
3860 *
3861 * We need to do some arg shifting: the kernel expects the
3862 - * syscall number in v0 and the first five args in a0-a4.
3863 + * syscall number in v0 and the first six args in a0-a5.
3864 *
3865 */
3866
3867 @@ -60,6 +60,7 @@
3868 mov a3, a2
3869 mov a4, a3
3870 mov a5, a4
3871 + ldq a5,0(sp) /* arg6 -> a5 */
3872
3873 call_pal PAL_callsys /* Invoke system call */
3874 bne a3, $error
3875
3876
3877
3878 1.1 src/patchsets/glibc/2.13/6120_all_ppc-glibc-2.9-atomic.patch
3879
3880 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/6120_all_ppc-glibc-2.9-atomic.patch?rev=1.1&view=markup
3881 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/6120_all_ppc-glibc-2.9-atomic.patch?rev=1.1&content-type=text/plain
3882
3883 Index: 6120_all_ppc-glibc-2.9-atomic.patch
3884 ===================================================================
3885 sniped from suse
3886
3887 Index: sysdeps/powerpc/bits/atomic.h
3888 ===================================================================
3889 RCS file: /cvs/glibc/libc/sysdeps/powerpc/bits/atomic.h,v
3890 retrieving revision 1.17
3891 diff -u -a -p -r1.17 atomic.h
3892 --- sysdeps/powerpc/bits/atomic.h 26 Mar 2007 20:15:28 -0000 1.17
3893 +++ sysdeps/powerpc/bits/atomic.h 31 May 2008 08:50:56 -0000
3894 @@ -85,14 +85,14 @@ typedef uintmax_t uatomic_max_t;
3895 __typeof (*(mem)) __tmp; \
3896 __typeof (mem) __memp = (mem); \
3897 __asm __volatile ( \
3898 - "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \
3899 + "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \
3900 " cmpw %0,%2\n" \
3901 " bne 2f\n" \
3902 - " stwcx. %3,0,%1\n" \
3903 + " stwcx. %3,%y1\n" \
3904 " bne- 1b\n" \
3905 "2: " __ARCH_ACQ_INSTR \
3906 - : "=&r" (__tmp) \
3907 - : "b" (__memp), "r" (oldval), "r" (newval) \
3908 + : "=&r" (__tmp), "+Z" (*__memp) \
3909 + : "r" (oldval), "r" (newval) \
3910 : "cr0", "memory"); \
3911 __tmp; \
3912 })
3913 @@ -102,14 +102,14 @@ typedef uintmax_t uatomic_max_t;
3914 __typeof (*(mem)) __tmp; \
3915 __typeof (mem) __memp = (mem); \
3916 __asm __volatile (__ARCH_REL_INSTR "\n" \
3917 - "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \
3918 + "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \
3919 " cmpw %0,%2\n" \
3920 " bne 2f\n" \
3921 - " stwcx. %3,0,%1\n" \
3922 + " stwcx. %3,%y1\n" \
3923 " bne- 1b\n" \
3924 "2: " \
3925 - : "=&r" (__tmp) \
3926 - : "b" (__memp), "r" (oldval), "r" (newval) \
3927 + : "=&r" (__tmp), "+Z" (__memp) \
3928 + : "r" (oldval), "r" (newval) \
3929 : "cr0", "memory"); \
3930 __tmp; \
3931 })
3932 @@ -118,12 +118,12 @@ typedef uintmax_t uatomic_max_t;
3933 ({ \
3934 __typeof (*mem) __val; \
3935 __asm __volatile ( \
3936 - "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \
3937 - " stwcx. %3,0,%2\n" \
3938 + "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \
3939 + " stwcx. %2,%y1\n" \
3940 " bne- 1b\n" \
3941 " " __ARCH_ACQ_INSTR \
3942 - : "=&r" (__val), "=m" (*mem) \
3943 - : "b" (mem), "r" (value), "m" (*mem) \
3944 + : "=&r" (__val), "+Z" (*mem) \
3945 + : "r" (value) \
3946 : "cr0", "memory"); \
3947 __val; \
3948 })
3949 @@ -132,11 +132,11 @@ typedef uintmax_t uatomic_max_t;
3950 ({ \
3951 __typeof (*mem) __val; \
3952 __asm __volatile (__ARCH_REL_INSTR "\n" \
3953 - "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \
3954 - " stwcx. %3,0,%2\n" \
3955 + "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \
3956 + " stwcx. %2,%y1\n" \
3957 " bne- 1b" \
3958 - : "=&r" (__val), "=m" (*mem) \
3959 - : "b" (mem), "r" (value), "m" (*mem) \
3960 + : "=&r" (__val), "+Z" (*mem) \
3961 + : "r" (value) \
3962 : "cr0", "memory"); \
3963 __val; \
3964 })
3965 @@ -144,12 +144,12 @@ typedef uintmax_t uatomic_max_t;
3966 #define __arch_atomic_exchange_and_add_32(mem, value) \
3967 ({ \
3968 __typeof (*mem) __val, __tmp; \
3969 - __asm __volatile ("1: lwarx %0,0,%3\n" \
3970 - " add %1,%0,%4\n" \
3971 - " stwcx. %1,0,%3\n" \
3972 + __asm __volatile ("1: lwarx %0,%y2\n" \
3973 + " add %1,%0,%3\n" \
3974 + " stwcx. %1,%y2\n" \
3975 " bne- 1b" \
3976 - : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \
3977 - : "b" (mem), "r" (value), "m" (*mem) \
3978 + : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \
3979 + : "r" (value) \
3980 : "cr0", "memory"); \
3981 __val; \
3982 })
3983 @@ -157,12 +157,12 @@ typedef uintmax_t uatomic_max_t;
3984 #define __arch_atomic_increment_val_32(mem) \
3985 ({ \
3986 __typeof (*(mem)) __val; \
3987 - __asm __volatile ("1: lwarx %0,0,%2\n" \
3988 + __asm __volatile ("1: lwarx %0,%y1\n" \
3989 " addi %0,%0,1\n" \
3990 - " stwcx. %0,0,%2\n" \
3991 + " stwcx. %0,%y1\n" \
3992 " bne- 1b" \
3993 - : "=&b" (__val), "=m" (*mem) \
3994 - : "b" (mem), "m" (*mem) \
3995 + : "=&b" (__val), "+Z" (*mem) \
3996 + : \
3997 : "cr0", "memory"); \
3998 __val; \
3999 })
4000 @@ -170,27 +170,27 @@ typedef uintmax_t uatomic_max_t;
4001 #define __arch_atomic_decrement_val_32(mem) \
4002 ({ \
4003 __typeof (*(mem)) __val; \
4004 - __asm __volatile ("1: lwarx %0,0,%2\n" \
4005 + __asm __volatile ("1: lwarx %0,%y1\n" \
4006 " subi %0,%0,1\n" \
4007 - " stwcx. %0,0,%2\n" \
4008 + " stwcx. %0,%y1\n" \
4009 " bne- 1b" \
4010 - : "=&b" (__val), "=m" (*mem) \
4011 - : "b" (mem), "m" (*mem) \
4012 + : "=&b" (__val), "+Z" (*mem) \
4013 + : \
4014 : "cr0", "memory"); \
4015 __val; \
4016 })
4017
4018 #define __arch_atomic_decrement_if_positive_32(mem) \
4019 ({ int __val, __tmp; \
4020 - __asm __volatile ("1: lwarx %0,0,%3\n" \
4021 + __asm __volatile ("1: lwarx %0,%y2\n" \
4022 " cmpwi 0,%0,0\n" \
4023 " addi %1,%0,-1\n" \
4024 " ble 2f\n" \
4025 - " stwcx. %1,0,%3\n" \
4026 + " stwcx. %1,%y2\n" \
4027 " bne- 1b\n" \
4028 "2: " __ARCH_ACQ_INSTR \
4029 - : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \
4030 - : "b" (mem), "m" (*mem) \
4031 + : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \
4032 + : \
4033 : "cr0", "memory"); \
4034 __val; \
4035 })
4036 Index: sysdeps/powerpc/powerpc32/bits/atomic.h
4037 ===================================================================
4038 RCS file: /cvs/glibc/libc/sysdeps/powerpc/powerpc32/bits/atomic.h,v
4039 retrieving revision 1.6
4040 diff -u -a -p -r1.6 atomic.h
4041 --- sysdeps/powerpc/powerpc32/bits/atomic.h 26 Mar 2007 20:15:45 -0000 1.6
4042 +++ sysdeps/powerpc/powerpc32/bits/atomic.h 31 May 2008 08:50:56 -0000
4043 @@ -44,14 +44,14 @@
4044 ({ \
4045 unsigned int __tmp; \
4046 __asm __volatile ( \
4047 - "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \
4048 + "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \
4049 " subf. %0,%2,%0\n" \
4050 " bne 2f\n" \
4051 - " stwcx. %3,0,%1\n" \
4052 + " stwcx. %3,%y1\n" \
4053 " bne- 1b\n" \
4054 "2: " __ARCH_ACQ_INSTR \
4055 - : "=&r" (__tmp) \
4056 - : "b" (mem), "r" (oldval), "r" (newval) \
4057 + : "=&r" (__tmp), "+Z" (*(mem)) \
4058 + : "r" (oldval), "r" (newval) \
4059 : "cr0", "memory"); \
4060 __tmp != 0; \
4061 })
4062 @@ -60,14 +60,14 @@
4063 ({ \
4064 unsigned int __tmp; \
4065 __asm __volatile (__ARCH_REL_INSTR "\n" \
4066 - "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \
4067 + "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \
4068 " subf. %0,%2,%0\n" \
4069 " bne 2f\n" \
4070 - " stwcx. %3,0,%1\n" \
4071 + " stwcx. %3,%y1\n" \
4072 " bne- 1b\n" \
4073 "2: " \
4074 - : "=&r" (__tmp) \
4075 - : "b" (mem), "r" (oldval), "r" (newval) \
4076 + : "=&r" (__tmp), "+Z" (*(mem)) \
4077 + : "r" (oldval), "r" (newval) \
4078 : "cr0", "memory"); \
4079 __tmp != 0; \
4080 })
4081 Index: sysdeps/powerpc/powerpc64/bits/atomic.h
4082 ===================================================================
4083 RCS file: /cvs/glibc/libc/sysdeps/powerpc/powerpc64/bits/atomic.h,v
4084 retrieving revision 1.8
4085 diff -u -a -p -r1.8 atomic.h
4086 --- sysdeps/powerpc/powerpc64/bits/atomic.h 26 Mar 2007 20:16:03 -0000 1.8
4087 +++ sysdeps/powerpc/powerpc64/bits/atomic.h 31 May 2008 08:50:56 -0000
4088 @@ -44,14 +44,14 @@
4089 ({ \
4090 unsigned int __tmp, __tmp2; \
4091 __asm __volatile (" clrldi %1,%1,32\n" \
4092 - "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \
4093 + "1: lwarx %0,%y2" MUTEX_HINT_ACQ "\n" \
4094 " subf. %0,%1,%0\n" \
4095 " bne 2f\n" \
4096 - " stwcx. %4,0,%2\n" \
4097 + " stwcx. %4,%y2\n" \
4098 " bne- 1b\n" \
4099 "2: " __ARCH_ACQ_INSTR \
4100 - : "=&r" (__tmp), "=r" (__tmp2) \
4101 - : "b" (mem), "1" (oldval), "r" (newval) \
4102 + : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \
4103 + : "1" (oldval), "r" (newval) \
4104 : "cr0", "memory"); \
4105 __tmp != 0; \
4106 })
4107 @@ -61,14 +61,14 @@
4108 unsigned int __tmp, __tmp2; \
4109 __asm __volatile (__ARCH_REL_INSTR "\n" \
4110 " clrldi %1,%1,32\n" \
4111 - "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \
4112 + "1: lwarx %0,%y2" MUTEX_HINT_REL "\n" \
4113 " subf. %0,%1,%0\n" \
4114 " bne 2f\n" \
4115 - " stwcx. %4,0,%2\n" \
4116 + " stwcx. %4,%y2\n" \
4117 " bne- 1b\n" \
4118 "2: " \
4119 - : "=&r" (__tmp), "=r" (__tmp2) \
4120 - : "b" (mem), "1" (oldval), "r" (newval) \
4121 + : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \
4122 + : "1" (oldval), "r" (newval) \
4123 : "cr0", "memory"); \
4124 __tmp != 0; \
4125 })
4126 @@ -82,14 +82,14 @@
4127 ({ \
4128 unsigned long __tmp; \
4129 __asm __volatile ( \
4130 - "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \
4131 + "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \
4132 " subf. %0,%2,%0\n" \
4133 " bne 2f\n" \
4134 - " stdcx. %3,0,%1\n" \
4135 + " stdcx. %3,%y1\n" \
4136 " bne- 1b\n" \
4137 "2: " __ARCH_ACQ_INSTR \
4138 - : "=&r" (__tmp) \
4139 - : "b" (mem), "r" (oldval), "r" (newval) \
4140 + : "=&r" (__tmp), "+Z" (*(mem)) \
4141 + : "r" (oldval), "r" (newval) \
4142 : "cr0", "memory"); \
4143 __tmp != 0; \
4144 })
4145 @@ -98,14 +98,14 @@
4146 ({ \
4147 unsigned long __tmp; \
4148 __asm __volatile (__ARCH_REL_INSTR "\n" \
4149 - "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \
4150 + "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \
4151 " subf. %0,%2,%0\n" \
4152 " bne 2f\n" \
4153 - " stdcx. %3,0,%1\n" \
4154 + " stdcx. %3,%y1\n" \
4155 " bne- 1b\n" \
4156 "2: " \
4157 - : "=&r" (__tmp) \
4158 - : "b" (mem), "r" (oldval), "r" (newval) \
4159 + : "=&r" (__tmp), "+Z" (*(mem)) \
4160 + : "r" (oldval), "r" (newval) \
4161 : "cr0", "memory"); \
4162 __tmp != 0; \
4163 })
4164 @@ -115,14 +115,14 @@
4165 __typeof (*(mem)) __tmp; \
4166 __typeof (mem) __memp = (mem); \
4167 __asm __volatile ( \
4168 - "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \
4169 + "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \
4170 " cmpd %0,%2\n" \
4171 " bne 2f\n" \
4172 - " stdcx. %3,0,%1\n" \
4173 + " stdcx. %3,%y1\n" \
4174 " bne- 1b\n" \
4175 "2: " __ARCH_ACQ_INSTR \
4176 - : "=&r" (__tmp) \
4177 - : "b" (__memp), "r" (oldval), "r" (newval) \
4178 + : "=&r" (__tmp), "+Z" (*__memp) \
4179 + : "r" (oldval), "r" (newval) \
4180 : "cr0", "memory"); \
4181 __tmp; \
4182 })
4183 @@ -132,14 +132,14 @@
4184 __typeof (*(mem)) __tmp; \
4185 __typeof (mem) __memp = (mem); \
4186 __asm __volatile (__ARCH_REL_INSTR "\n" \
4187 - "1: ldarx %0,0,%1" MUTEX_HINT_REL "\n" \
4188 + "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \
4189 " cmpd %0,%2\n" \
4190 " bne 2f\n" \
4191 - " stdcx. %3,0,%1\n" \
4192 + " stdcx. %3,%y1\n" \
4193 " bne- 1b\n" \
4194 "2: " \
4195 - : "=&r" (__tmp) \
4196 - : "b" (__memp), "r" (oldval), "r" (newval) \
4197 + : "=&r" (__tmp), "+Z" (*__memp) \
4198 + : "r" (oldval), "r" (newval) \
4199 : "cr0", "memory"); \
4200 __tmp; \
4201 })
4202 @@ -148,12 +148,12 @@
4203 ({ \
4204 __typeof (*mem) __val; \
4205 __asm __volatile (__ARCH_REL_INSTR "\n" \
4206 - "1: ldarx %0,0,%2" MUTEX_HINT_ACQ "\n" \
4207 - " stdcx. %3,0,%2\n" \
4208 + "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \
4209 + " stdcx. %2,%y1\n" \
4210 " bne- 1b\n" \
4211 " " __ARCH_ACQ_INSTR \
4212 - : "=&r" (__val), "=m" (*mem) \
4213 - : "b" (mem), "r" (value), "m" (*mem) \
4214 + : "=&r" (__val), "+Z" (*(mem)) \
4215 + : "r" (value) \
4216 : "cr0", "memory"); \
4217 __val; \
4218 })
4219 @@ -162,11 +162,11 @@
4220 ({ \
4221 __typeof (*mem) __val; \
4222 __asm __volatile (__ARCH_REL_INSTR "\n" \
4223 - "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \
4224 - " stdcx. %3,0,%2\n" \
4225 + "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \
4226 + " stdcx. %2,%y1\n" \
4227 " bne- 1b" \
4228 - : "=&r" (__val), "=m" (*mem) \
4229 - : "b" (mem), "r" (value), "m" (*mem) \
4230 + : "=&r" (__val), "+Z" (*(mem)) \
4231 + : "r" (value) \
4232 : "cr0", "memory"); \
4233 __val; \
4234 })
4235 @@ -174,12 +174,12 @@
4236 #define __arch_atomic_exchange_and_add_64(mem, value) \
4237 ({ \
4238 __typeof (*mem) __val, __tmp; \
4239 - __asm __volatile ("1: ldarx %0,0,%3\n" \
4240 - " add %1,%0,%4\n" \
4241 - " stdcx. %1,0,%3\n" \
4242 + __asm __volatile ("1: ldarx %0,%y2\n" \
4243 + " add %1,%0,%3\n" \
4244 + " stdcx. %1,%y2\n" \
4245 " bne- 1b" \
4246 - : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \
4247 - : "b" (mem), "r" (value), "m" (*mem) \
4248 + : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \
4249 + : "r" (value) \
4250 : "cr0", "memory"); \
4251 __val; \
4252 })
4253 @@ -187,12 +187,12 @@
4254 #define __arch_atomic_increment_val_64(mem) \
4255 ({ \
4256 __typeof (*(mem)) __val; \
4257 - __asm __volatile ("1: ldarx %0,0,%2\n" \
4258 + __asm __volatile ("1: ldarx %0,%y1\n" \
4259 " addi %0,%0,1\n" \
4260 - " stdcx. %0,0,%2\n" \
4261 + " stdcx. %0,%y1\n" \
4262 " bne- 1b" \
4263 - : "=&b" (__val), "=m" (*mem) \
4264 - : "b" (mem), "m" (*mem) \
4265 + : "=&b" (__val), "+Z" (*(mem)) \
4266 + : \
4267 : "cr0", "memory"); \
4268 __val; \
4269 })
4270 @@ -200,27 +200,27 @@
4271 #define __arch_atomic_decrement_val_64(mem) \
4272 ({ \
4273 __typeof (*(mem)) __val; \
4274 - __asm __volatile ("1: ldarx %0,0,%2\n" \
4275 + __asm __volatile ("1: ldarx %0,%y1\n" \
4276 " subi %0,%0,1\n" \
4277 - " stdcx. %0,0,%2\n" \
4278 + " stdcx. %0,%y1\n" \
4279 " bne- 1b" \
4280 - : "=&b" (__val), "=m" (*mem) \
4281 - : "b" (mem), "m" (*mem) \
4282 + : "=&b" (__val), "+Z" (*(mem)) \
4283 + : \
4284 : "cr0", "memory"); \
4285 __val; \
4286 })
4287
4288 #define __arch_atomic_decrement_if_positive_64(mem) \
4289 ({ int __val, __tmp; \
4290 - __asm __volatile ("1: ldarx %0,0,%3\n" \
4291 + __asm __volatile ("1: ldarx %0,%y2\n" \
4292 " cmpdi 0,%0,0\n" \
4293 " addi %1,%0,-1\n" \
4294 " ble 2f\n" \
4295 - " stdcx. %1,0,%3\n" \
4296 + " stdcx. %1,%y2\n" \
4297 " bne- 1b\n" \
4298 "2: " __ARCH_ACQ_INSTR \
4299 - : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \
4300 - : "b" (mem), "m" (*mem) \
4301 + : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \
4302 + : \
4303 : "cr0", "memory"); \
4304 __val; \
4305 })
4306
4307
4308
4309 1.1 src/patchsets/glibc/2.13/6130_all_ppc-glibc-2.11-cell-vector.patch
4310
4311 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/6130_all_ppc-glibc-2.11-cell-vector.patch?rev=1.1&view=markup
4312 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/6130_all_ppc-glibc-2.11-cell-vector.patch?rev=1.1&content-type=text/plain
4313
4314 Index: 6130_all_ppc-glibc-2.11-cell-vector.patch
4315 ===================================================================
4316 http://sourceware.org/ml/libc-alpha/2009-11/msg00017.html
4317
4318 From: Petr Baudis <pasky at suse dot cz>
4319 To: libc-alpha at sourceware dot org
4320 Date: Fri, 6 Nov 2009 12:03:59 +0100
4321 Subject: Fix compilation with Altivec
4322
4323 (This is essentially the same as Andreas Schwab's similar change in Oct
4324 2004. glibc-2.11 fails to build with -mcpu=cell, where __vector is
4325 gcc-reserved keyword.)
4326
4327 2009-11-06 Petr Baudis <pasky@××××.cz>
4328
4329 * include/sys/uio.h: Change __vector to __iovec to avoid clash
4330 with altivec.
4331
4332 diff --git a/include/sys/uio.h b/include/sys/uio.h
4333 index 8c2b016..bfaec59 100644
4334 --- a/include/sys/uio.h
4335 +++ b/include/sys/uio.h
4336 @@ -2,12 +2,12 @@
4337 #include <misc/sys/uio.h>
4338
4339 /* Now define the internal interfaces. */
4340 -extern ssize_t __readv (int __fd, __const struct iovec *__vector,
4341 +extern ssize_t __readv (int __fd, __const struct iovec *__iovec,
4342 int __count);
4343 -extern ssize_t __libc_readv (int __fd, __const struct iovec *__vector,
4344 +extern ssize_t __libc_readv (int __fd, __const struct iovec *__iovec,
4345 int __count);
4346 -extern ssize_t __writev (int __fd, __const struct iovec *__vector,
4347 +extern ssize_t __writev (int __fd, __const struct iovec *__iovec,
4348 int __count);
4349 -extern ssize_t __libc_writev (int __fd, __const struct iovec *__vector,
4350 +extern ssize_t __libc_writev (int __fd, __const struct iovec *__iovec,
4351 int __count);
4352 #endif
4353
4354
4355
4356 1.1 src/patchsets/glibc/2.13/6220_all_glibc-2.4-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
4357
4358 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/6220_all_glibc-2.4-arm-cirrus-ep93xx-maverick-crunch-fpu.patch?rev=1.1&view=markup
4359 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/6220_all_glibc-2.4-arm-cirrus-ep93xx-maverick-crunch-fpu.patch?rev=1.1&content-type=text/plain
4360
4361 Index: 6220_all_glibc-2.4-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
4362 ===================================================================
4363 http://yann.poupet.free.fr/ep93xx/
4364 Add support for the Maverick Crunch FPU on Cirrus EP93XX processor series
4365
4366 --- ports/sysdeps/arm/bits/endian.h
4367 +++ ports/sysdeps/arm/bits/endian.h
4368 @@ -12,7 +12,7 @@
4369 /* FPA floating point units are always big-endian, irrespective of the
4370 CPU endianness. VFP floating point units use the same endianness
4371 as the rest of the system. */
4372 -#ifdef __VFP_FP__
4373 +#if defined __VFP_FP__ || defined __MAVERICK__
4374 #define __FLOAT_WORD_ORDER __BYTE_ORDER
4375 #else
4376 #define __FLOAT_WORD_ORDER __BIG_ENDIAN
4377 --- ports/sysdeps/arm/fpu/bits/fenv.h
4378 +++ ports/sysdeps/arm/fpu/bits/fenv.h
4379 @@ -20,6 +20,45 @@
4380 # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
4381 #endif
4382
4383 +#if defined(__MAVERICK__)
4384 +
4385 +/* Define bits representing exceptions in the FPU status word. */
4386 +enum
4387 + {
4388 + FE_INVALID = 1,
4389 +#define FE_INVALID FE_INVALID
4390 + FE_OVERFLOW = 4,
4391 +#define FE_OVERFLOW FE_OVERFLOW
4392 + FE_UNDERFLOW = 8,
4393 +#define FE_UNDERFLOW FE_UNDERFLOW
4394 + FE_INEXACT = 16,
4395 +#define FE_INEXACT FE_INEXACT
4396 + };
4397 +
4398 +/* Amount to shift by to convert an exception to a mask bit. */
4399 +#define FE_EXCEPT_SHIFT 5
4400 +
4401 +/* All supported exceptions. */
4402 +#define FE_ALL_EXCEPT \
4403 + (FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
4404 +
4405 +/* IEEE rounding modes. */
4406 +enum
4407 + {
4408 + FE_TONEAREST = 0,
4409 +#define FE_TONEAREST FE_TONEAREST
4410 + FE_TOWARDZERO = 0x400,
4411 +#define FE_TOWARDZERO FE_TOWARDZERO
4412 + FE_DOWNWARD = 0x800,
4413 +#define FE_DOWNWARD FE_DOWNWARD
4414 + FE_UPWARD = 0xc00,
4415 +#define FE_UPWARD FE_UPWARD
4416 + };
4417 +
4418 +#define FE_ROUND_MASK (FE_UPWARD)
4419 +
4420 +#else /* FPA */
4421 +
4422 /* Define bits representing exceptions in the FPU status word. */
4423 enum
4424 {
4425 @@ -44,6 +83,8 @@
4426 modes exist, but you have to encode them in the actual instruction. */
4427 #define FE_TONEAREST 0
4428
4429 +#endif
4430 +
4431 /* Type representing exception flags. */
4432 typedef unsigned long int fexcept_t;
4433
4434 --- ports/sysdeps/arm/fpu/bits/setjmp.h
4435 +++ ports/sysdeps/arm/fpu/bits/setjmp.h
4436 @@ -28,7 +28,11 @@
4437 #ifndef _ASM
4438 /* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not
4439 saved. */
4440 +#ifdef __MAVERICK__
4441 +typedef int __jmp_buf[34];
4442 +#else
4443 typedef int __jmp_buf[22];
4444 #endif
4445 +#endif
4446
4447 #endif
4448 --- ports/sysdeps/arm/fpu/jmpbuf-offsets.h
4449 +++ ports/sysdeps/arm/fpu/jmpbuf-offsets.h
4450 @@ -17,4 +17,8 @@
4451 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
4452 02111-1307 USA. */
4453
4454 +#ifdef __MAVERICK__
4455 +#define __JMP_BUF_SP 32
4456 +#else
4457 #define __JMP_BUF_SP 20
4458 +#endif
4459 --- ports/sysdeps/arm/fpu/fegetround.c
4460 +++ ports/sysdeps/arm/fpu/fegetround.c
4461 @@ -18,9 +18,21 @@
4462 02111-1307 USA. */
4463
4464 #include <fenv.h>
4465 +#include <fpu_control.h>
4466
4467 int
4468 fegetround (void)
4469 {
4470 +#if defined(__MAVERICK__)
4471 +
4472 + unsigned long temp;
4473 +
4474 + _FPU_GETCW (temp);
4475 + return temp & FE_ROUND_MASK;
4476 +
4477 +#else /* FPA */
4478 +
4479 return FE_TONEAREST; /* Easy. :-) */
4480 +
4481 +#endif
4482 }
4483 --- ports/sysdeps/arm/fpu/fesetround.c
4484 +++ ports/sysdeps/arm/fpu/fesetround.c
4485 @@ -18,12 +18,28 @@
4486 02111-1307 USA. */
4487
4488 #include <fenv.h>
4489 +#include <fpu_control.h>
4490
4491 int
4492 fesetround (int round)
4493 {
4494 +#if defined(__MAVERICK__)
4495 + unsigned long temp;
4496 +
4497 + if (round & ~FE_ROUND_MASK)
4498 + return 1;
4499 +
4500 + _FPU_GETCW (temp);
4501 + temp = (temp & ~FE_ROUND_MASK) | round;
4502 + _FPU_SETCW (temp);
4503 + return 0;
4504 +
4505 +#else /* FPA */
4506 +
4507 /* We only support FE_TONEAREST, so there is no need for any work. */
4508 return (round == FE_TONEAREST)?0:1;
4509 +
4510 +#endif
4511 }
4512
4513 libm_hidden_def (fesetround)
4514 --- ports/sysdeps/arm/fpu/fpu_control.h
4515 +++ ports/sysdeps/arm/fpu/fpu_control.h
4516 @@ -1,5 +1,6 @@
4517 /* FPU control word definitions. ARM version.
4518 - Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
4519 + Copyright (C) 1996, 1997, 1998, 2000, 2005
4520 + Free Software Foundation, Inc.
4521 This file is part of the GNU C Library.
4522
4523 The GNU C Library is free software; you can redistribute it and/or
4524 @@ -20,6 +21,79 @@
4525 #ifndef _FPU_CONTROL_H
4526 #define _FPU_CONTROL_H
4527
4528 +#if defined(__MAVERICK__)
4529 +
4530 +/* DSPSC register: (from EP9312 User's Guide)
4531 + *
4532 + * bits 31..29 - DAID
4533 + * bits 28..26 - HVID
4534 + * bits 25..24 - RSVD
4535 + * bit 23 - ISAT
4536 + * bit 22 - UI
4537 + * bit 21 - INT
4538 + * bit 20 - AEXC
4539 + * bits 19..18 - SAT
4540 + * bits 17..16 - FCC
4541 + * bit 15 - V
4542 + * bit 14 - FWDEN
4543 + * bit 13 - Invalid
4544 + * bit 12 - Denorm
4545 + * bits 11..10 - RM
4546 + * bits 9..5 - IXE, UFE, OFE, RSVD, IOE
4547 + * bits 4..0 - IX, UF, OF, RSVD, IO
4548 + */
4549 +
4550 +/* masking of interrupts */
4551 +#define _FPU_MASK_IM (1 << 5) /* invalid operation */
4552 +#define _FPU_MASK_ZM 0 /* divide by zero */
4553 +#define _FPU_MASK_OM (1 << 7) /* overflow */
4554 +#define _FPU_MASK_UM (1 << 8) /* underflow */
4555 +#define _FPU_MASK_PM (1 << 9) /* inexact */
4556 +#define _FPU_MASK_DM 0 /* denormalized operation */
4557 +
4558 +#define _FPU_RESERVED 0xfffff000 /* These bits are reserved. */
4559 +
4560 +#define _FPU_DEFAULT 0x00b00000 /* Default value. */
4561 +#define _FPU_IEEE 0x00b003a0 /* Default + exceptions enabled. */
4562 +
4563 +/* Type of the control word. */
4564 +typedef unsigned int fpu_control_t;
4565 +
4566 +/* Macros for accessing the hardware control word. */
4567 +#define _FPU_GETCW(cw) ({ \
4568 + register int __t1, __t2; \
4569 + \
4570 + __asm__ volatile ( \
4571 + "cfmvr64l %1, mvdx0\n\t" \
4572 + "cfmvr64h %2, mvdx0\n\t" \
4573 + "cfmv32sc mvdx0, dspsc\n\t" \
4574 + "cfmvr64l %0, mvdx0\n\t" \
4575 + "cfmv64lr mvdx0, %1\n\t" \
4576 + "cfmv64hr mvdx0, %2" \
4577 + : "=r" (cw), "=r" (__t1), "=r" (__t2) \
4578 + ); \
4579 +})
4580 +
4581 +#define _FPU_SETCW(cw) ({ \
4582 + register int __t0, __t1, __t2; \
4583 + \
4584 + __asm__ volatile ( \
4585 + "cfmvr64l %1, mvdx0\n\t" \
4586 + "cfmvr64h %2, mvdx0\n\t" \
4587 + "cfmv64lr mvdx0, %0\n\t" \
4588 + "cfmvsc32 dspsc, mvdx0\n\t" \
4589 + "cfmv64lr mvdx0, %1\n\t" \
4590 + "cfmv64hr mvdx0, %2" \
4591 + : "=r" (__t0), "=r" (__t1), "=r" (__t2) \
4592 + : "0" (cw) \
4593 + ); \
4594 +})
4595 +
4596 +/* Default control word set at startup. */
4597 +extern fpu_control_t __fpu_control;
4598 +
4599 +#else /* FPA */
4600 +
4601 /* We have a slight terminology confusion here. On the ARM, the register
4602 * we're interested in is actually the FPU status word - the FPU control
4603 * word is something different (which is implementation-defined and only
4604 @@ -99,4 +173,6 @@
4605 /* Default control word set at startup. */
4606 extern fpu_control_t __fpu_control;
4607
4608 +#endif
4609 +
4610 #endif /* _FPU_CONTROL_H */
4611 --- ports/sysdeps/arm/fpu/__longjmp.S
4612 +++ ports/sysdeps/arm/fpu/__longjmp.S
4613 @@ -30,7 +30,33 @@
4614 movs r0, r1 /* get the return value in place */
4615 moveq r0, #1 /* can't let setjmp() return zero! */
4616
4617 +#ifdef __MAVERICK__
4618 + cfldrd mvd4, [ip], #8
4619 + nop
4620 + cfldrd mvd5, [ip], #8
4621 + nop
4622 + cfldrd mvd6, [ip], #8
4623 + nop
4624 + cfldrd mvd7, [ip], #8
4625 + nop
4626 + cfldrd mvd8, [ip], #8
4627 + nop
4628 + cfldrd mvd9, [ip], #8
4629 + nop
4630 + cfldrd mvd10, [ip], #8
4631 + nop
4632 + cfldrd mvd11, [ip], #8
4633 + nop
4634 + cfldrd mvd12, [ip], #8
4635 + nop
4636 + cfldrd mvd13, [ip], #8
4637 + nop
4638 + cfldrd mvd14, [ip], #8
4639 + nop
4640 + cfldrd mvd15, [ip], #8
4641 +#else
4642 lfmfd f4, 4, [ip] ! /* load the floating point regs */
4643 +#endif
4644
4645 LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc})
4646 END (__longjmp)
4647 --- ports/sysdeps/arm/fpu/setjmp.S
4648 +++ ports/sysdeps/arm/fpu/setjmp.S
4649 @@ -24,11 +24,41 @@
4650
4651 ENTRY (__sigsetjmp)
4652 /* Save registers */
4653 +#ifdef __MAVERICK__
4654 + cfstrd mvd4, [r0], #8
4655 + nop
4656 + cfstrd mvd5, [r0], #8
4657 + nop
4658 + cfstrd mvd6, [r0], #8
4659 + nop
4660 + cfstrd mvd7, [r0], #8
4661 + nop
4662 + cfstrd mvd8, [r0], #8
4663 + nop
4664 + cfstrd mvd9, [r0], #8
4665 + nop
4666 + cfstrd mvd10, [r0], #8
4667 + nop
4668 + cfstrd mvd11, [r0], #8
4669 + nop
4670 + cfstrd mvd12, [r0], #8
4671 + nop
4672 + cfstrd mvd13, [r0], #8
4673 + nop
4674 + cfstrd mvd14, [r0], #8
4675 + nop
4676 + cfstrd mvd15, [r0], #8
4677 +#else
4678 sfmea f4, 4, [r0]!
4679 +#endif
4680 stmia r0, {v1-v6, sl, fp, sp, lr}
4681
4682 /* Restore pointer to jmp_buf */
4683 +#ifdef __MAVERICK__
4684 + sub r0, r0, #96
4685 +#else
4686 sub r0, r0, #48
4687 +#endif
4688
4689 /* Make a tail call to __sigjmp_save; it takes the same args. */
4690 B PLTJMP(C_SYMBOL_NAME(__sigjmp_save))
4691 --- ports/sysdeps/arm/gccframe.h
4692 +++ ports/sysdeps/arm/gccframe.h
4693 @@ -17,6 +17,10 @@
4694 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
4695 02111-1307 USA. */
4696
4697 +#ifdef __MAVERICK__
4698 +#define FIRST_PSEUDO_REGISTER 43
4699 +#else
4700 #define FIRST_PSEUDO_REGISTER 27
4701 +#endif
4702
4703 #include <sysdeps/generic/gccframe.h>
4704 --- ports/sysdeps/arm/gmp-mparam.h
4705 +++ ports/sysdeps/arm/gmp-mparam.h
4706 @@ -29,7 +29,7 @@
4707 #if defined(__ARMEB__)
4708 # define IEEE_DOUBLE_MIXED_ENDIAN 0
4709 # define IEEE_DOUBLE_BIG_ENDIAN 1
4710 -#elif defined(__VFP_FP__)
4711 +#elif defined(__VFP_FP__) || defined(__MAVERICK__)
4712 # define IEEE_DOUBLE_MIXED_ENDIAN 0
4713 # define IEEE_DOUBLE_BIG_ENDIAN 0
4714 #else
4715
4716
4717
4718 1.1 src/patchsets/glibc/2.13/6230_all_arm-glibc-hardened.patch
4719
4720 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/6230_all_arm-glibc-hardened.patch?rev=1.1&view=markup
4721 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/6230_all_arm-glibc-hardened.patch?rev=1.1&content-type=text/plain
4722
4723 Index: 6230_all_arm-glibc-hardened.patch
4724 ===================================================================
4725 patch by David Lamparter to fix build errors for hardened/arm systems.
4726 the logic in setjmp/__longjmp incorrectly tie to "PIC" to figure out
4727 whether the code is going into a shared library when it should be using
4728 "SHARED". otherwise, building static PIC code goes wrong.
4729
4730 https://bugs.gentoo.org/336914
4731
4732 --- ports/sysdeps/arm/eabi/setjmp.S
4733 +++ ports/sysdeps/arm/eabi/setjmp.S
4734 @@ -37,7 +37,7 @@
4735 add a3, a3, a4
4736 ldr a3, [a3, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
4737 #else
4738 -#ifdef PIC
4739 +#ifdef SHARED
4740 ldr a3, 1f
4741 ldr a4, Lrtld_global_ro
4742 0: add a3, pc, a3
4743 @@ -84,7 +84,7 @@
4744 Lrtld_local_ro:
4745 .long C_SYMBOL_NAME(_rtld_local_ro)(GOTOFF)
4746 #else
4747 -#ifdef PIC
4748 +#ifdef SHARED
4749 1: .long _GLOBAL_OFFSET_TABLE_ - 0b - 8
4750 Lrtld_global_ro:
4751 .long C_SYMBOL_NAME(_rtld_global_ro)(GOT)
4752 --- ports/sysdeps/arm/eabi/__longjmp.S
4753 +++ ports/sysdeps/arm/eabi/__longjmp.S
4754 @@ -43,7 +43,7 @@
4755 add a2, a2, a3
4756 ldr a2, [a2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
4757 #else
4758 -#ifdef PIC
4759 +#ifdef SHARED
4760 ldr a2, 1f
4761 ldr a3, Lrtld_global_ro
4762 0: add a2, pc, a2
4763 @@ -87,7 +87,7 @@
4764 Lrtld_local_ro:
4765 .long C_SYMBOL_NAME(_rtld_local_ro)(GOTOFF)
4766 #else
4767 -#ifdef PIC
4768 +#ifdef SHARED
4769 1: .long _GLOBAL_OFFSET_TABLE_ - 0b - 8
4770 Lrtld_global_ro:
4771 .long C_SYMBOL_NAME(_rtld_global_ro)(GOT)
4772
4773
4774
4775 1.1 src/patchsets/glibc/2.13/6240_all_glibc-2.8-nptl-lowlevellock.patch
4776
4777 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/6240_all_glibc-2.8-nptl-lowlevellock.patch?rev=1.1&view=markup
4778 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/6240_all_glibc-2.8-nptl-lowlevellock.patch?rev=1.1&content-type=text/plain
4779
4780 Index: 6240_all_glibc-2.8-nptl-lowlevellock.patch
4781 ===================================================================
4782 fix build error on arm like on hppa:
4783
4784 arm-unknown-linux-gnu-gcc ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -fno-strict-aliasing -g -pipe -Wstrict-prototypes -fPIC -I../include -I/var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl -I/var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl -I../ports/sysdeps/arm/elf -I../ports/sysdeps/unix/sysv/linux/arm/nptl -I../ports/sysdeps/unix/sysv/linux/arm -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../ports/sysdeps/unix/arm -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../
4785 sysdeps/posix -I../ports/sysdeps/arm/fpu -I../ports/sysdeps/arm/nptl -I../ports/sysdeps/arm -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I../ports -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/arm-unknown-linux-gnu/4.3.2/include -isystem /usr/lib/gcc/arm-unknown-linux-gnu/4.3.2/include-fixed -isystem /usr/arm-unknown-linux-gnu/usr/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DPIC -DSHARED -o /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os -MD -MP -MF /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os.dt -MT /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os -DNOT
4786 _IN_libc=1 -DIS_IN_rtld=1
4787 In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21:
4788 ../nptl/sysdeps/unix/sysv/linux/lowlevellock.c: In function '__lll_lock_wait_private':
4789 ../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: warning: implicit declaration of function 'THREAD_GETMEM'
4790 ../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'THREAD_SELF' undeclared (first use in this function)
4791 ../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: (Each undeclared identifier is reported only once
4792 ../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: for each function it appears in.)
4793 ../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'header' undeclared (first use in this function)
4794
4795 --- ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
4796 +++ ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
4797 @@ -25,6 +25,7 @@
4798 #include <atomic.h>
4799 #include <sysdep.h>
4800 #include <kernel-features.h>
4801 +#include <tls.h> /* Need THREAD_*, and header.*. */
4802
4803 #define FUTEX_WAIT 0
4804 #define FUTEX_WAKE 1
4805
4806
4807
4808 1.1 src/patchsets/glibc/2.13/6600_mips_librt-mips.patch
4809
4810 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/6600_mips_librt-mips.patch?rev=1.1&view=markup
4811 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/6600_mips_librt-mips.patch?rev=1.1&content-type=text/plain
4812
4813 Index: 6600_mips_librt-mips.patch
4814 ===================================================================
4815 we kind of screwed ourselves into a corner by having the clock symbols
4816 exported only with the glibc-2.0 version ... this patch fixes the
4817 export so all new binaries built against librt will use the correct
4818 glibc-2.2 symbol version
4819
4820 one day, we'll just drop this on the floor (maybe after 2006.1)
4821
4822 --- ports/sysdeps/unix/sysv/linux/mips/Versions
4823 +++ ports/sysdeps/unix/sysv/linux/mips/Versions
4824 @@ -34,3 +34,9 @@
4825 _test_and_set;
4826 }
4827 }
4828 +librt {
4829 + GLIBC_2.0 {
4830 + # c*
4831 + clock_gettime; clock_settime;
4832 + }
4833 +}
4834 --- Versions.def
4835 +++ Versions.def
4836 @@ -90,6 +90,7 @@
4837 GLIBC_PRIVATE
4838 }
4839 librt {
4840 + GLIBC_2.0
4841 GLIBC_2.1
4842 GLIBC_2.2
4843 GLIBC_2.3
4844 --- sysdeps/unix/clock_gettime.c
4845 +++ sysdeps/unix/clock_gettime.c
4846 @@ -23,6 +23,7 @@
4847 #include <sys/time.h>
4848 #include <libc-internal.h>
4849 #include <ldsodefs.h>
4850 +#include <shlib-compat.h>
4851
4852
4853 #if HP_TIMING_AVAIL
4854 @@ -90,7 +91,7 @@
4855
4856 /* Get current value of CLOCK and store it in TP. */
4857 int
4858 -clock_gettime (clockid_t clock_id, struct timespec *tp)
4859 +__clock_gettime (clockid_t clock_id, struct timespec *tp)
4860 {
4861 int retval = -1;
4862 struct timeval tv;
4863 @@ -131,4 +132,10 @@
4864
4865 return retval;
4866 }
4867 -librt_hidden_def (clock_gettime)
4868 +versioned_symbol (librt, __clock_gettime, clock_gettime, GLIBC_2_2);
4869 +librt_hidden_ver (__clock_gettime, clock_gettime)
4870 +
4871 +#if defined __mips__ && defined SHARED
4872 +strong_alias (__clock_gettime, __mips_clock_gettime)
4873 +compat_symbol (librt, __mips_clock_gettime, clock_gettime, GLIBC_2_0);
4874 +#endif
4875 --- sysdeps/unix/clock_settime.c
4876 +++ sysdeps/unix/clock_settime.c
4877 @@ -21,6 +21,7 @@
4878 #include <sys/time.h>
4879 #include <libc-internal.h>
4880 #include <ldsodefs.h>
4881 +#include <shlib-compat.h>
4882
4883
4884 #if HP_TIMING_AVAIL
4885 @@ -38,7 +39,7 @@
4886
4887 /* Set CLOCK to value TP. */
4888 int
4889 -clock_settime (clockid_t clock_id, const struct timespec *tp)
4890 +__clock_settime (clockid_t clock_id, const struct timespec *tp)
4891 {
4892 int retval;
4893
4894 @@ -123,3 +124,9 @@
4895
4896 return retval;
4897 }
4898 +versioned_symbol (librt, __clock_settime, clock_settime, GLIBC_2_2);
4899 +
4900 +#if defined __mips__ && defined SHARED
4901 +strong_alias (__clock_settime, __mips_clock_settime)
4902 +compat_symbol (librt, __mips_clock_settime, clock_settime, GLIBC_2_0);
4903 +#endif
4904
4905
4906
4907 1.1 src/patchsets/glibc/2.13/6605_all_glibc-2.4-fpu-cw-mips.patch
4908
4909 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/6605_all_glibc-2.4-fpu-cw-mips.patch?rev=1.1&view=markup
4910 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/6605_all_glibc-2.4-fpu-cw-mips.patch?rev=1.1&content-type=text/plain
4911
4912 Index: 6605_all_glibc-2.4-fpu-cw-mips.patch
4913 ===================================================================
4914 http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html
4915
4916 --- ports/sysdeps/mips/fpu_control.h
4917 +++ ports/sysdeps/mips/fpu_control.h
4918 @@ -74,7 +74,7 @@
4919 #define _FPU_RC_UP 0x2
4920 #define _FPU_RC_DOWN 0x3
4921
4922 -#define _FPU_RESERVED 0xfe3c0000 /* Reserved bits in cw */
4923 +#define _FPU_RESERVED 0xfebc0000 /* Reserved bits in cw */
4924
4925
4926 /* The fdlibm code requires strict IEEE double precision arithmetic,
4927
4928
4929
4930 1.1 src/patchsets/glibc/2.13/6606_all_mips-glibc-delete-getpagesize.c.patch
4931
4932 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/6606_all_mips-glibc-delete-getpagesize.c.patch?rev=1.1&view=markup
4933 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/6606_all_mips-glibc-delete-getpagesize.c.patch?rev=1.1&content-type=text/plain
4934
4935 Index: 6606_all_mips-glibc-delete-getpagesize.c.patch
4936 ===================================================================
4937 From 773312afa74b1c182ab0ed98300356606026842d Mon Sep 17 00:00:00 2001
4938 From: Matt Turner <mattst88@×××××.com>
4939 Date: Tue, 30 Nov 2010 20:00:22 -0500
4940 Subject: [PATCH] MIPS: delete getpagesize.c
4941
4942 MIPS' getpagesize.c just included ia64's getpagesize.c, which was in
4943 turn just the implementation sysdeps/unix/sysv/linux/getpagesize.c with
4944 ifdef __ASSUME_AT_PAGESIZE which is defined on all Linux platforms since
4945 2.4.0-pre. Just use the generic implementation which will do the exact
4946 same thing.
4947
4948 Signed-off-by: Matt Turner <mattst88@×××××.com>
4949 ---
4950 diff --git a/sysdeps/unix/sysv/linux/mips/getpagesize.c b/sysdeps/unix/sysv/linux/mips/getpagesize.c
4951 deleted file mode 100644
4952 index 49492e5..0000000
4953 --- ports/sysdeps/unix/sysv/linux/mips/getpagesize.c
4954 +++ /dev/null
4955 @@ -1 +0,0 @@
4956 -#include <sysdeps/unix/sysv/linux/ia64/getpagesize.c>
4957 --
4958 1.7.2.2
4959
4960
4961
4962
4963 1.1 src/patchsets/glibc/2.13/README.history
4964
4965 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/README.history?rev=1.1&view=markup
4966 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.13/README.history?rev=1.1&content-type=text/plain
4967
4968 Index: README.history
4969 ===================================================================
4970 1 05.02.2011
4971 + 0020_all_glibc-tweak-rfc1918-lookup.patch
4972 + 0030_all_glibc-respect-env-CPPFLAGS.patch
4973 + 0055_all_glibc-2.12-static-shared-getpagesize.patch
4974 + 0085_all_glibc-disable-ldconfig.patch
4975 + 1010_all_glibc-queue-header-updates.patch
4976 + 1020_all_glibc-longjmp-chk-hidden-fortify.patch
4977 + 1030_all_glibc-manual-no-perl.patch
4978 + 1040_all_2.3.3-localedef-fix-trampoline.patch
4979 + 1055_all_glibc-resolv-dynamic.patch
4980 + 1060_all_glibc-localedef-mmap.patch
4981 + 1070_all_glibc-fadvise64_64.patch
4982 + 1075_all_glibc-section-comments.patch
4983 + 1080_all_glibc-no-inline-gmon.patch
4984 + 1085_all_glibc-2.9-check_native-headers.patch
4985 + 1090_all_glibc-2.3.6-fix-pr631.patch
4986 + 1095_all_glibc-2.9-assume-pipe2.patch
4987 + 1100_all_glibc-2.3.3-china.patch
4988 + 1103_all_glibc-new-valencian-locale.patch
4989 + 1120_all_glibc-2.11-longjmp-chk-fallback.patch
4990 + 1130_all_glibc-2.4-undefine-__i686.patch
4991 + 1160_all_glibc-2.8-nscd-one-fork.patch
4992 + 1503_hppa_glibc-2.7-hppa-nptl-carlos.patch
4993 + 1505_hppa_glibc-2.11-hppa-nptl.patch
4994 + 1509_all_glibc-2.11-hppa-SOCK_CLOEXEC.patch
4995 + 1530_all_glibc-m68k-sys-user.patch
4996 + 3000_all_2.3.6-dl_execstack-PaX-support.patch
4997 + 3010_all_2.3.3_pre20040117-pt_pax.patch
4998 + 3020_all_glibc-tests-sandbox-libdl-paths.patch
4999 + 5063_all_glibc-dont-build-timezone.patch
5000 + 6018_all_alpha-glibc-2.8-cache-shape.patch
5001 + 6020_all_alpha-fix-gcc-4.1-warnings.patch
5002 + 6022_alpha_alpha-add-fdatasync-support.patch
5003 + 6026_all_alpha-fix-rtld-fPIC.patch
5004 + 6028_all_alpha-fix-memchr.patch
5005 + 6029_all_alpha-fix-memchr.patch
5006 + 6031_all_alpha-glibc-2.12-epoll_create1.patch
5007 + 6032_all_alpha-syscall-6.patch
5008 + 6120_all_ppc-glibc-2.9-atomic.patch
5009 + 6130_all_ppc-glibc-2.11-cell-vector.patch
5010 + 6220_all_glibc-2.4-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
5011 + 6230_all_arm-glibc-hardened.patch
5012 + 6240_all_glibc-2.8-nptl-lowlevellock.patch
5013 + 6600_mips_librt-mips.patch
5014 + 6605_all_glibc-2.4-fpu-cw-mips.patch
5015 + 6606_all_mips-glibc-delete-getpagesize.c.patch