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.7: 1501_hppa_glibc-2.7-hppa-atomic_h.patch 1502_hppa_glibc-2.7-hppa-fadvise64_64.patch 1503_hppa_glibc-2.7-hppa-nptl-carlos.patch 1504_hppa_glibc-2.7-hppa-pie.patch README.history
Date: Sat, 29 Dec 2007 07:09:16
Message-Id: E1J8Vof-0007Y2-9B@stork.gentoo.org
1 vapier 07/12/29 07:09:05
2
3 Modified: README.history
4 Added: 1501_hppa_glibc-2.7-hppa-atomic_h.patch
5 1502_hppa_glibc-2.7-hppa-fadvise64_64.patch
6 1503_hppa_glibc-2.7-hppa-nptl-carlos.patch
7 1504_hppa_glibc-2.7-hppa-pie.patch
8 Log:
9 add hppa patches and cut 1.6 patchset
10
11 Revision Changes Path
12 1.9 src/patchsets/glibc/2.7/README.history
13
14 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/README.history?rev=1.9&view=markup
15 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/README.history?rev=1.9&content-type=text/plain
16 diff : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/README.history?r1=1.8&r2=1.9
17
18 Index: README.history
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo/src/patchsets/glibc/2.7/README.history,v
21 retrieving revision 1.8
22 retrieving revision 1.9
23 diff -u -r1.8 -r1.9
24 --- README.history 24 Dec 2007 19:24:06 -0000 1.8
25 +++ README.history 29 Dec 2007 07:09:04 -0000 1.9
26 @@ -1,3 +1,9 @@
27 +1.6 12.29.2007
28 + + 1501_hppa_glibc-2.7-hppa-atomic_h.patch
29 + + 1502_hppa_glibc-2.7-hppa-fadvise64_64.patch
30 + + 1503_hppa_glibc-2.7-hppa-nptl-carlos.patch
31 + + 1504_hppa_glibc-2.7-hppa-pie.patch
32 +
33 1.5 12.24.2007
34 + 1050_all_glibc-posix-awk.patch
35
36
37
38
39 1.1 src/patchsets/glibc/2.7/1501_hppa_glibc-2.7-hppa-atomic_h.patch
40
41 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1501_hppa_glibc-2.7-hppa-atomic_h.patch?rev=1.1&view=markup
42 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1501_hppa_glibc-2.7-hppa-atomic_h.patch?rev=1.1&content-type=text/plain
43
44 Index: 1501_hppa_glibc-2.7-hppa-atomic_h.patch
45 ===================================================================
46 2007-05-22 Aurelien Jarno <aurelien@×××××××.net>
47
48 * sysdeps/unix/sysv/linux/hppa/bits/atomic.h: check for -11
49 (-EAGAIN) instead of 11. Loop again when the kernel returns
50 error -45 (-EDEADLOCK) to workaround a kernel bug (debugging
51 code enabled).
52
53 --- ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h.orig
54 +++ ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
55 @@ -56,10 +56,14 @@
56 #define LWS_CAS "0"
57 /* Note r31 is the link register */
58 #define LWS_CLOBBER "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31", "memory"
59 -#define ASM_EAGAIN "11"
60
61 #if __ASSUME_LWS_CAS
62 -/* The only basic operation needed is compare and exchange. */
63 +/* The only basic operation needed is compare and exchange.
64 + -11 corresponds to -EAGAIN, and -45 to -EDEADLOCK. The constants
65 + must stay the same to avoid breaking backwards compatibility.
66 +
67 + The check for -EDEADLOCK workarounds a kernel bug (debugging code
68 + enabled by default). */
69 # define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \
70 ({ \
71 volatile int lws_errno = EFAULT; \
72 @@ -71,7 +75,10 @@
73 "copy %5, %%r24 \n\t" \
74 "ble " LWS "(%%sr2, %%r0) \n\t" \
75 "ldi " LWS_CAS ", %%r20 \n\t" \
76 - "cmpib,=,n " ASM_EAGAIN ",%%r21,0b \n\t" \
77 + "cmpib,=,n -11,%%r21,0b \n\t" \
78 + "nop \n\t" \
79 + "ldi -45, %%r24 \n\t" \
80 + "cmpb,=,n %%r24,%%r21,0b \n\t" \
81 "nop \n\t" \
82 "stw %%r28, %0 \n\t" \
83 "sub %%r0, %%r21, %%r21 \n\t" \
84
85
86
87 1.1 src/patchsets/glibc/2.7/1502_hppa_glibc-2.7-hppa-fadvise64_64.patch
88
89 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1502_hppa_glibc-2.7-hppa-fadvise64_64.patch?rev=1.1&view=markup
90 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1502_hppa_glibc-2.7-hppa-fadvise64_64.patch?rev=1.1&content-type=text/plain
91
92 Index: 1502_hppa_glibc-2.7-hppa-fadvise64_64.patch
93 ===================================================================
94 Index: sysdeps/unix/sysv/linux/posix_fadvise.c
95 ===================================================================
96 RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/posix_fadvise.c,v
97 retrieving revision 1.3
98 diff -u -p -r1.3 posix_fadvise.c
99 --- sysdeps/unix/sysv/linux/posix_fadvise.c 17 Aug 2003 00:36:22 -0000 1.3
100 +++ sysdeps/unix/sysv/linux/posix_fadvise.c 28 Jul 2007 21:19:14 -0000
101 @@ -35,6 +35,19 @@ posix_fadvise (int fd, off_t offset, off
102 return INTERNAL_SYSCALL_ERRNO (ret, err);
103 return 0;
104 #else
105 +# ifdef __NR_fadvise64_64
106 + INTERNAL_SYSCALL_DECL (err);
107 + int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd,
108 + __LONG_LONG_PAIR ((long) (offset >> 31),
109 + (long) offset),
110 + __LONG_LONG_PAIR ((long) (len >> 31),
111 + (long) len),
112 + advise);
113 + if (INTERNAL_SYSCALL_ERROR_P (ret, err))
114 + return INTERNAL_SYSCALL_ERRNO (ret, err);
115 + return 0;
116 +# else
117 return ENOSYS;
118 +# endif
119 #endif
120 }
121
122
123
124 1.1 src/patchsets/glibc/2.7/1503_hppa_glibc-2.7-hppa-nptl-carlos.patch
125
126 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1503_hppa_glibc-2.7-hppa-nptl-carlos.patch?rev=1.1&view=markup
127 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1503_hppa_glibc-2.7-hppa-nptl-carlos.patch?rev=1.1&content-type=text/plain
128
129 Index: 1503_hppa_glibc-2.7-hppa-nptl-carlos.patch
130 ===================================================================
131 --- elf/rtld.c.orig
132 +++ elf/rtld.c
133 @@ -379,14 +379,14 @@
134 know it is available. We do not have to clear the memory if we
135 do not have to use the temporary bootstrap_map. Global variables
136 are initialized to zero by default. */
137 -#ifndef DONT_USE_BOOTSTRAP_MAP
138 +#if !defined DONT_USE_BOOTSTRAP_MAP
139 # ifdef HAVE_BUILTIN_MEMSET
140 __builtin_memset (bootstrap_map.l_info, '\0', sizeof (bootstrap_map.l_info));
141 # else
142 - for (size_t cnt = 0;
143 - cnt < sizeof (bootstrap_map.l_info) / sizeof (bootstrap_map.l_info[0]);
144 - ++cnt)
145 - bootstrap_map.l_info[cnt] = 0;
146 + /* Clear the whole bootstrap_map structure */
147 + for (char *cnt = (char *)&(bootstrap_map);
148 + cnt < ((char *)&(bootstrap_map) + sizeof (bootstrap_map));
149 + *cnt++ = '\0');
150 # endif
151 # if USE___THREAD
152 bootstrap_map.l_tls_modid = 0;
153 --- include/atomic.h.orig
154 +++ include/atomic.h
155 @@ -174,7 +174,7 @@
156 __typeof (*(mem)) __atg5_value = (newvalue); \
157 \
158 do \
159 - __atg5_oldval = *__atg5_memp; \
160 + __atg5_oldval = *(volatile __typeof (mem))__atg5_memp; \
161 while (__builtin_expect \
162 (atomic_compare_and_exchange_bool_acq (__atg5_memp, __atg5_value, \
163 __atg5_oldval), 0)); \
164 @@ -195,7 +195,7 @@
165 __typeof (*(mem)) __atg6_value = (value); \
166 \
167 do \
168 - __atg6_oldval = *__atg6_memp; \
169 + __atg6_oldval = *(volatile __typeof (mem))__atg6_memp; \
170 while (__builtin_expect \
171 (atomic_compare_and_exchange_bool_acq (__atg6_memp, \
172 __atg6_oldval \
173 @@ -213,7 +213,7 @@
174 __typeof (*(mem)) __atg7_value = (value); \
175 \
176 do \
177 - __atg7_oldv = *__atg7_memp; \
178 + __atg7_oldv = *(volatile __typeof (mem))__atg7_memp; \
179 while (__builtin_expect \
180 (catomic_compare_and_exchange_bool_acq (__atg7_memp, \
181 __atg7_oldv \
182 @@ -231,7 +231,7 @@
183 __typeof (mem) __atg8_memp = (mem); \
184 __typeof (*(mem)) __atg8_value = (value); \
185 do { \
186 - __atg8_oldval = *__atg8_memp; \
187 + __atg8_oldval = *(volatile __typeof (mem))__atg8_memp; \
188 if (__atg8_oldval >= __atg8_value) \
189 break; \
190 } while (__builtin_expect \
191 @@ -248,7 +248,7 @@
192 __typeof (mem) __atg9_memp = (mem); \
193 __typeof (*(mem)) __atg9_value = (value); \
194 do { \
195 - __atg9_oldv = *__atg9_memp; \
196 + __atg9_oldv = *(volatile __typeof (mem))__atg9_memp; \
197 if (__atg9_oldv >= __atg9_value) \
198 break; \
199 } while (__builtin_expect \
200 @@ -266,7 +266,7 @@
201 __typeof (mem) __atg10_memp = (mem); \
202 __typeof (*(mem)) __atg10_value = (value); \
203 do { \
204 - __atg10_oldval = *__atg10_memp; \
205 + __atg10_oldval = *(volatile __typeof (mem))__atg10_memp; \
206 if (__atg10_oldval <= __atg10_value) \
207 break; \
208 } while (__builtin_expect \
209 @@ -350,7 +350,7 @@
210 \
211 do \
212 { \
213 - __atg11_oldval = *__atg11_memp; \
214 + __atg11_oldval = *(volatile __typeof (mem))__atg11_memp; \
215 if (__builtin_expect (__atg11_oldval <= 0, 0)) \
216 break; \
217 } \
218 @@ -389,7 +389,7 @@
219 __typeof (*(mem)) __atg14_mask = ((__typeof (*(mem))) 1 << (bit)); \
220 \
221 do \
222 - __atg14_old = (*__atg14_memp); \
223 + __atg14_old = (*(volatile __typeof (mem))__atg14_memp); \
224 while (__builtin_expect \
225 (atomic_compare_and_exchange_bool_acq (__atg14_memp, \
226 __atg14_old | __atg14_mask,\
227 @@ -407,7 +407,7 @@
228 __typeof (*(mem)) __atg15_mask = (mask); \
229 \
230 do \
231 - __atg15_old = (*__atg15_memp); \
232 + __atg15_old = (*(volatile __typeof (mem))__atg15_memp); \
233 while (__builtin_expect \
234 (atomic_compare_and_exchange_bool_acq (__atg15_memp, \
235 __atg15_old & __atg15_mask, \
236 @@ -423,7 +423,7 @@
237 __typeof (*(mem)) __atg16_mask = (mask); \
238 \
239 do \
240 - __atg16_old = (*__atg16_memp); \
241 + __atg16_old = (*(volatile __typeof (mem))__atg16_memp); \
242 while (__builtin_expect \
243 (atomic_compare_and_exchange_bool_acq (__atg16_memp, \
244 __atg16_old & __atg16_mask,\
245 @@ -441,7 +441,7 @@
246 __typeof (*(mem)) __atg17_mask = (mask); \
247 \
248 do \
249 - __atg17_old = (*__atg17_memp); \
250 + __atg17_old = (*(volatile __typeof (mem))__atg17_memp); \
251 while (__builtin_expect \
252 (atomic_compare_and_exchange_bool_acq (__atg17_memp, \
253 __atg17_old | __atg17_mask, \
254 @@ -457,7 +457,7 @@
255 __typeof (*(mem)) __atg18_mask = (mask); \
256 \
257 do \
258 - __atg18_old = (*__atg18_memp); \
259 + __atg18_old = (*(volatile __typeof (mem))__atg18_memp); \
260 while (__builtin_expect \
261 (catomic_compare_and_exchange_bool_acq (__atg18_memp, \
262 __atg18_old | __atg18_mask,\
263 @@ -473,7 +473,7 @@
264 __typeof (*(mem)) __atg19_mask = (mask); \
265 \
266 do \
267 - __atg19_old = (*__atg19_memp); \
268 + __atg19_old = (*(volatile __typeof (mem))__atg19_memp); \
269 while (__builtin_expect \
270 (atomic_compare_and_exchange_bool_acq (__atg19_memp, \
271 __atg19_old | __atg19_mask,\
272 --- nptl/Makefile.orig
273 +++ nptl/Makefile
274 @@ -263,9 +263,9 @@
275 # Files which must not be linked with libpthread.
276 tests-nolibpthread = tst-unload
277
278 -# This sets the stack resource limit to 1023kb, which is not a multiple
279 -# of the page size since every architecture's page size is > 1k.
280 -tst-oddstacklimit-ENV = ; ulimit -s 1023;
281 +# This sets the stack resource limit to 8193kb, which is not a multiple
282 +# of the page size since every architecture's page size is 4096 bytes.
283 +tst-oddstacklimit-ENV = ; ulimit -s 8193;
284
285 distribute = eintr.c tst-cleanup4aux.c
286
287 @@ -424,6 +424,35 @@
288 CFLAGS-tst-cleanupx4.c += -fexceptions
289 CFLAGS-tst-oncex3.c += -fexceptions
290 CFLAGS-tst-oncex4.c += -fexceptions
291 +
292 +ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed
293 +LDFLAGS-tst-cancelx2 += $(ldflags-libgcc_s)
294 +LDFLAGS-tst-cancelx3 += $(ldflags-libgcc_s)
295 +LDFLAGS-tst-cancelx4 += $(ldflags-libgcc_s)
296 +LDFLAGS-tst-cancelx5 += $(ldflags-libgcc_s)
297 +LDFLAGS-tst-cancelx6 += $(ldflags-libgcc_s)
298 +LDFLAGS-tst-cancelx7 += $(ldflags-libgcc_s)
299 +LDFLAGS-tst-cancelx8 += $(ldflags-libgcc_s)
300 +LDFLAGS-tst-cancelx9 += $(ldflags-libgcc_s)
301 +LDFLAGS-tst-cancelx10 += $(ldflags-libgcc_s)
302 +LDFLAGS-tst-cancelx11 += $(ldflags-libgcc_s)
303 +LDFLAGS-tst-cancelx12 += $(ldflags-libgcc_s)
304 +LDFLAGS-tst-cancelx13 += $(ldflags-libgcc_s)
305 +LDFLAGS-tst-cancelx14 += $(ldflags-libgcc_s)
306 +LDFLAGS-tst-cancelx15 += $(ldflags-libgcc_s)
307 +LDFLAGS-tst-cancelx16 += $(ldflags-libgcc_s)
308 +LDFLAGS-tst-cancelx17 += $(ldflags-libgcc_s)
309 +LDFLAGS-tst-cancelx18 += $(ldflags-libgcc_s)
310 +LDFLAGS-tst-cancelx20 += $(ldflags-libgcc_s)
311 +LDFLAGS-tst-cancelx21 += $(ldflags-libgcc_s)
312 +LDFLAGS-tst-cleanupx0 += $(ldflags-libgcc_s)
313 +LDFLAGS-tst-cleanupx1 += $(ldflags-libgcc_s)
314 +LDFLAGS-tst-cleanupx2 += $(ldflags-libgcc_s)
315 +LDFLAGS-tst-cleanupx3 += $(ldflags-libgcc_s)
316 +LDFLAGS-tst-cleanupx4 += $(ldflags-libgcc_s)
317 +LDFLAGS-tst-oncex3 += $(ldflags-libgcc_s)
318 +LDFLAGS-tst-oncex4 += $(ldflags-libgcc_s)
319 +
320 CFLAGS-tst-align.c += $(stack-align-test-flags)
321 CFLAGS-tst-align3.c += $(stack-align-test-flags)
322 CFLAGS-tst-initializers1.c = -W -Wall -Werror
323 --- nptl.orig/pthread_barrier_wait.c
324 +++ nptl/pthread_barrier_wait.c
325 @@ -64,7 +64,7 @@
326 do
327 lll_futex_wait (&ibarrier->curr_event, event,
328 ibarrier->private ^ FUTEX_PRIVATE_FLAG);
329 - while (event == ibarrier->curr_event);
330 + while (event == *(volatile unsigned int *)&ibarrier->curr_event);
331 }
332
333 /* Make sure the init_count is stored locally or in a register. */
334 --- nptl/sysdeps/pthread/Makefile.orig
335 +++ nptl/sysdeps/pthread/Makefile
336 @@ -41,7 +41,9 @@
337
338 ifeq ($(have-forced-unwind),yes)
339 tests += tst-mqueue8x
340 +ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed
341 CFLAGS-tst-mqueue8x.c += -fexceptions
342 +LDFLAGS-tst-mqueue8x += $(ldflags-libgcc_s)
343 endif
344 endif
345
346 --- stdio-common/Makefile.orig
347 +++ stdio-common/Makefile
348 @@ -79,7 +79,7 @@
349 $(SHELL) -e tst-printf.sh $(common-objpfx) '$(run-program-prefix)'
350 endif
351
352 -CFLAGS-vfprintf.c = -Wno-uninitialized
353 +CFLAGS-vfprintf.c = -Wno-uninitialized -fno-delayed-branch
354 CFLAGS-vfwprintf.c = -Wno-uninitialized
355 CFLAGS-tst-printf.c = -Wno-format
356 CFLAGS-tstdiomisc.c = -Wno-format
357 --- sunrpc/clnt_udp.c.orig
358 +++ sunrpc/clnt_udp.c
359 @@ -419,7 +419,7 @@
360 while (inlen < 0 && errno == EINTR);
361 if (inlen < 0)
362 {
363 - if (errno == EWOULDBLOCK)
364 + if (errno == EWOULDBLOCK || errno == EAGAIN)
365 continue;
366 cu->cu_error.re_errno = errno;
367 return (cu->cu_error.re_status = RPC_CANTRECV);
368
369
370
371 1.1 src/patchsets/glibc/2.7/1504_hppa_glibc-2.7-hppa-pie.patch
372
373 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1504_hppa_glibc-2.7-hppa-pie.patch?rev=1.1&view=markup
374 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1504_hppa_glibc-2.7-hppa-pie.patch?rev=1.1&content-type=text/plain
375
376 Index: 1504_hppa_glibc-2.7-hppa-pie.patch
377 ===================================================================
378 --- glibc-2.6.orig/ports/sysdeps/hppa/elf/start.S
379 +++ glibc-2.6/ports/sysdeps/hppa/elf/start.S
380 @@ -96,16 +96,16 @@
381
382 #if SHARED
383 /* load main (1st argument) */
384 - addil LR'.Lpmain, %r19
385 - ldw RR'.Lpmain(%r1), %r26
386 + addil LT'.Lpmain, %r19
387 + ldw RT'.Lpmain(%r1), %r26
388 ldw 0(%r26),%r26
389 /* void (*init) (void) (4th argument) */
390 - addil LR'.Lp__libc_csu_init, %r19
391 - ldw RR'.Lp__libc_csu_init(%r1), %r23
392 + addil LT'.Lp__libc_csu_init, %r19
393 + ldw RT'.Lp__libc_csu_init(%r1), %r23
394 ldw 0(%r23), %r23
395 /* void (*fini) (void) (5th argument) */
396 - addil LR'.Lp__libc_csu_fini, %r19
397 - ldw RR'.Lp__libc_csu_fini(%r1), %r22
398 + addil LT'.Lp__libc_csu_fini, %r19
399 + ldw RT'.Lp__libc_csu_fini(%r1), %r22
400 ldw 0(%r22), %r22
401 #else
402 /* load main (1st argument) */
403
404
405
406 --
407 gentoo-commits@g.o mailing list