Gentoo Archives: gentoo-commits

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