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 <kazu@××××××××××××.com> |
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 ("\n/*@_init_PROLOG_BEGINS*/"); |
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; |