1 |
vapier 15/02/09 15:41:19 |
2 |
|
3 |
Added: |
4 |
00_all_00_all_0001-disable-ldconfig-during-install.patch |
5 |
00_all_00_all_0002-workaround-crash-when-handling-signals-in-static-PIE.patch |
6 |
00_all_00_all_0003-make-fortify-logic-checks-less-angry.patch |
7 |
00_all_00_all_0004-Fix-localedef-segfault-when-run-under-exec-shield-Pa.patch |
8 |
00_all_00_all_0005-reload-etc-resolv.conf-when-it-has-changed.patch |
9 |
00_all_00_all_0006-nptl-support-thread-stacks-that-grow-up.patch |
10 |
00_all_00_all_0007-rtld-do-not-ignore-arch-specific-CFLAGS.patch |
11 |
00_all_00_all_0008-gentoo-support-running-tests-under-sandbox.patch |
12 |
00_all_00_all_0009-gentoo-disable-building-in-timezone-subdir.patch |
13 |
00_all_00_all_0010-arm-fix-PIC-vs-SHARED-typos.patch |
14 |
00_all_00_all_0011-hppa-fix-build-problems-with-atomic-code.patch |
15 |
00_all_00_all_0012-hppa-fix-bug-in-floating-point-exception-support.patch |
16 |
00_all_00_all_0013-hppa-fix-pthread-spinlock.patch |
17 |
00_all_00_all_0014-hppa-fix-__O_SYNC-to-match-the-kernel.patch |
18 |
00_all_00_all_0015-disable-PIE-when-checking-for-PIC-default.patch |
19 |
README.history |
20 |
Log: |
21 |
initial 2.21 patchset based on last 2.20 patchset |
22 |
|
23 |
Revision Changes Path |
24 |
1.1 src/patchsets/glibc/2.21/00_all_00_all_0001-disable-ldconfig-during-install.patch |
25 |
|
26 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.21/00_all_00_all_0001-disable-ldconfig-during-install.patch?rev=1.1&view=markup |
27 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.21/00_all_00_all_0001-disable-ldconfig-during-install.patch?rev=1.1&content-type=text/plain |
28 |
|
29 |
Index: 00_all_00_all_0001-disable-ldconfig-during-install.patch |
30 |
=================================================================== |
31 |
From 1a8236dcac0e7d5aa5148d96da46b0f204b20140 Mon Sep 17 00:00:00 2001 |
32 |
From: Mike Frysinger <vapier@g.o> |
33 |
Date: Sat, 4 May 2013 14:07:11 -0400 |
34 |
Subject: [PATCH] disable ldconfig during install |
35 |
|
36 |
do not bother running ldconfig on DESTDIR. it wants to write the temp cache |
37 |
file outside of the chroot. doesnt matter anyways as we wont use the cache |
38 |
results (portage will rebuild cache), so running ldconfig is simply a waste |
39 |
of time. |
40 |
|
41 |
http://sourceware.org/ml/libc-alpha/2012-08/msg00118.html |
42 |
https://bugs.gentoo.org/431038 |
43 |
--- |
44 |
Makefile | 1 + |
45 |
1 file changed, 1 insertion(+) |
46 |
|
47 |
diff --git a/Makefile b/Makefile |
48 |
index 17e796f..e25e8be 100644 |
49 |
--- a/Makefile |
50 |
+++ b/Makefile |
51 |
@@ -105,6 +105,7 @@ install-symbolic-link: subdir_install |
52 |
rm -f $(symbolic-link-list) |
53 |
|
54 |
install: |
55 |
+dont-bother-with-destdir: |
56 |
-test ! -x $(elf-objpfx)ldconfig || LC_ALL=C \ |
57 |
$(elf-objpfx)ldconfig $(addprefix -r ,$(install_root)) \ |
58 |
$(slibdir) $(libdir) |
59 |
-- |
60 |
2.2.1 |
61 |
|
62 |
|
63 |
|
64 |
|
65 |
1.1 src/patchsets/glibc/2.21/00_all_00_all_0002-workaround-crash-when-handling-signals-in-static-PIE.patch |
66 |
|
67 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.21/00_all_00_all_0002-workaround-crash-when-handling-signals-in-static-PIE.patch?rev=1.1&view=markup |
68 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.21/00_all_00_all_0002-workaround-crash-when-handling-signals-in-static-PIE.patch?rev=1.1&content-type=text/plain |
69 |
|
70 |
Index: 00_all_00_all_0002-workaround-crash-when-handling-signals-in-static-PIE.patch |
71 |
=================================================================== |
72 |
From f438358f77081b62eeb7565b2aed11d149c2e0e5 Mon Sep 17 00:00:00 2001 |
73 |
From: Mike Frysinger <vapier@g.o> |
74 |
Date: Sat, 4 May 2013 14:10:41 -0400 |
75 |
Subject: [PATCH] workaround crash when handling signals in static PIEs |
76 |
|
77 |
work around ... not entirely sure what is going on here. |
78 |
|
79 |
2011-03-01 squeezy <vina@××××××××××.eu> |
80 |
|
81 |
* sysdeps/unix/sysv/linux/x86_64/sigaction.c fix the __restore_rt symbol |
82 |
|
83 |
http://bugs.gentoo.org/283470 |
84 |
--- |
85 |
sysdeps/unix/sysv/linux/x86_64/sigaction.c | 2 +- |
86 |
1 file changed, 1 insertion(+), 1 deletion(-) |
87 |
|
88 |
diff --git a/sysdeps/unix/sysv/linux/x86_64/sigaction.c b/sysdeps/unix/sysv/linux/x86_64/sigaction.c |
89 |
index efc837f..344ca10 100644 |
90 |
--- a/sysdeps/unix/sysv/linux/x86_64/sigaction.c |
91 |
+++ b/sysdeps/unix/sysv/linux/x86_64/sigaction.c |
92 |
@@ -37,7 +37,7 @@ |
93 |
|
94 |
/* Using the hidden attribute here does not change the code but it |
95 |
helps to avoid warnings. */ |
96 |
-extern void restore_rt (void) asm ("__restore_rt") attribute_hidden; |
97 |
+extern void restore_rt (void) asm ("__restore_rt") __attribute__((__visibility__("hidden"))); |
98 |
|
99 |
|
100 |
/* If ACT is not NULL, change the action for SIG to *ACT. |
101 |
-- |
102 |
2.2.1 |
103 |
|
104 |
|
105 |
|
106 |
|
107 |
1.1 src/patchsets/glibc/2.21/00_all_00_all_0003-make-fortify-logic-checks-less-angry.patch |
108 |
|
109 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.21/00_all_00_all_0003-make-fortify-logic-checks-less-angry.patch?rev=1.1&view=markup |
110 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.21/00_all_00_all_0003-make-fortify-logic-checks-less-angry.patch?rev=1.1&content-type=text/plain |
111 |
|
112 |
Index: 00_all_00_all_0003-make-fortify-logic-checks-less-angry.patch |
113 |
=================================================================== |
114 |
From 49f7d0d663a0d14646778e7b1ea409aa03e1315d Mon Sep 17 00:00:00 2001 |
115 |
From: Mike Frysinger <vapier@g.o> |
116 |
Date: Sat, 4 May 2013 14:12:58 -0400 |
117 |
Subject: [PATCH] make fortify logic checks less angry |
118 |
|
119 |
the fortify/optimization check does not play well with our default gcc specs |
120 |
|
121 |
http://sourceware.org/ml/libc-alpha/2012-06/msg00068.html |
122 |
--- |
123 |
include/features.h | 7 ++++--- |
124 |
1 file changed, 4 insertions(+), 3 deletions(-) |
125 |
|
126 |
diff --git a/include/features.h b/include/features.h |
127 |
index afaa05c..d252583 100644 |
128 |
--- a/include/features.h |
129 |
+++ b/include/features.h |
130 |
@@ -323,10 +323,11 @@ |
131 |
# define __USE_REENTRANT 1 |
132 |
#endif |
133 |
|
134 |
+#if !defined __OPTIMIZE__ || __OPTIMIZE__ <= 0 |
135 |
+# undef _FORTIFY_SOURCE |
136 |
+#endif |
137 |
#if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 |
138 |
-# if !defined __OPTIMIZE__ || __OPTIMIZE__ <= 0 |
139 |
-# warning _FORTIFY_SOURCE requires compiling with optimization (-O) |
140 |
-# elif !__GNUC_PREREQ (4, 1) |
141 |
+# if !__GNUC_PREREQ (4, 1) |
142 |
# warning _FORTIFY_SOURCE requires GCC 4.1 or later |
143 |
# elif _FORTIFY_SOURCE > 1 |
144 |
# define __USE_FORTIFY_LEVEL 2 |
145 |
-- |
146 |
2.2.1 |
147 |
|
148 |
|
149 |
|
150 |
|
151 |
1.1 src/patchsets/glibc/2.21/00_all_00_all_0004-Fix-localedef-segfault-when-run-under-exec-shield-Pa.patch |
152 |
|
153 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.21/00_all_00_all_0004-Fix-localedef-segfault-when-run-under-exec-shield-Pa.patch?rev=1.1&view=markup |
154 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.21/00_all_00_all_0004-Fix-localedef-segfault-when-run-under-exec-shield-Pa.patch?rev=1.1&content-type=text/plain |
155 |
|
156 |
Index: 00_all_00_all_0004-Fix-localedef-segfault-when-run-under-exec-shield-Pa.patch |
157 |
=================================================================== |
158 |
From a6e2f95341fd7c2564a4f0a84bb7447bd2686cd4 Mon Sep 17 00:00:00 2001 |
159 |
From: Jakub Jelinek <jakub@××××××.com> |
160 |
Date: Fri, 16 Aug 2013 14:52:25 -0400 |
161 |
Subject: [PATCH] Fix localedef segfault when run under exec-shield, PaX or |
162 |
similar |
163 |
|
164 |
http://bugs.debian.org/198099 |
165 |
http://bugs.debian.org/231438 |
166 |
--- |
167 |
locale/programs/3level.h | 36 ++++++++++++++++++++++++++++++++++++ |
168 |
1 file changed, 36 insertions(+) |
169 |
|
170 |
diff --git a/locale/programs/3level.h b/locale/programs/3level.h |
171 |
index 5602fd8..72416b2 100644 |
172 |
--- a/locale/programs/3level.h |
173 |
+++ b/locale/programs/3level.h |
174 |
@@ -204,6 +204,42 @@ CONCAT(TABLE,_iterate) (struct TABLE *t, |
175 |
} |
176 |
} |
177 |
} |
178 |
+ |
179 |
+/* GCC ATM seems to do a poor job with pointers to nested functions passed |
180 |
+ to inlined functions. Help it a little bit with this hack. */ |
181 |
+#define wchead_table_iterate(tp, fn) \ |
182 |
+do \ |
183 |
+ { \ |
184 |
+ struct wchead_table *t = (tp); \ |
185 |
+ uint32_t index1; \ |
186 |
+ for (index1 = 0; index1 < t->level1_size; index1++) \ |
187 |
+ { \ |
188 |
+ uint32_t lookup1 = t->level1[index1]; \ |
189 |
+ if (lookup1 != ((uint32_t) ~0)) \ |
190 |
+ { \ |
191 |
+ uint32_t lookup1_shifted = lookup1 << t->q; \ |
192 |
+ uint32_t index2; \ |
193 |
+ for (index2 = 0; index2 < (1 << t->q); index2++) \ |
194 |
+ { \ |
195 |
+ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \ |
196 |
+ if (lookup2 != ((uint32_t) ~0)) \ |
197 |
+ { \ |
198 |
+ uint32_t lookup2_shifted = lookup2 << t->p; \ |
199 |
+ uint32_t index3; \ |
200 |
+ for (index3 = 0; index3 < (1 << t->p); index3++) \ |
201 |
+ { \ |
202 |
+ struct element_t *lookup3 \ |
203 |
+ = t->level3[index3 + lookup2_shifted]; \ |
204 |
+ if (lookup3 != NULL) \ |
205 |
+ fn ((((index1 << t->q) + index2) << t->p) + index3, \ |
206 |
+ lookup3); \ |
207 |
+ } \ |
208 |
+ } \ |
209 |
+ } \ |
210 |
+ } \ |
211 |
+ } \ |
212 |
+ } while (0) |
213 |
+ |
214 |
#endif |
215 |
|
216 |
#ifndef NO_ADD_LOCALE |
217 |
-- |
218 |
2.2.1 |
219 |
|
220 |
|
221 |
|
222 |
|
223 |
1.1 src/patchsets/glibc/2.21/00_all_00_all_0005-reload-etc-resolv.conf-when-it-has-changed.patch |
224 |
|
225 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.21/00_all_00_all_0005-reload-etc-resolv.conf-when-it-has-changed.patch?rev=1.1&view=markup |
226 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.21/00_all_00_all_0005-reload-etc-resolv.conf-when-it-has-changed.patch?rev=1.1&content-type=text/plain |
227 |
|
228 |
Index: 00_all_00_all_0005-reload-etc-resolv.conf-when-it-has-changed.patch |
229 |
=================================================================== |
230 |
From 5ed8677ad1e34b574dab6cc6aa21e551c4bdc268 Mon Sep 17 00:00:00 2001 |
231 |
From: Thorsten Kukuk <kukuk@××××.de> |
232 |
Date: Fri, 16 Aug 2013 14:54:23 -0400 |
233 |
Subject: [PATCH] reload /etc/resolv.conf when it has changed |
234 |
|
235 |
if /etc/resolv.conf is updated, then make sure applications |
236 |
already running get the updated information. |
237 |
|
238 |
ripped from SuSE |
239 |
|
240 |
http://bugs.gentoo.org/177416 |
241 |
--- |
242 |
resolv/res_libc.c | 15 +++++++++++++++ |
243 |
1 file changed, 15 insertions(+) |
244 |
|
245 |
diff --git a/resolv/res_libc.c b/resolv/res_libc.c |
246 |
index ee3fa21..f30b3a9 100644 |
247 |
--- a/resolv/res_libc.c |
248 |
+++ b/resolv/res_libc.c |
249 |
@@ -22,6 +22,7 @@ |
250 |
#include <arpa/nameser.h> |
251 |
#include <resolv.h> |
252 |
#include <bits/libc-lock.h> |
253 |
+#include <sys/stat.h> |
254 |
|
255 |
|
256 |
/* The following bit is copied from res_data.c (where it is #ifdef'ed |
257 |
@@ -95,6 +96,20 @@ int |
258 |
__res_maybe_init (res_state resp, int preinit) |
259 |
{ |
260 |
if (resp->options & RES_INIT) { |
261 |
+ static time_t last_mtime, last_check; |
262 |
+ time_t now; |
263 |
+ struct stat statbuf; |
264 |
+ |
265 |
+ time (&now); |
266 |
+ if (now != last_check) { |
267 |
+ last_check = now; |
268 |
+ if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) { |
269 |
+ last_mtime = statbuf.st_mtime; |
270 |
+ atomicinclock (lock); |
271 |
+ atomicinc (__res_initstamp); |
272 |
+ atomicincunlock (lock); |
273 |
+ } |
274 |
+ } |
275 |
if (__res_initstamp != resp->_u._ext.initstamp) { |
276 |
if (resp->nscount > 0) |
277 |
__res_iclose (resp, true); |
278 |
-- |
279 |
2.2.1 |
280 |
|
281 |
|
282 |
|
283 |
|
284 |
1.1 src/patchsets/glibc/2.21/00_all_00_all_0006-nptl-support-thread-stacks-that-grow-up.patch |
285 |
|
286 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.21/00_all_00_all_0006-nptl-support-thread-stacks-that-grow-up.patch?rev=1.1&view=markup |
287 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.21/00_all_00_all_0006-nptl-support-thread-stacks-that-grow-up.patch?rev=1.1&content-type=text/plain |
288 |
|
289 |
Index: 00_all_00_all_0006-nptl-support-thread-stacks-that-grow-up.patch |
290 |
=================================================================== |
291 |
From c89dcf9c12f730478bc0cf652b27b032bf81e40c Mon Sep 17 00:00:00 2001 |
292 |
From: Carlos O'Donell <carlos@××××××××××××.org> |
293 |
Date: Fri, 16 Aug 2013 14:57:59 -0400 |
294 |
Subject: [PATCH] nptl: support thread stacks that grow up |
295 |
|
296 |
http://bugs.gentoo.org/301642 |
297 |
--- |
298 |
nptl/allocatestack.c | 22 +++++++++++++++------- |
299 |
nptl/pthread_create.c | 19 ++++++++++++++++--- |
300 |
nptl/pthread_getattr_np.c | 13 +++++++++++-- |
301 |
3 files changed, 42 insertions(+), 12 deletions(-) |
302 |
|
303 |
diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c |
304 |
index 3c8e046..8045b07 100644 |
305 |
--- a/nptl/allocatestack.c |
306 |
+++ b/nptl/allocatestack.c |
307 |
@@ -372,6 +372,15 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp, |
308 |
if (__glibc_unlikely (attr->flags & ATTR_FLAG_STACKADDR)) |
309 |
{ |
310 |
uintptr_t adj; |
311 |
+#if _STACK_GROWS_DOWN |
312 |
+ char * stackaddr = (char *) attr->stackaddr; |
313 |
+#else |
314 |
+ /* Assume the same layout as the _STACK_GROWS_DOWN case, |
315 |
+ with struct pthread at the top of the stack block. |
316 |
+ Later we adjust the guard location and stack address |
317 |
+ to match the _STACK_GROWS_UP case. */ |
318 |
+ char * stackaddr = (char *) attr->stackaddr + attr->stacksize; |
319 |
+#endif |
320 |
|
321 |
/* If the user also specified the size of the stack make sure it |
322 |
is large enough. */ |
323 |
@@ -381,11 +390,11 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp, |
324 |
|
325 |
/* Adjust stack size for alignment of the TLS block. */ |
326 |
#if TLS_TCB_AT_TP |
327 |
- adj = ((uintptr_t) attr->stackaddr - TLS_TCB_SIZE) |
328 |
+ adj = ((uintptr_t) stackaddr - TLS_TCB_SIZE) |
329 |
& __static_tls_align_m1; |
330 |
assert (size > adj + TLS_TCB_SIZE); |
331 |
#elif TLS_DTV_AT_TP |
332 |
- adj = ((uintptr_t) attr->stackaddr - __static_tls_size) |
333 |
+ adj = ((uintptr_t) stackaddr - __static_tls_size) |
334 |
& __static_tls_align_m1; |
335 |
assert (size > adj); |
336 |
#endif |
337 |
@@ -395,10 +404,10 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp, |
338 |
the stack. It is the user's responsibility to do this if it |
339 |
is wanted. */ |
340 |
#if TLS_TCB_AT_TP |
341 |
- pd = (struct pthread *) ((uintptr_t) attr->stackaddr |
342 |
+ pd = (struct pthread *) ((uintptr_t) stackaddr |
343 |
- TLS_TCB_SIZE - adj); |
344 |
#elif TLS_DTV_AT_TP |
345 |
- pd = (struct pthread *) (((uintptr_t) attr->stackaddr |
346 |
+ pd = (struct pthread *) (((uintptr_t) stackaddr |
347 |
- __static_tls_size - adj) |
348 |
- TLS_PRE_TCB_SIZE); |
349 |
#endif |
350 |
@@ -410,7 +419,7 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp, |
351 |
pd->specific[0] = pd->specific_1stblock; |
352 |
|
353 |
/* Remember the stack-related values. */ |
354 |
- pd->stackblock = (char *) attr->stackaddr - size; |
355 |
+ pd->stackblock = (char *) stackaddr - size; |
356 |
pd->stackblock_size = size; |
357 |
|
358 |
/* This is a user-provided stack. It will not be queued in the |
359 |
@@ -634,7 +643,7 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp, |
360 |
char *guard = mem + (((size - guardsize) / 2) & ~pagesize_m1); |
361 |
#elif _STACK_GROWS_DOWN |
362 |
char *guard = mem; |
363 |
-# elif _STACK_GROWS_UP |
364 |
+#elif _STACK_GROWS_UP |
365 |
char *guard = (char *) (((uintptr_t) pd - guardsize) & ~pagesize_m1); |
366 |
#endif |
367 |
if (mprotect (guard, guardsize, PROT_NONE) != 0) |
368 |
@@ -730,7 +739,6 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp, |
369 |
*stack = stacktop; |
370 |
#elif _STACK_GROWS_UP |
371 |
*stack = pd->stackblock; |
372 |
- assert (*stack > 0); |
373 |
#endif |
374 |
|
375 |
return 0; |
376 |
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c |
377 |
index 71a5619..af6be6f 100644 |
378 |
--- a/nptl/pthread_create.c |
379 |
+++ b/nptl/pthread_create.c |
380 |
@@ -426,12 +426,25 @@ START_THREAD_DEFN |
381 |
#ifdef _STACK_GROWS_DOWN |
382 |
char *sp = CURRENT_STACK_FRAME; |
383 |
size_t freesize = (sp - (char *) pd->stackblock) & ~pagesize_m1; |
384 |
-#else |
385 |
-# error "to do" |
386 |
-#endif |
387 |
assert (freesize < pd->stackblock_size); |
388 |
if (freesize > PTHREAD_STACK_MIN) |
389 |
__madvise (pd->stackblock, freesize - PTHREAD_STACK_MIN, MADV_DONTNEED); |
390 |
+#else |
391 |
+ /* Page aligned start of memory to free (higher than or equal |
392 |
+ to current sp plus the minimum stack size). */ |
393 |
+ void *freeblock = (void*)((size_t)(CURRENT_STACK_FRAME |
394 |
+ + PTHREAD_STACK_MIN |
395 |
+ + pagesize_m1) |
396 |
+ & ~pagesize_m1); |
397 |
+ char *free_end = (char *) (((uintptr_t) pd - pd->guardsize) & ~pagesize_m1); |
398 |
+ /* Is there any space to free? */ |
399 |
+ if (free_end > (char *)freeblock) |
400 |
+ { |
401 |
+ size_t freesize = (size_t)(free_end - (char *)freeblock); |
402 |
+ assert (freesize < pd->stackblock_size); |
403 |
+ __madvise (freeblock, freesize, MADV_DONTNEED); |
404 |
+ } |
405 |
+#endif |
406 |
|
407 |
/* If the thread is detached free the TCB. */ |
408 |
if (IS_DETACHED (pd)) |
409 |
diff --git a/nptl/pthread_getattr_np.c b/nptl/pthread_getattr_np.c |
410 |
index 52a4602..df76605 100644 |
411 |
--- a/nptl/pthread_getattr_np.c |
412 |
+++ b/nptl/pthread_getattr_np.c |
413 |
@@ -60,7 +60,11 @@ pthread_getattr_np (thread_id, attr) |
414 |
if (__glibc_likely (thread->stackblock != NULL)) |
415 |
{ |
416 |
iattr->stacksize = thread->stackblock_size; |
417 |
+#ifdef _STACK_GROWS_DOWN |
418 |
iattr->stackaddr = (char *) thread->stackblock + iattr->stacksize; |
419 |
+#else |
420 |
+ iattr->stackaddr = (char *) thread->stackblock; |
421 |
+#endif |
422 |
} |
423 |
else |
424 |
{ |
425 |
@@ -129,12 +133,17 @@ pthread_getattr_np (thread_id, attr) |
426 |
stack extension request. */ |
427 |
iattr->stacksize = (iattr->stacksize |
428 |
& -(intptr_t) GLRO(dl_pagesize)); |
429 |
- |
430 |
+#if _STACK_GROWS_DOWN |
431 |
/* The limit might be too high. */ |
432 |
if ((size_t) iattr->stacksize |
433 |
> (size_t) iattr->stackaddr - last_to) |
434 |
iattr->stacksize = (size_t) iattr->stackaddr - last_to; |
435 |
- |
436 |
+#else |
437 |
+ /* The limit might be too high. */ |
438 |
+ if ((size_t) iattr->stacksize |
439 |
+ > to - (size_t) iattr->stackaddr) |
440 |
+ iattr->stacksize = to - (size_t) iattr->stackaddr; |
441 |
+#endif |
442 |
/* We succeed and no need to look further. */ |
443 |
ret = 0; |
444 |
break; |
445 |
-- |
446 |
2.2.1 |
447 |
|
448 |
|
449 |
|
450 |
|
451 |
1.1 src/patchsets/glibc/2.21/00_all_00_all_0007-rtld-do-not-ignore-arch-specific-CFLAGS.patch |
452 |
|
453 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.21/00_all_00_all_0007-rtld-do-not-ignore-arch-specific-CFLAGS.patch?rev=1.1&view=markup |
454 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.21/00_all_00_all_0007-rtld-do-not-ignore-arch-specific-CFLAGS.patch?rev=1.1&content-type=text/plain |
455 |
|
456 |
Index: 00_all_00_all_0007-rtld-do-not-ignore-arch-specific-CFLAGS.patch |
457 |
=================================================================== |
458 |
From 01f9e0e7ecfa09f176bbc0cececf40a6332e1f95 Mon Sep 17 00:00:00 2001 |
459 |
From: Guy Martin <gmsoft@×××××××××.be> |
460 |
Date: Fri, 16 Aug 2013 15:00:05 -0400 |
461 |
Subject: [PATCH] rtld: do not ignore arch-specific CFLAGS |
462 |
|
463 |
https://bugs.gentoo.org/452184 |
464 |
http://sourceware.org/bugzilla/show_bug.cgi?id=15005 |
465 |
http://sourceware.org/ml/libc-alpha/2013-01/msg00247.html |
466 |
--- |
467 |
elf/Makefile | 2 +- |
468 |
1 file changed, 1 insertion(+), 1 deletion(-) |
469 |
|
470 |
diff --git a/elf/Makefile b/elf/Makefile |
471 |
index e5b142c..4882410 100644 |
472 |
--- a/elf/Makefile |
473 |
+++ b/elf/Makefile |
474 |
@@ -440,7 +440,7 @@ CFLAGS-ldconfig.c = $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' \ |
475 |
libof-ldconfig = ldconfig |
476 |
CFLAGS-dl-cache.c = $(SYSCONF-FLAGS) |
477 |
CFLAGS-cache.c = $(SYSCONF-FLAGS) |
478 |
-CFLAGS-rtld.c = $(SYSCONF-FLAGS) |
479 |
+CFLAGS-rtld.c += $(SYSCONF-FLAGS) |
480 |
|
481 |
cpp-srcs-left := $(all-rtld-routines:=.os) |
482 |
lib := rtld |
483 |
-- |
484 |
2.2.1 |
485 |
|
486 |
|
487 |
|
488 |
|
489 |
1.1 src/patchsets/glibc/2.21/00_all_00_all_0008-gentoo-support-running-tests-under-sandbox.patch |
490 |
|
491 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.21/00_all_00_all_0008-gentoo-support-running-tests-under-sandbox.patch?rev=1.1&view=markup |
492 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.21/00_all_00_all_0008-gentoo-support-running-tests-under-sandbox.patch?rev=1.1&content-type=text/plain |
493 |
|
494 |
Index: 00_all_00_all_0008-gentoo-support-running-tests-under-sandbox.patch |
495 |
=================================================================== |
496 |
From df94d8f254e8947a5dc2837c1b0de3478820d1ed Mon Sep 17 00:00:00 2001 |
497 |
From: "Stephanie J. Lockwood-Childs" <wormo@g.o> |
498 |
Date: Fri, 16 Aug 2013 15:03:41 -0400 |
499 |
Subject: [PATCH] gentoo: support running tests under sandbox |
500 |
|
501 |
when glibc runs its tests, it does so by invoking the local library loader. |
502 |
in Gentoo, we build/run inside of our "sandbox" which itself is linked against |
503 |
libdl (so that it can load libraries and pull out symbols). the trouble |
504 |
is that when you upgrade from an older glibc to the new one, often times |
505 |
internal symbols change name or abi. this is normally OK as you cannot use |
506 |
libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so |
507 |
we always say "keep all of the glibc libraries from the same build". but |
508 |
when glibc runs its tests, it uses dynamic paths to point to its new local |
509 |
copies of libraries. if the test doesnt use libdl, then glibc doesnt add |
510 |
its path, and when sandbox triggers the loading of libdl, glibc does so |
511 |
from the host system system. this gets us into the case of all libraries |
512 |
are from the locally compiled version of glibc except for libdl.so. |
513 |
|
514 |
http://bugs.gentoo.org/56898 |
515 |
--- |
516 |
Makeconfig | 2 +- |
517 |
iconvdata/run-iconv-test.sh | 2 +- |
518 |
nptl/tst-tls6.sh | 2 +- |
519 |
3 files changed, 3 insertions(+), 3 deletions(-) |
520 |
|
521 |
diff --git a/Makeconfig b/Makeconfig |
522 |
index 751e9ff..0f74abf 100644 |
523 |
--- a/Makeconfig |
524 |
+++ b/Makeconfig |
525 |
@@ -616,7 +616,7 @@ comma = , |
526 |
sysdep-library-path = \ |
527 |
$(subst $(empty) ,:,$(strip $(patsubst -Wl$(comma)-rpath-link=%, %,\ |
528 |
$(filter -Wl$(comma)-rpath-link=%,\ |
529 |
- $(sysdep-LDFLAGS))))) |
530 |
+ $(sysdep-LDFLAGS)))) $(common-objpfx)/dlfcn) |
531 |
# $(run-via-rtld-prefix) is a command that, when prepended to the name |
532 |
# of a program built with the newly built library, produces a command |
533 |
# that, executed on the host for which the library is built, runs that |
534 |
diff --git a/iconvdata/run-iconv-test.sh b/iconvdata/run-iconv-test.sh |
535 |
index 557db6b..23c2c35 100755 |
536 |
--- a/iconvdata/run-iconv-test.sh |
537 |
+++ b/iconvdata/run-iconv-test.sh |
538 |
@@ -31,7 +31,7 @@ temp2=$codir/iconvdata/iconv-test.yyy |
539 |
trap "rm -f $temp1 $temp2" 1 2 3 15 |
540 |
|
541 |
# We have to have some directories in the library path. |
542 |
-LIBPATH=$codir:$codir/iconvdata |
543 |
+LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn |
544 |
|
545 |
# How the start the iconv(1) program. |
546 |
ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \ |
547 |
diff --git a/nptl/tst-tls6.sh b/nptl/tst-tls6.sh |
548 |
index 3533474..e58f3f6 100755 |
549 |
--- a/nptl/tst-tls6.sh |
550 |
+++ b/nptl/tst-tls6.sh |
551 |
@@ -26,7 +26,7 @@ run_program_env=$1; shift |
552 |
logfile=$common_objpfx/nptl/tst-tls6.out |
553 |
|
554 |
# We have to find libc and nptl |
555 |
-library_path=${common_objpfx}:${common_objpfx}nptl |
556 |
+library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn |
557 |
tst_tls5="${test_via_rtld_prefix} ${common_objpfx}/nptl/tst-tls5" |
558 |
|
559 |
> $logfile |
560 |
-- |
561 |
2.2.1 |
562 |
|
563 |
|
564 |
|
565 |
|
566 |
1.1 src/patchsets/glibc/2.21/00_all_00_all_0009-gentoo-disable-building-in-timezone-subdir.patch |
567 |
|
568 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.21/00_all_00_all_0009-gentoo-disable-building-in-timezone-subdir.patch?rev=1.1&view=markup |
569 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.21/00_all_00_all_0009-gentoo-disable-building-in-timezone-subdir.patch?rev=1.1&content-type=text/plain |
570 |
|
571 |
Index: 00_all_00_all_0009-gentoo-disable-building-in-timezone-subdir.patch |
572 |
=================================================================== |
573 |
From 0106d3b598e45ba1332f3198edd20d4119d36d0c Mon Sep 17 00:00:00 2001 |
574 |
From: Mike Frysinger <vapier@g.o> |
575 |
Date: Fri, 16 Aug 2013 15:05:26 -0400 |
576 |
Subject: [PATCH] gentoo: disable building in timezone subdir |
577 |
|
578 |
We've split this out into the package sys-libs/timezone-data |
579 |
--- |
580 |
Makeconfig | 2 +- |
581 |
1 file changed, 1 insertion(+), 1 deletion(-) |
582 |
|
583 |
diff --git a/Makeconfig b/Makeconfig |
584 |
index 0f74abf..ba9b1e8 100644 |
585 |
--- a/Makeconfig |
586 |
+++ b/Makeconfig |
587 |
@@ -1062,7 +1062,7 @@ all-subdirs = csu assert ctype locale intl catgets math setjmp signal \ |
588 |
stdlib stdio-common libio malloc string wcsmbs time dirent \ |
589 |
grp pwd posix io termios resource misc socket sysvipc gmon \ |
590 |
gnulib iconv iconvdata wctype manual shadow gshadow po argp \ |
591 |
- crypt localedata timezone rt conform debug \ |
592 |
+ crypt localedata rt conform debug \ |
593 |
$(add-on-subdirs) dlfcn elf |
594 |
|
595 |
ifndef avoid-generated |
596 |
-- |
597 |
2.2.1 |
598 |
|
599 |
|
600 |
|
601 |
|
602 |
1.1 src/patchsets/glibc/2.21/00_all_00_all_0010-arm-fix-PIC-vs-SHARED-typos.patch |
603 |
|
604 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.21/00_all_00_all_0010-arm-fix-PIC-vs-SHARED-typos.patch?rev=1.1&view=markup |
605 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.21/00_all_00_all_0010-arm-fix-PIC-vs-SHARED-typos.patch?rev=1.1&content-type=text/plain |
606 |
|
607 |
Index: 00_all_00_all_0010-arm-fix-PIC-vs-SHARED-typos.patch |
608 |
=================================================================== |
609 |
From 6d234be2fbd744d252c17cc1ee79010f3b3d88dc Mon Sep 17 00:00:00 2001 |
610 |
From: David Lamparter <equinox-gentoo@××××××.net> |
611 |
Date: Fri, 16 Aug 2013 15:06:34 -0400 |
612 |
Subject: [PATCH] arm: fix PIC vs SHARED typos |
613 |
|
614 |
the logic in setjmp/__longjmp incorrectly tie to "PIC" to figure out |
615 |
whether the code is going into a shared library when it should be using |
616 |
"SHARED". otherwise, building static PIC code goes wrong. |
617 |
|
618 |
https://bugs.gentoo.org/336914 |
619 |
http://sourceware.org/ml/libc-ports/2011-09/msg00018.html |
620 |
|
621 |
2011-09-19 David Lamparter <equinox-gentoo@××××××.net> |
622 |
|
623 |
* sysdeps/arm/setjmp.S: Change PIC to SHARED. |
624 |
* sysdeps/arm/__longjmp.S: Likewise |
625 |
--- |
626 |
sysdeps/arm/__longjmp.S | 2 +- |
627 |
sysdeps/arm/setjmp.S | 2 +- |
628 |
2 files changed, 2 insertions(+), 2 deletions(-) |
629 |
|
630 |
diff --git a/sysdeps/arm/__longjmp.S b/sysdeps/arm/__longjmp.S |
631 |
index fc60a5d..1033e13 100644 |
632 |
--- a/sysdeps/arm/__longjmp.S |
633 |
+++ b/sysdeps/arm/__longjmp.S |
634 |
@@ -81,7 +81,7 @@ ENTRY (__longjmp) |
635 |
C_SYMBOL_NAME(_rtld_local_ro) \ |
636 |
+ RTLD_GLOBAL_RO_DL_HWCAP_OFFSET) |
637 |
# else |
638 |
-# ifdef PIC |
639 |
+# ifdef SHARED |
640 |
LDR_GLOBAL (a4, a3, C_SYMBOL_NAME(_rtld_global_ro), \ |
641 |
RTLD_GLOBAL_RO_DL_HWCAP_OFFSET) |
642 |
# else |
643 |
diff --git a/sysdeps/arm/setjmp.S b/sysdeps/arm/setjmp.S |
644 |
index e44beb4..be0a4ec 100644 |
645 |
--- a/sysdeps/arm/setjmp.S |
646 |
+++ b/sysdeps/arm/setjmp.S |
647 |
@@ -62,7 +62,7 @@ ENTRY (__sigsetjmp) |
648 |
C_SYMBOL_NAME(_rtld_local_ro) \ |
649 |
+ RTLD_GLOBAL_RO_DL_HWCAP_OFFSET) |
650 |
# else |
651 |
-# ifdef PIC |
652 |
+# ifdef SHARED |
653 |
LDR_GLOBAL (a3, a4, C_SYMBOL_NAME(_rtld_global_ro), \ |
654 |
RTLD_GLOBAL_RO_DL_HWCAP_OFFSET) |
655 |
# else |
656 |
-- |
657 |
2.2.1 |
658 |
|
659 |
|
660 |
|
661 |
|
662 |
1.1 src/patchsets/glibc/2.21/00_all_00_all_0011-hppa-fix-build-problems-with-atomic-code.patch |
663 |
|
664 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.21/00_all_00_all_0011-hppa-fix-build-problems-with-atomic-code.patch?rev=1.1&view=markup |
665 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.21/00_all_00_all_0011-hppa-fix-build-problems-with-atomic-code.patch?rev=1.1&content-type=text/plain |
666 |
|
667 |
Index: 00_all_00_all_0011-hppa-fix-build-problems-with-atomic-code.patch |
668 |
=================================================================== |
669 |
From 8a8bf85da0c7236c942236aee3714b0fd4b967be Mon Sep 17 00:00:00 2001 |
670 |
From: John David Anglin <dave.anglin@××××.net> |
671 |
Date: Sun, 10 Aug 2014 09:39:25 -0400 |
672 |
Subject: [PATCH] hppa: fix build problems with atomic code |
673 |
MIME-Version: 1.0 |
674 |
Content-Type: text/plain; charset=UTF-8 |
675 |
Content-Transfer-Encoding: 8bit |
676 |
|
677 |
Specifically: |
678 |
../sysdeps/unix/sysv/linux/hppa/bits/atomic.h:68:6: error: |
679 |
can’t find a register in class ‘R1_REGS’ while reloading ‘asm’ |
680 |
--- |
681 |
sysdeps/unix/sysv/linux/hppa/bits/atomic.h | 60 ++++++++++++++++-------------- |
682 |
1 file changed, 32 insertions(+), 28 deletions(-) |
683 |
|
684 |
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h |
685 |
index abde83e..9a22e05 100644 |
686 |
--- a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h |
687 |
+++ b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h |
688 |
@@ -64,35 +64,39 @@ typedef uintmax_t uatomic_max_t; |
689 |
|
690 |
#if __ASSUME_LWS_CAS |
691 |
/* The only basic operation needed is compare and exchange. */ |
692 |
+static int __attribute__((noinline)) |
693 |
+__atomic_compare_and_exchange_val_acq (int mem, int newval, int oldval) |
694 |
+{ |
695 |
+ volatile int lws_errno; |
696 |
+ volatile int lws_ret; |
697 |
+ asm volatile( |
698 |
+ "0: \n\t" |
699 |
+ "copy %2, %%r26 \n\t" |
700 |
+ "copy %3, %%r25 \n\t" |
701 |
+ "copy %4, %%r24 \n\t" |
702 |
+ "ble " _LWS "(%%sr2, %%r0) \n\t" |
703 |
+ "ldi " _LWS_CAS ", %%r20 \n\t" |
704 |
+ "ldi " _ASM_EAGAIN ", %%r24 \n\t" |
705 |
+ "cmpb,=,n %%r24, %%r21, 0b \n\t" |
706 |
+ "nop \n\t" |
707 |
+ "ldi " _ASM_EDEADLOCK ", %%r25 \n\t" |
708 |
+ "cmpb,=,n %%r25, %%r21, 0b \n\t" |
709 |
+ "nop \n\t" |
710 |
+ "stw %%r28, %0 \n\t" |
711 |
+ "stw %%r21, %1 \n\t" |
712 |
+ : "=m" (lws_ret), "=m" (lws_errno) |
713 |
+ : "r" (mem), "r" (oldval), "r" (newval) |
714 |
+ : _LWS_CLOBBER |
715 |
+ ); |
716 |
+ |
717 |
+ if (lws_errno == -EFAULT || lws_errno == -ENOSYS) |
718 |
+ ABORT_INSTRUCTION; |
719 |
+ |
720 |
+ return lws_ret; |
721 |
+} |
722 |
# define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \ |
723 |
- ({ \ |
724 |
- volatile int lws_errno; \ |
725 |
- __typeof__ (*mem) lws_ret; \ |
726 |
- asm volatile( \ |
727 |
- "0: \n\t" \ |
728 |
- "copy %2, %%r26 \n\t" \ |
729 |
- "copy %3, %%r25 \n\t" \ |
730 |
- "copy %4, %%r24 \n\t" \ |
731 |
- "ble " _LWS "(%%sr2, %%r0) \n\t" \ |
732 |
- "ldi " _LWS_CAS ", %%r20 \n\t" \ |
733 |
- "ldi " _ASM_EAGAIN ", %%r24 \n\t" \ |
734 |
- "cmpb,=,n %%r24, %%r21, 0b \n\t" \ |
735 |
- "nop \n\t" \ |
736 |
- "ldi " _ASM_EDEADLOCK ", %%r25 \n\t" \ |
737 |
- "cmpb,=,n %%r25, %%r21, 0b \n\t" \ |
738 |
- "nop \n\t" \ |
739 |
- "stw %%r28, %0 \n\t" \ |
740 |
- "stw %%r21, %1 \n\t" \ |
741 |
- : "=m" (lws_ret), "=m" (lws_errno) \ |
742 |
- : "r" (mem), "r" (oldval), "r" (newval) \ |
743 |
- : _LWS_CLOBBER \ |
744 |
- ); \ |
745 |
- \ |
746 |
- if(lws_errno == -EFAULT || lws_errno == -ENOSYS) \ |
747 |
- ABORT_INSTRUCTION; \ |
748 |
- \ |
749 |
- lws_ret; \ |
750 |
- }) |
751 |
+ ((__typeof__(oldval)) \ |
752 |
+ __atomic_compare_and_exchange_val_acq ((int)mem, (int)newval, (int)oldval)) |
753 |
|
754 |
# define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \ |
755 |
({ \ |
756 |
-- |
757 |
2.2.1 |
758 |
|
759 |
|
760 |
|
761 |
|
762 |
1.1 src/patchsets/glibc/2.21/00_all_00_all_0012-hppa-fix-bug-in-floating-point-exception-support.patch |
763 |
|
764 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.21/00_all_00_all_0012-hppa-fix-bug-in-floating-point-exception-support.patch?rev=1.1&view=markup |
765 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.21/00_all_00_all_0012-hppa-fix-bug-in-floating-point-exception-support.patch?rev=1.1&content-type=text/plain |
766 |
|
767 |
Index: 00_all_00_all_0012-hppa-fix-bug-in-floating-point-exception-support.patch |
768 |
=================================================================== |
769 |
From 1c1d3f4f11b4a911a3b6ffab0aac61d5f8e02873 Mon Sep 17 00:00:00 2001 |
770 |
From: John David Anglin <dave.anglin@××××.net> |
771 |
Date: Sun, 10 Aug 2014 09:41:27 -0400 |
772 |
Subject: [PATCH] hppa: fix bug in floating point exception support |
773 |
|
774 |
--- |
775 |
sysdeps/hppa/fpu/feholdexcpt.c | 6 +++--- |
776 |
sysdeps/hppa/fpu/fesetenv.c | 4 ++-- |
777 |
2 files changed, 5 insertions(+), 5 deletions(-) |
778 |
|
779 |
diff --git a/sysdeps/hppa/fpu/feholdexcpt.c b/sysdeps/hppa/fpu/feholdexcpt.c |
780 |
index 94eba37..aa5b5d2 100644 |
781 |
--- a/sysdeps/hppa/fpu/feholdexcpt.c |
782 |
+++ b/sysdeps/hppa/fpu/feholdexcpt.c |
783 |
@@ -29,8 +29,8 @@ __feholdexcept (fenv_t *envp) |
784 |
/* Store the environment. */ |
785 |
bufptr = clear.buf; |
786 |
__asm__ ( |
787 |
- "fstd,ma %%fr0,8(%1)\n" |
788 |
- : "=m" (clear), "+r" (bufptr) : : "%r0"); |
789 |
+ "fstd %%fr0,0(%1)\n" |
790 |
+ : "=m" (clear) : "r" (bufptr) : "%r0"); |
791 |
memcpy (envp, &clear.env, sizeof (fenv_t)); |
792 |
|
793 |
/* Clear exception queues */ |
794 |
@@ -44,7 +44,7 @@ __feholdexcept (fenv_t *envp) |
795 |
Thus we start bufptr at the end and work backwards */ |
796 |
bufptr = (unsigned long long *)((unsigned int)(clear.buf) + sizeof(unsigned int)*4); |
797 |
__asm__ ( |
798 |
- "fldd,mb -8(%0),%%fr0\n" |
799 |
+ "fldd 0(%0),%%fr0\n" |
800 |
: : "r" (bufptr), "m" (clear) : "%r0"); |
801 |
|
802 |
return 0; |
803 |
diff --git a/sysdeps/hppa/fpu/fesetenv.c b/sysdeps/hppa/fpu/fesetenv.c |
804 |
index 5b33ad6..5de755d 100644 |
805 |
--- a/sysdeps/hppa/fpu/fesetenv.c |
806 |
+++ b/sysdeps/hppa/fpu/fesetenv.c |
807 |
@@ -33,7 +33,7 @@ __fesetenv (const fenv_t *envp) |
808 |
we want to use from the environment specified by the parameter. */ |
809 |
bufptr = temp.buf; |
810 |
__asm__ ( |
811 |
- "fstd,ma %%fr0,8(%1)\n" |
812 |
+ "fstd %%fr0,0(%1)\n" |
813 |
: "=m" (temp) : "r" (bufptr) : "%r0"); |
814 |
|
815 |
temp.env.__status_word &= ~(FE_ALL_EXCEPT |
816 |
@@ -54,7 +54,7 @@ __fesetenv (const fenv_t *envp) |
817 |
we take advantage of that to load in reverse order so fr0 |
818 |
is loaded last and T-Bit is enabled. */ |
819 |
__asm__ ( |
820 |
- "fldd,mb -8(%1),%%fr0\n" |
821 |
+ "fldd 0(%1),%%fr0\n" |
822 |
: : "m" (temp), "r" (bufptr) : "%r0" ); |
823 |
|
824 |
/* Success. */ |
825 |
-- |
826 |
2.2.1 |
827 |
|
828 |
|
829 |
|
830 |
|
831 |
1.1 src/patchsets/glibc/2.21/00_all_00_all_0013-hppa-fix-pthread-spinlock.patch |
832 |
|
833 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.21/00_all_00_all_0013-hppa-fix-pthread-spinlock.patch?rev=1.1&view=markup |
834 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.21/00_all_00_all_0013-hppa-fix-pthread-spinlock.patch?rev=1.1&content-type=text/plain |
835 |
|
836 |
Index: 00_all_00_all_0013-hppa-fix-pthread-spinlock.patch |
837 |
=================================================================== |
838 |
From 204f030682dceefc37a29f6915e5175cb45784af Mon Sep 17 00:00:00 2001 |
839 |
From: John David Anglin <dave.anglin@××××.net> |
840 |
Date: Sun, 10 Aug 2014 09:54:53 -0400 |
841 |
Subject: [PATCH] hppa: fix pthread spinlock |
842 |
|
843 |
--- |
844 |
sysdeps/hppa/nptl/pthread_spin_init.c | 8 ++++---- |
845 |
sysdeps/hppa/nptl/pthread_spin_unlock.c | 8 ++++---- |
846 |
2 files changed, 8 insertions(+), 8 deletions(-) |
847 |
|
848 |
diff --git a/sysdeps/hppa/nptl/pthread_spin_init.c b/sysdeps/hppa/nptl/pthread_spin_init.c |
849 |
index 865ef2b..a49a846 100644 |
850 |
--- a/sysdeps/hppa/nptl/pthread_spin_init.c |
851 |
+++ b/sysdeps/hppa/nptl/pthread_spin_init.c |
852 |
@@ -20,9 +20,9 @@ |
853 |
int |
854 |
pthread_spin_init (pthread_spinlock_t *lock, int pshared) |
855 |
{ |
856 |
- int tmp = 0; |
857 |
- /* This should be a memory barrier to newer compilers */ |
858 |
- __asm__ __volatile__ ("stw,ma %1,0(%0)" |
859 |
- : : "r" (lock), "r" (tmp) : "memory"); |
860 |
+ /* The LWS-CAS operation on hppa is a synthetic atomic operation |
861 |
+ that doesn't provide the type of coherency that we need. Therefore |
862 |
+ we force that coherency by using LWS-CAS again. */ |
863 |
+ atomic_exchange_rel (lock, 0); |
864 |
return 0; |
865 |
} |
866 |
diff --git a/sysdeps/hppa/nptl/pthread_spin_unlock.c b/sysdeps/hppa/nptl/pthread_spin_unlock.c |
867 |
index a183fed..b576649 100644 |
868 |
--- a/sysdeps/hppa/nptl/pthread_spin_unlock.c |
869 |
+++ b/sysdeps/hppa/nptl/pthread_spin_unlock.c |
870 |
@@ -20,9 +20,9 @@ |
871 |
int |
872 |
pthread_spin_unlock (pthread_spinlock_t *lock) |
873 |
{ |
874 |
- int tmp = 0; |
875 |
- /* This should be a memory barrier to newer compilers */ |
876 |
- __asm__ __volatile__ ("stw,ma %1,0(%0)" |
877 |
- : : "r" (lock), "r" (tmp) : "memory"); |
878 |
+ /* The LWS-CAS operation on hppa is a synthetic atomic operation |
879 |
+ that doesn't provide the type of coherency that we need. Therefore |
880 |
+ we force that coherency by using LWS-CAS again. */ |
881 |
+ atomic_exchange_rel (lock, 0); |
882 |
return 0; |
883 |
} |
884 |
-- |
885 |
2.2.1 |
886 |
|
887 |
|
888 |
|
889 |
|
890 |
1.1 src/patchsets/glibc/2.21/00_all_00_all_0014-hppa-fix-__O_SYNC-to-match-the-kernel.patch |
891 |
|
892 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.21/00_all_00_all_0014-hppa-fix-__O_SYNC-to-match-the-kernel.patch?rev=1.1&view=markup |
893 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.21/00_all_00_all_0014-hppa-fix-__O_SYNC-to-match-the-kernel.patch?rev=1.1&content-type=text/plain |
894 |
|
895 |
Index: 00_all_00_all_0014-hppa-fix-__O_SYNC-to-match-the-kernel.patch |
896 |
=================================================================== |
897 |
From c24bbd6de049a351efdb2a04f57a0000970f17b3 Mon Sep 17 00:00:00 2001 |
898 |
From: John David Anglin <dave.anglin@××××.net> |
899 |
Date: Sun, 10 Aug 2014 10:00:23 -0400 |
900 |
Subject: [PATCH] hppa: fix __O_SYNC to match the kernel |
901 |
|
902 |
--- |
903 |
sysdeps/unix/sysv/linux/hppa/bits/fcntl.h | 2 +- |
904 |
1 file changed, 1 insertion(+), 1 deletion(-) |
905 |
|
906 |
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h |
907 |
index 9aad095..a800e28 100644 |
908 |
--- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h |
909 |
+++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h |
910 |
@@ -27,7 +27,7 @@ |
911 |
#define O_NONBLOCK 00200004 /* HPUX has separate NDELAY & NONBLOCK */ |
912 |
#define __O_DSYNC 01000000 |
913 |
#define __O_RSYNC 02000000 /* HPUX only */ |
914 |
-#define __O_SYNC 01000000 |
915 |
+#define __O_SYNC 00100000 |
916 |
#define O_SYNC (__O_SYNC|__O_DSYNC) |
917 |
|
918 |
#define O_BLKSEEK 00000100 /* HPUX only */ |
919 |
-- |
920 |
2.2.1 |
921 |
|
922 |
|
923 |
|
924 |
|
925 |
1.1 src/patchsets/glibc/2.21/00_all_00_all_0015-disable-PIE-when-checking-for-PIC-default.patch |
926 |
|
927 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.21/00_all_00_all_0015-disable-PIE-when-checking-for-PIC-default.patch?rev=1.1&view=markup |
928 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.21/00_all_00_all_0015-disable-PIE-when-checking-for-PIC-default.patch?rev=1.1&content-type=text/plain |
929 |
|
930 |
Index: 00_all_00_all_0015-disable-PIE-when-checking-for-PIC-default.patch |
931 |
=================================================================== |
932 |
From f14f39cfd7b959c806d822a2f6863873151f0a83 Mon Sep 17 00:00:00 2001 |
933 |
From: "Kevin F. Quinn" <kevquinn@g.o> |
934 |
Date: Tue, 9 Sep 2014 17:41:57 -0400 |
935 |
Subject: [PATCH] disable PIE when checking for PIC default |
936 |
|
937 |
When the compiler builds PIEs by default, the configure PIC check is |
938 |
confused into thinking PIC code is default. The end result is that |
939 |
we end up with only PIC being produced. |
940 |
|
941 |
Run the configure check with -fno-PIE so that we produce PIC & non-PIC |
942 |
(PIE) objects like normal. |
943 |
|
944 |
2014-09-09 Kevin F. Quinn <kevquinn@g.o> |
945 |
|
946 |
* configure.ac (libc_cv_pic_default): Pass -fno-PIE. |
947 |
* configure: Regenerated. |
948 |
--- |
949 |
configure | 2 +- |
950 |
configure.ac | 2 +- |
951 |
2 files changed, 2 insertions(+), 2 deletions(-) |
952 |
|
953 |
diff --git a/configure b/configure |
954 |
index ce0c6a0..70b4479 100755 |
955 |
--- a/configure |
956 |
+++ b/configure |
957 |
@@ -7148,7 +7148,7 @@ cat > conftest.c <<EOF |
958 |
# error PIC is default. |
959 |
#endif |
960 |
EOF |
961 |
-if eval "${CC-cc} -S conftest.c 2>&5 1>&5"; then |
962 |
+if eval "${CC-cc} -fno-PIE -S conftest.c 2>&5 1>&5"; then |
963 |
libc_cv_pic_default=no |
964 |
fi |
965 |
rm -f conftest.* |
966 |
diff --git a/configure.ac b/configure.ac |
967 |
index d89aaf0..9351483 100644 |
968 |
--- a/configure.ac |
969 |
+++ b/configure.ac |
970 |
@@ -2013,7 +2013,7 @@ cat > conftest.c <<EOF |
971 |
# error PIC is default. |
972 |
#endif |
973 |
EOF |
974 |
-if eval "${CC-cc} -S conftest.c 2>&AS_MESSAGE_LOG_FD 1>&AS_MESSAGE_LOG_FD"; then |
975 |
+if eval "${CC-cc} -fno-PIE -S conftest.c 2>&AS_MESSAGE_LOG_FD 1>&AS_MESSAGE_LOG_FD"; then |
976 |
libc_cv_pic_default=no |
977 |
fi |
978 |
rm -f conftest.*]) |
979 |
-- |
980 |
2.2.1 |
981 |
|
982 |
|
983 |
|
984 |
|
985 |
1.1 src/patchsets/glibc/2.21/README.history |
986 |
|
987 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.21/README.history?rev=1.1&view=markup |
988 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.21/README.history?rev=1.1&content-type=text/plain |
989 |
|
990 |
Index: README.history |
991 |
=================================================================== |
992 |
1 09 Feb 2015 |
993 |
+ 00_all_00_all_0001-disable-ldconfig-during-install.patch |
994 |
+ 00_all_00_all_0002-workaround-crash-when-handling-signals-in-static-PIE.patch |
995 |
+ 00_all_00_all_0003-make-fortify-logic-checks-less-angry.patch |
996 |
+ 00_all_00_all_0004-Fix-localedef-segfault-when-run-under-exec-shield-Pa.patch |
997 |
+ 00_all_00_all_0005-reload-etc-resolv.conf-when-it-has-changed.patch |
998 |
+ 00_all_00_all_0006-nptl-support-thread-stacks-that-grow-up.patch |
999 |
+ 00_all_00_all_0007-rtld-do-not-ignore-arch-specific-CFLAGS.patch |
1000 |
+ 00_all_00_all_0008-gentoo-support-running-tests-under-sandbox.patch |
1001 |
+ 00_all_00_all_0009-gentoo-disable-building-in-timezone-subdir.patch |
1002 |
+ 00_all_00_all_0010-arm-fix-PIC-vs-SHARED-typos.patch |
1003 |
+ 00_all_00_all_0011-hppa-fix-build-problems-with-atomic-code.patch |
1004 |
+ 00_all_00_all_0012-hppa-fix-bug-in-floating-point-exception-support.patch |
1005 |
+ 00_all_00_all_0013-hppa-fix-pthread-spinlock.patch |
1006 |
+ 00_all_00_all_0014-hppa-fix-__O_SYNC-to-match-the-kernel.patch |
1007 |
+ 00_all_00_all_0015-disable-PIE-when-checking-for-PIC-default.patch |