1 |
vapier 11/06/01 18:46:47 |
2 |
|
3 |
Added: 1502_all_hppa-glibc-2.13-F_GET-SETPIPE_SZ.patch |
4 |
1503_hppa_glibc-2.7-hppa-nptl-carlos.patch |
5 |
1505_hppa_glibc-2.11-hppa-nptl.patch |
6 |
1508_all_glibc-2.13-hppa-DEFAULT_STACK_PERMS.patch |
7 |
1509_all_glibc-2.11-hppa-SOCK_CLOEXEC.patch |
8 |
1530_all_glibc-m68k-sys-user.patch |
9 |
6018_all_alpha-glibc-2.8-cache-shape.patch |
10 |
6019_all_alpha-glibc-2.13-longjmp-chk.patch |
11 |
6020_all_alpha-fix-gcc-4.1-warnings.patch |
12 |
6021_all_alpha-glibc-2.13-ptr-mangle.patch |
13 |
6022_alpha_alpha-add-fdatasync-support.patch |
14 |
6023_all_alpha-glibc-2.13-statfs64.patch |
15 |
6026_all_alpha-fix-rtld-fPIC.patch |
16 |
6027_all_alpha-glibc-2.13-F_GET-SETPIPE_SZ.patch |
17 |
6028_all_alpha-glibc-2.13-statfs.f_flags.patch |
18 |
6029_all_alpha-glibc-2.13-DEFAULT_STACK_PERMS.patch |
19 |
6030_all_alpha-glibc-2.13-hidden-libm.patch |
20 |
6031_all_alpha-glibc-2.12-epoll_create1.patch |
21 |
6032_all_alpha-syscall-6.patch |
22 |
6220_all_glibc-2.4-arm-cirrus-ep93xx-maverick-crunch-fpu.patch |
23 |
6230_all_arm-glibc-hardened.patch |
24 |
6240_all_glibc-2.8-nptl-lowlevellock.patch |
25 |
6600_mips_librt-mips.patch |
26 |
6605_all_glibc-2.4-fpu-cw-mips.patch |
27 |
Log: |
28 |
initial 2.14 patchset based on last 2.13 patchset |
29 |
|
30 |
Revision Changes Path |
31 |
1.1 src/patchsets/glibc/2.14/ports/1502_all_hppa-glibc-2.13-F_GET-SETPIPE_SZ.patch |
32 |
|
33 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/1502_all_hppa-glibc-2.13-F_GET-SETPIPE_SZ.patch?rev=1.1&view=markup |
34 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/1502_all_hppa-glibc-2.13-F_GET-SETPIPE_SZ.patch?rev=1.1&content-type=text/plain |
35 |
|
36 |
Index: 1502_all_hppa-glibc-2.13-F_GET-SETPIPE_SZ.patch |
37 |
=================================================================== |
38 |
make sure hppa has new bits defined |
39 |
|
40 |
--- ports/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h |
41 |
+++ ports/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h |
42 |
@@ -101,6 +101,10 @@ |
43 |
# define F_SETLEASE 1024 /* Set a lease. */ |
44 |
# define F_GETLEASE 1025 /* Enquire what lease is active. */ |
45 |
# define F_NOTIFY 1026 /* Request notfications on a directory. */ |
46 |
+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */ |
47 |
+# define F_GETPIPE_SZ 1032 /* Set pipe page size array. */ |
48 |
+#endif |
49 |
+#ifdef __USE_XOPEN2K8 |
50 |
# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with |
51 |
close-on-exit set. */ |
52 |
#endif |
53 |
|
54 |
|
55 |
|
56 |
1.1 src/patchsets/glibc/2.14/ports/1503_hppa_glibc-2.7-hppa-nptl-carlos.patch |
57 |
|
58 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/1503_hppa_glibc-2.7-hppa-nptl-carlos.patch?rev=1.1&view=markup |
59 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/1503_hppa_glibc-2.7-hppa-nptl-carlos.patch?rev=1.1&content-type=text/plain |
60 |
|
61 |
Index: 1503_hppa_glibc-2.7-hppa-nptl-carlos.patch |
62 |
=================================================================== |
63 |
--- elf/rtld.c.orig |
64 |
+++ elf/rtld.c |
65 |
@@ -379,14 +379,14 @@ |
66 |
know it is available. We do not have to clear the memory if we |
67 |
do not have to use the temporary bootstrap_map. Global variables |
68 |
are initialized to zero by default. */ |
69 |
-#ifndef DONT_USE_BOOTSTRAP_MAP |
70 |
+#if !defined DONT_USE_BOOTSTRAP_MAP |
71 |
# ifdef HAVE_BUILTIN_MEMSET |
72 |
__builtin_memset (bootstrap_map.l_info, '\0', sizeof (bootstrap_map.l_info)); |
73 |
# else |
74 |
- for (size_t cnt = 0; |
75 |
- cnt < sizeof (bootstrap_map.l_info) / sizeof (bootstrap_map.l_info[0]); |
76 |
- ++cnt) |
77 |
- bootstrap_map.l_info[cnt] = 0; |
78 |
+ /* Clear the whole bootstrap_map structure */ |
79 |
+ for (char *cnt = (char *)&(bootstrap_map); |
80 |
+ cnt < ((char *)&(bootstrap_map) + sizeof (bootstrap_map)); |
81 |
+ *cnt++ = '\0'); |
82 |
# endif |
83 |
# if USE___THREAD |
84 |
bootstrap_map.l_tls_modid = 0; |
85 |
--- include/atomic.h.orig |
86 |
+++ include/atomic.h |
87 |
@@ -174,7 +174,7 @@ |
88 |
__typeof (*(mem)) __atg5_value = (newvalue); \ |
89 |
\ |
90 |
do \ |
91 |
- __atg5_oldval = *__atg5_memp; \ |
92 |
+ __atg5_oldval = *(volatile __typeof (mem))__atg5_memp; \ |
93 |
while (__builtin_expect \ |
94 |
(atomic_compare_and_exchange_bool_acq (__atg5_memp, __atg5_value, \ |
95 |
__atg5_oldval), 0)); \ |
96 |
@@ -195,7 +195,7 @@ |
97 |
__typeof (*(mem)) __atg6_value = (value); \ |
98 |
\ |
99 |
do \ |
100 |
- __atg6_oldval = *__atg6_memp; \ |
101 |
+ __atg6_oldval = *(volatile __typeof (mem))__atg6_memp; \ |
102 |
while (__builtin_expect \ |
103 |
(atomic_compare_and_exchange_bool_acq (__atg6_memp, \ |
104 |
__atg6_oldval \ |
105 |
@@ -213,7 +213,7 @@ |
106 |
__typeof (*(mem)) __atg7_value = (value); \ |
107 |
\ |
108 |
do \ |
109 |
- __atg7_oldv = *__atg7_memp; \ |
110 |
+ __atg7_oldv = *(volatile __typeof (mem))__atg7_memp; \ |
111 |
while (__builtin_expect \ |
112 |
(catomic_compare_and_exchange_bool_acq (__atg7_memp, \ |
113 |
__atg7_oldv \ |
114 |
@@ -231,7 +231,7 @@ |
115 |
__typeof (mem) __atg8_memp = (mem); \ |
116 |
__typeof (*(mem)) __atg8_value = (value); \ |
117 |
do { \ |
118 |
- __atg8_oldval = *__atg8_memp; \ |
119 |
+ __atg8_oldval = *(volatile __typeof (mem))__atg8_memp; \ |
120 |
if (__atg8_oldval >= __atg8_value) \ |
121 |
break; \ |
122 |
} while (__builtin_expect \ |
123 |
@@ -248,7 +248,7 @@ |
124 |
__typeof (mem) __atg9_memp = (mem); \ |
125 |
__typeof (*(mem)) __atg9_value = (value); \ |
126 |
do { \ |
127 |
- __atg9_oldv = *__atg9_memp; \ |
128 |
+ __atg9_oldv = *(volatile __typeof (mem))__atg9_memp; \ |
129 |
if (__atg9_oldv >= __atg9_value) \ |
130 |
break; \ |
131 |
} while (__builtin_expect \ |
132 |
@@ -266,7 +266,7 @@ |
133 |
__typeof (mem) __atg10_memp = (mem); \ |
134 |
__typeof (*(mem)) __atg10_value = (value); \ |
135 |
do { \ |
136 |
- __atg10_oldval = *__atg10_memp; \ |
137 |
+ __atg10_oldval = *(volatile __typeof (mem))__atg10_memp; \ |
138 |
if (__atg10_oldval <= __atg10_value) \ |
139 |
break; \ |
140 |
} while (__builtin_expect \ |
141 |
@@ -350,7 +350,7 @@ |
142 |
\ |
143 |
do \ |
144 |
{ \ |
145 |
- __atg11_oldval = *__atg11_memp; \ |
146 |
+ __atg11_oldval = *(volatile __typeof (mem))__atg11_memp; \ |
147 |
if (__builtin_expect (__atg11_oldval <= 0, 0)) \ |
148 |
break; \ |
149 |
} \ |
150 |
@@ -389,7 +389,7 @@ |
151 |
__typeof (*(mem)) __atg14_mask = ((__typeof (*(mem))) 1 << (bit)); \ |
152 |
\ |
153 |
do \ |
154 |
- __atg14_old = (*__atg14_memp); \ |
155 |
+ __atg14_old = (*(volatile __typeof (mem))__atg14_memp); \ |
156 |
while (__builtin_expect \ |
157 |
(atomic_compare_and_exchange_bool_acq (__atg14_memp, \ |
158 |
__atg14_old | __atg14_mask,\ |
159 |
@@ -407,7 +407,7 @@ |
160 |
__typeof (*(mem)) __atg15_mask = (mask); \ |
161 |
\ |
162 |
do \ |
163 |
- __atg15_old = (*__atg15_memp); \ |
164 |
+ __atg15_old = (*(volatile __typeof (mem))__atg15_memp); \ |
165 |
while (__builtin_expect \ |
166 |
(atomic_compare_and_exchange_bool_acq (__atg15_memp, \ |
167 |
__atg15_old & __atg15_mask, \ |
168 |
@@ -423,7 +423,7 @@ |
169 |
__typeof (*(mem)) __atg16_mask = (mask); \ |
170 |
\ |
171 |
do \ |
172 |
- __atg16_old = (*__atg16_memp); \ |
173 |
+ __atg16_old = (*(volatile __typeof (mem))__atg16_memp); \ |
174 |
while (__builtin_expect \ |
175 |
(atomic_compare_and_exchange_bool_acq (__atg16_memp, \ |
176 |
__atg16_old & __atg16_mask,\ |
177 |
@@ -441,7 +441,7 @@ |
178 |
__typeof (*(mem)) __atg17_mask = (mask); \ |
179 |
\ |
180 |
do \ |
181 |
- __atg17_old = (*__atg17_memp); \ |
182 |
+ __atg17_old = (*(volatile __typeof (mem))__atg17_memp); \ |
183 |
while (__builtin_expect \ |
184 |
(atomic_compare_and_exchange_bool_acq (__atg17_memp, \ |
185 |
__atg17_old | __atg17_mask, \ |
186 |
@@ -457,7 +457,7 @@ |
187 |
__typeof (*(mem)) __atg18_mask = (mask); \ |
188 |
\ |
189 |
do \ |
190 |
- __atg18_old = (*__atg18_memp); \ |
191 |
+ __atg18_old = (*(volatile __typeof (mem))__atg18_memp); \ |
192 |
while (__builtin_expect \ |
193 |
(catomic_compare_and_exchange_bool_acq (__atg18_memp, \ |
194 |
__atg18_old | __atg18_mask,\ |
195 |
@@ -473,7 +473,7 @@ |
196 |
__typeof (*(mem)) __atg19_mask = (mask); \ |
197 |
\ |
198 |
do \ |
199 |
- __atg19_old = (*__atg19_memp); \ |
200 |
+ __atg19_old = (*(volatile __typeof (mem))__atg19_memp); \ |
201 |
while (__builtin_expect \ |
202 |
(atomic_compare_and_exchange_bool_acq (__atg19_memp, \ |
203 |
__atg19_old | __atg19_mask,\ |
204 |
--- nptl/Makefile.orig |
205 |
+++ nptl/Makefile |
206 |
@@ -263,9 +263,9 @@ |
207 |
# Files which must not be linked with libpthread. |
208 |
tests-nolibpthread = tst-unload |
209 |
|
210 |
-# This sets the stack resource limit to 1023kb, which is not a multiple |
211 |
-# of the page size since every architecture's page size is > 1k. |
212 |
-tst-oddstacklimit-ENV = ; ulimit -s 1023; |
213 |
+# This sets the stack resource limit to 8193kb, which is not a multiple |
214 |
+# of the page size since every architecture's page size is 4096 bytes. |
215 |
+tst-oddstacklimit-ENV = ; ulimit -s 8193; |
216 |
|
217 |
distribute = eintr.c tst-cleanup4aux.c |
218 |
|
219 |
@@ -424,6 +424,35 @@ |
220 |
CFLAGS-tst-cleanupx4.c += -fexceptions |
221 |
CFLAGS-tst-oncex3.c += -fexceptions |
222 |
CFLAGS-tst-oncex4.c += -fexceptions |
223 |
+ |
224 |
+ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed |
225 |
+LDFLAGS-tst-cancelx2 += $(ldflags-libgcc_s) |
226 |
+LDFLAGS-tst-cancelx3 += $(ldflags-libgcc_s) |
227 |
+LDFLAGS-tst-cancelx4 += $(ldflags-libgcc_s) |
228 |
+LDFLAGS-tst-cancelx5 += $(ldflags-libgcc_s) |
229 |
+LDFLAGS-tst-cancelx6 += $(ldflags-libgcc_s) |
230 |
+LDFLAGS-tst-cancelx7 += $(ldflags-libgcc_s) |
231 |
+LDFLAGS-tst-cancelx8 += $(ldflags-libgcc_s) |
232 |
+LDFLAGS-tst-cancelx9 += $(ldflags-libgcc_s) |
233 |
+LDFLAGS-tst-cancelx10 += $(ldflags-libgcc_s) |
234 |
+LDFLAGS-tst-cancelx11 += $(ldflags-libgcc_s) |
235 |
+LDFLAGS-tst-cancelx12 += $(ldflags-libgcc_s) |
236 |
+LDFLAGS-tst-cancelx13 += $(ldflags-libgcc_s) |
237 |
+LDFLAGS-tst-cancelx14 += $(ldflags-libgcc_s) |
238 |
+LDFLAGS-tst-cancelx15 += $(ldflags-libgcc_s) |
239 |
+LDFLAGS-tst-cancelx16 += $(ldflags-libgcc_s) |
240 |
+LDFLAGS-tst-cancelx17 += $(ldflags-libgcc_s) |
241 |
+LDFLAGS-tst-cancelx18 += $(ldflags-libgcc_s) |
242 |
+LDFLAGS-tst-cancelx20 += $(ldflags-libgcc_s) |
243 |
+LDFLAGS-tst-cancelx21 += $(ldflags-libgcc_s) |
244 |
+LDFLAGS-tst-cleanupx0 += $(ldflags-libgcc_s) |
245 |
+LDFLAGS-tst-cleanupx1 += $(ldflags-libgcc_s) |
246 |
+LDFLAGS-tst-cleanupx2 += $(ldflags-libgcc_s) |
247 |
+LDFLAGS-tst-cleanupx3 += $(ldflags-libgcc_s) |
248 |
+LDFLAGS-tst-cleanupx4 += $(ldflags-libgcc_s) |
249 |
+LDFLAGS-tst-oncex3 += $(ldflags-libgcc_s) |
250 |
+LDFLAGS-tst-oncex4 += $(ldflags-libgcc_s) |
251 |
+ |
252 |
CFLAGS-tst-align.c += $(stack-align-test-flags) |
253 |
CFLAGS-tst-align3.c += $(stack-align-test-flags) |
254 |
CFLAGS-tst-initializers1.c = -W -Wall -Werror |
255 |
--- nptl.orig/pthread_barrier_wait.c |
256 |
+++ nptl/pthread_barrier_wait.c |
257 |
@@ -64,7 +64,7 @@ |
258 |
do |
259 |
lll_futex_wait (&ibarrier->curr_event, event, |
260 |
ibarrier->private ^ FUTEX_PRIVATE_FLAG); |
261 |
- while (event == ibarrier->curr_event); |
262 |
+ while (event == *(volatile unsigned int *)&ibarrier->curr_event); |
263 |
} |
264 |
|
265 |
/* Make sure the init_count is stored locally or in a register. */ |
266 |
--- nptl/sysdeps/pthread/Makefile.orig |
267 |
+++ nptl/sysdeps/pthread/Makefile |
268 |
@@ -41,7 +41,9 @@ |
269 |
|
270 |
ifeq ($(have-forced-unwind),yes) |
271 |
tests += tst-mqueue8x |
272 |
+ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed |
273 |
CFLAGS-tst-mqueue8x.c += -fexceptions |
274 |
+LDFLAGS-tst-mqueue8x += $(ldflags-libgcc_s) |
275 |
endif |
276 |
endif |
277 |
|
278 |
--- stdio-common/Makefile.orig |
279 |
+++ stdio-common/Makefile |
280 |
@@ -79,7 +79,7 @@ |
281 |
$(SHELL) -e tst-printf.sh $(common-objpfx) '$(run-program-prefix)' |
282 |
endif |
283 |
|
284 |
-CFLAGS-vfprintf.c = -Wno-uninitialized |
285 |
+CFLAGS-vfprintf.c = -Wno-uninitialized -fno-delayed-branch |
286 |
CFLAGS-vfwprintf.c = -Wno-uninitialized |
287 |
CFLAGS-tst-printf.c = -Wno-format |
288 |
CFLAGS-tstdiomisc.c = -Wno-format |
289 |
--- sunrpc/clnt_udp.c.orig |
290 |
+++ sunrpc/clnt_udp.c |
291 |
@@ -419,7 +419,7 @@ |
292 |
while (inlen < 0 && errno == EINTR); |
293 |
if (inlen < 0) |
294 |
{ |
295 |
- if (errno == EWOULDBLOCK) |
296 |
+ if (errno == EWOULDBLOCK || errno == EAGAIN) |
297 |
continue; |
298 |
cu->cu_error.re_errno = errno; |
299 |
return (cu->cu_error.re_status = RPC_CANTRECV); |
300 |
|
301 |
|
302 |
|
303 |
1.1 src/patchsets/glibc/2.14/ports/1505_hppa_glibc-2.11-hppa-nptl.patch |
304 |
|
305 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/1505_hppa_glibc-2.11-hppa-nptl.patch?rev=1.1&view=markup |
306 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/1505_hppa_glibc-2.11-hppa-nptl.patch?rev=1.1&content-type=text/plain |
307 |
|
308 |
Index: 1505_hppa_glibc-2.11-hppa-nptl.patch |
309 |
=================================================================== |
310 |
http://bugs.gentoo.org/301642 |
311 |
|
312 |
--- a/elf/dl-fptr.c 2010-07-25 21:58:31.241131107 +0200 |
313 |
+++ b/elf/dl-fptr.c 2010-07-25 22:00:54.323726976 +0200 |
314 |
@@ -56,7 +56,8 @@ |
315 |
} |
316 |
local = |
317 |
{ |
318 |
- .root = &local.boot_table, |
319 |
+ /* Address of .boot_table is not known until runtime. */ |
320 |
+ .root = 0, |
321 |
.npages = 2, |
322 |
.boot_table = |
323 |
{ |
324 |
@@ -93,6 +94,17 @@ |
325 |
return new_table; |
326 |
} |
327 |
|
328 |
+/* Must call _dl_fptr_init before using any other function. */ |
329 |
+void |
330 |
+_dl_fptr_init (void) |
331 |
+{ |
332 |
+ struct local *l; |
333 |
+ |
334 |
+ ELF_MACHINE_LOAD_ADDRESS (l, local); |
335 |
+ /* Initialize root once. */ |
336 |
+ if (__builtin_expect (l->root == 0, 0)) |
337 |
+ l->root = &l->boot_table; |
338 |
+} |
339 |
|
340 |
static ElfW(Addr) |
341 |
make_fdesc (ElfW(Addr) ip, ElfW(Addr) gp) |
342 |
--- a/nptl/allocatestack.c 2010-07-25 21:58:30.669136153 +0200 |
343 |
+++ b/nptl/allocatestack.c 2010-07-25 21:59:05.528795435 +0200 |
344 |
@@ -354,6 +354,15 @@ |
345 |
if (__builtin_expect (attr->flags & ATTR_FLAG_STACKADDR, 0)) |
346 |
{ |
347 |
uintptr_t adj; |
348 |
+#if _STACK_GROWS_DOWN |
349 |
+ char * stackaddr = (char *) attr->stackaddr; |
350 |
+#else |
351 |
+ /* Assume the same layout as the _STACK_GROWS_DOWN case, |
352 |
+ with struct pthread at the top of the stack block. |
353 |
+ Later we adjust the guard location and stack address |
354 |
+ to match the _STACK_GROWS_UP case. */ |
355 |
+ char * stackaddr = (char *) attr->stackaddr + attr->stacksize; |
356 |
+#endif |
357 |
|
358 |
/* If the user also specified the size of the stack make sure it |
359 |
is large enough. */ |
360 |
@@ -363,11 +372,11 @@ |
361 |
|
362 |
/* Adjust stack size for alignment of the TLS block. */ |
363 |
#if TLS_TCB_AT_TP |
364 |
- adj = ((uintptr_t) attr->stackaddr - TLS_TCB_SIZE) |
365 |
+ adj = ((uintptr_t) stackaddr - TLS_TCB_SIZE) |
366 |
& __static_tls_align_m1; |
367 |
assert (size > adj + TLS_TCB_SIZE); |
368 |
#elif TLS_DTV_AT_TP |
369 |
- adj = ((uintptr_t) attr->stackaddr - __static_tls_size) |
370 |
+ adj = ((uintptr_t) stackaddr - __static_tls_size) |
371 |
& __static_tls_align_m1; |
372 |
assert (size > adj); |
373 |
#endif |
374 |
@@ -377,10 +386,10 @@ |
375 |
the stack. It is the user's responsibility to do this if it |
376 |
is wanted. */ |
377 |
#if TLS_TCB_AT_TP |
378 |
- pd = (struct pthread *) ((uintptr_t) attr->stackaddr |
379 |
+ pd = (struct pthread *) ((uintptr_t) stackaddr |
380 |
- TLS_TCB_SIZE - adj); |
381 |
#elif TLS_DTV_AT_TP |
382 |
- pd = (struct pthread *) (((uintptr_t) attr->stackaddr |
383 |
+ pd = (struct pthread *) (((uintptr_t) stackaddr |
384 |
- __static_tls_size - adj) |
385 |
- TLS_PRE_TCB_SIZE); |
386 |
#endif |
387 |
@@ -392,7 +401,7 @@ |
388 |
pd->specific[0] = pd->specific_1stblock; |
389 |
|
390 |
/* Remember the stack-related values. */ |
391 |
- pd->stackblock = (char *) attr->stackaddr - size; |
392 |
+ pd->stackblock = (char *) stackaddr - size; |
393 |
pd->stackblock_size = size; |
394 |
|
395 |
/* This is a user-provided stack. It will not be queued in the |
396 |
@@ -617,7 +626,7 @@ |
397 |
char *guard = mem + (((size - guardsize) / 2) & ~pagesize_m1); |
398 |
#elif _STACK_GROWS_DOWN |
399 |
char *guard = mem; |
400 |
-# elif _STACK_GROWS_UP |
401 |
+#elif _STACK_GROWS_UP |
402 |
char *guard = (char *) (((uintptr_t) pd - guardsize) & ~pagesize_m1); |
403 |
#endif |
404 |
if (mprotect (guard, guardsize, PROT_NONE) != 0) |
405 |
@@ -716,7 +725,6 @@ |
406 |
*stack = stacktop; |
407 |
#elif _STACK_GROWS_UP |
408 |
*stack = pd->stackblock; |
409 |
- assert (*stack > 0); |
410 |
#endif |
411 |
|
412 |
return 0; |
413 |
--- a/nptl/pthread_attr_getstack.c 2010-07-25 21:58:30.717135358 +0200 |
414 |
+++ b/nptl/pthread_attr_getstack.c 2010-07-25 21:59:05.532796982 +0200 |
415 |
@@ -33,7 +33,11 @@ |
416 |
iattr = (struct pthread_attr *) attr; |
417 |
|
418 |
/* Store the result. */ |
419 |
+#ifdef _STACK_GROWS_DOWN |
420 |
*stackaddr = (char *) iattr->stackaddr - iattr->stacksize; |
421 |
+#else |
422 |
+ *stackaddr = (char *) iattr->stackaddr; |
423 |
+#endif |
424 |
*stacksize = iattr->stacksize; |
425 |
|
426 |
return 0; |
427 |
--- a/nptl/pthread_attr_setstack.c 2010-07-25 21:58:30.717135358 +0200 |
428 |
+++ b/nptl/pthread_attr_setstack.c 2010-07-25 21:59:05.532796982 +0200 |
429 |
@@ -48,7 +48,11 @@ |
430 |
#endif |
431 |
|
432 |
iattr->stacksize = stacksize; |
433 |
+#if _STACK_GROWS_DOWN |
434 |
iattr->stackaddr = (char *) stackaddr + stacksize; |
435 |
+#else |
436 |
+ iattr->stackaddr = (char *) stackaddr; |
437 |
+#endif |
438 |
iattr->flags |= ATTR_FLAG_STACKADDR; |
439 |
|
440 |
return 0; |
441 |
@@ -81,7 +85,11 @@ |
442 |
# endif |
443 |
|
444 |
iattr->stacksize = stacksize; |
445 |
+#if _STACK_GROWS_DOWN |
446 |
iattr->stackaddr = (char *) stackaddr + stacksize; |
447 |
+#else |
448 |
+ iattr->stackaddr = (char *) stackaddr; |
449 |
+#endif |
450 |
iattr->flags |= ATTR_FLAG_STACKADDR; |
451 |
|
452 |
return 0; |
453 |
--- a/nptl/pthread_create.c 2010-07-25 21:58:30.713135617 +0200 |
454 |
+++ b/nptl/pthread_create.c 2010-07-25 21:59:05.536794818 +0200 |
455 |
@@ -383,12 +383,18 @@ |
456 |
#ifdef _STACK_GROWS_DOWN |
457 |
char *sp = CURRENT_STACK_FRAME; |
458 |
size_t freesize = (sp - (char *) pd->stackblock) & ~pagesize_m1; |
459 |
-#else |
460 |
-# error "to do" |
461 |
-#endif |
462 |
assert (freesize < pd->stackblock_size); |
463 |
if (freesize > PTHREAD_STACK_MIN) |
464 |
madvise (pd->stackblock, freesize - PTHREAD_STACK_MIN, MADV_DONTNEED); |
465 |
+#else |
466 |
+ char *sp = CURRENT_STACK_FRAME; |
467 |
+ size_t freesize = ((char *) pd->stackblock + pd->stackblock_size - sp) |
468 |
+ & ~pagesize_m1; |
469 |
+ void *freeblock = (void *) (sp + PTHREAD_STACK_MIN); |
470 |
+ assert (freesize < pd->stackblock_size); |
471 |
+ if (freesize > PTHREAD_STACK_MIN) |
472 |
+ madvise (freeblock, freesize - PTHREAD_STACK_MIN, MADV_DONTNEED); |
473 |
+#endif |
474 |
|
475 |
/* If the thread is detached free the TCB. */ |
476 |
if (IS_DETACHED (pd)) |
477 |
--- a/nptl/pthread_getattr_np.c 2010-07-25 21:58:30.713135617 +0200 |
478 |
+++ b/nptl/pthread_getattr_np.c 2010-07-25 21:59:05.536794818 +0200 |
479 |
@@ -61,7 +62,11 @@ |
480 |
if (__builtin_expect (thread->stackblock != NULL, 1)) |
481 |
{ |
482 |
iattr->stacksize = thread->stackblock_size; |
483 |
+#ifdef _STACK_GROWS_DOWN |
484 |
iattr->stackaddr = (char *) thread->stackblock + iattr->stacksize; |
485 |
+#else |
486 |
+ iattr->stackaddr = (char *) thread->stackblock; |
487 |
+#endif |
488 |
} |
489 |
else |
490 |
{ |
491 |
@@ -110,13 +115,21 @@ |
492 |
{ |
493 |
/* Found the entry. Now we have the info we need. */ |
494 |
iattr->stacksize = rl.rlim_cur; |
495 |
+#ifdef _STACK_GROWS_DOWN |
496 |
iattr->stackaddr = (void *) to; |
497 |
|
498 |
/* The limit might be too high. */ |
499 |
if ((size_t) iattr->stacksize |
500 |
> (size_t) iattr->stackaddr - last_to) |
501 |
iattr->stacksize = (size_t) iattr->stackaddr - last_to; |
502 |
+#else |
503 |
+ iattr->stackaddr = (void *) from; |
504 |
|
505 |
+ /* The limit might be too high. */ |
506 |
+ if ((size_t) iattr->stacksize |
507 |
+ > to - (size_t) iattr->stackaddr) |
508 |
+ iattr->stacksize = to - (size_t) iattr->stackaddr; |
509 |
+#endif |
510 |
/* We succeed and no need to look further. */ |
511 |
ret = 0; |
512 |
break; |
513 |
|
514 |
2010-02-09 Carlos O'Donell <carlos@××××××××××××.com> |
515 |
|
516 |
* sysdeps/hppa/dl-machine.h (ELF_MACHINE_BEFORE_RTLD_RELOC): |
517 |
Call _dl_fptr_init. |
518 |
|
519 |
--- a/ports/sysdeps/hppa/dl-machine.h 2010-07-25 21:58:30.189140390 +0200 |
520 |
+++ b/ports/sysdeps/hppa/dl-machine.h 2010-07-25 22:02:25.502848298 +0200 |
521 |
@@ -64,7 +64,8 @@ |
522 |
} |
523 |
|
524 |
#define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info) \ |
525 |
- __hppa_init_bootstrap_fdesc_table (&bootstrap_map); |
526 |
+ __hppa_init_bootstrap_fdesc_table (&bootstrap_map); \ |
527 |
+ _dl_fptr_init(); |
528 |
|
529 |
/* Return nonzero iff ELF header is compatible with the running host. */ |
530 |
static inline int |
531 |
--- a/sysdeps/generic/dl-fptr.h 2010-07-25 21:58:30.525138223 +0200 |
532 |
+++ b/sysdeps/generic/dl-fptr.h 2010-07-25 22:00:54.323726976 +0200 |
533 |
@@ -40,6 +40,9 @@ |
534 |
|
535 |
extern ElfW(Addr) _dl_boot_fptr_table []; |
536 |
|
537 |
+/* Must be called before any other function. */ |
538 |
+extern void _dl_fptr_init (void); |
539 |
+ |
540 |
extern ElfW(Addr) _dl_make_fptr (struct link_map *, const ElfW(Sym) *, |
541 |
ElfW(Addr)); |
542 |
|
543 |
|
544 |
|
545 |
|
546 |
1.1 src/patchsets/glibc/2.14/ports/1508_all_glibc-2.13-hppa-DEFAULT_STACK_PERMS.patch |
547 |
|
548 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/1508_all_glibc-2.13-hppa-DEFAULT_STACK_PERMS.patch?rev=1.1&view=markup |
549 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/1508_all_glibc-2.13-hppa-DEFAULT_STACK_PERMS.patch?rev=1.1&content-type=text/plain |
550 |
|
551 |
Index: 1508_all_glibc-2.13-hppa-DEFAULT_STACK_PERMS.patch |
552 |
=================================================================== |
553 |
http://sourceware.org/ml/libc-ports/2011-03/msg00028.html |
554 |
|
555 |
2011-03-11 Aurelien Jarno <aurelien@×××××××.net> |
556 |
|
557 |
* sysdeps/hppa/stackinfo.h: Define DEFAULT_STACK_PERMS with PF_X. |
558 |
|
559 |
diff --git a/sysdeps/hppa/stackinfo.h b/sysdeps/hppa/stackinfo.h |
560 |
index 318de71..d0dac20 100644 |
561 |
--- ports/sysdeps/hppa/stackinfo.h |
562 |
+++ ports/sysdeps/hppa/stackinfo.h |
563 |
@@ -25,4 +25,8 @@ |
564 |
/* On PA the stack grows up. */ |
565 |
#define _STACK_GROWS_UP 1 |
566 |
|
567 |
+/* Default to an executable stack. PF_X can be overridden if PT_GNU_STACK is |
568 |
+ * present, but it is presumed absent. */ |
569 |
+#define DEFAULT_STACK_PERMS (PF_R|PF_W|PF_X) |
570 |
+ |
571 |
#endif /* stackinfo.h */ |
572 |
|
573 |
|
574 |
|
575 |
1.1 src/patchsets/glibc/2.14/ports/1509_all_glibc-2.11-hppa-SOCK_CLOEXEC.patch |
576 |
|
577 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/1509_all_glibc-2.11-hppa-SOCK_CLOEXEC.patch?rev=1.1&view=markup |
578 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/1509_all_glibc-2.11-hppa-SOCK_CLOEXEC.patch?rev=1.1&content-type=text/plain |
579 |
|
580 |
Index: 1509_all_glibc-2.11-hppa-SOCK_CLOEXEC.patch |
581 |
=================================================================== |
582 |
CLOEXEC and NONBLOCK values are different on hppa, so it needs its own headers |
583 |
|
584 |
https://bugs.gentoo.org/331119 |
585 |
|
586 |
--- ports/sysdeps/unix/sysv/linux/hppa/sys/epoll.h |
587 |
+++ ports/sysdeps/unix/sysv/linux/hppa/sys/epoll.h |
588 |
@@ -0,0 +1,144 @@ |
589 |
+/* Copyright (C) 2002-2006, 2007, 2008, 2009 Free Software Foundation, Inc. |
590 |
+ This file is part of the GNU C Library. |
591 |
+ |
592 |
+ The GNU C Library is free software; you can redistribute it and/or |
593 |
+ modify it under the terms of the GNU Lesser General Public |
594 |
+ License as published by the Free Software Foundation; either |
595 |
+ version 2.1 of the License, or (at your option) any later version. |
596 |
+ |
597 |
+ The GNU C Library is distributed in the hope that it will be useful, |
598 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
599 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
600 |
+ Lesser General Public License for more details. |
601 |
+ |
602 |
+ You should have received a copy of the GNU Lesser General Public |
603 |
+ License along with the GNU C Library; if not, write to the Free |
604 |
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
605 |
+ 02111-1307 USA. */ |
606 |
+ |
607 |
+#ifndef _SYS_EPOLL_H |
608 |
+#define _SYS_EPOLL_H 1 |
609 |
+ |
610 |
+#include <stdint.h> |
611 |
+#include <sys/types.h> |
612 |
+ |
613 |
+/* Get __sigset_t. */ |
614 |
+#include <bits/sigset.h> |
615 |
+ |
616 |
+#ifndef __sigset_t_defined |
617 |
+# define __sigset_t_defined |
618 |
+typedef __sigset_t sigset_t; |
619 |
+#endif |
620 |
+ |
621 |
+ |
622 |
+/* Flags to be passed to epoll_create1. */ |
623 |
+enum |
624 |
+ { |
625 |
+ EPOLL_CLOEXEC = 010000000, |
626 |
+#define EPOLL_CLOEXEC EPOLL_CLOEXEC |
627 |
+ EPOLL_NONBLOCK = 00200004 /* HPUX has separate NDELAY & NONBLOCK */ |
628 |
+#define EPOLL_NONBLOCK EPOLL_NONBLOCK |
629 |
+ }; |
630 |
+ |
631 |
+ |
632 |
+enum EPOLL_EVENTS |
633 |
+ { |
634 |
+ EPOLLIN = 0x001, |
635 |
+#define EPOLLIN EPOLLIN |
636 |
+ EPOLLPRI = 0x002, |
637 |
+#define EPOLLPRI EPOLLPRI |
638 |
+ EPOLLOUT = 0x004, |
639 |
+#define EPOLLOUT EPOLLOUT |
640 |
+ EPOLLRDNORM = 0x040, |
641 |
+#define EPOLLRDNORM EPOLLRDNORM |
642 |
+ EPOLLRDBAND = 0x080, |
643 |
+#define EPOLLRDBAND EPOLLRDBAND |
644 |
+ EPOLLWRNORM = 0x100, |
645 |
+#define EPOLLWRNORM EPOLLWRNORM |
646 |
+ EPOLLWRBAND = 0x200, |
647 |
+#define EPOLLWRBAND EPOLLWRBAND |
648 |
+ EPOLLMSG = 0x400, |
649 |
+#define EPOLLMSG EPOLLMSG |
650 |
+ EPOLLERR = 0x008, |
651 |
+#define EPOLLERR EPOLLERR |
652 |
+ EPOLLHUP = 0x010, |
653 |
+#define EPOLLHUP EPOLLHUP |
654 |
+ EPOLLRDHUP = 0x2000, |
655 |
+#define EPOLLRDHUP EPOLLRDHUP |
656 |
+ EPOLLONESHOT = (1 << 30), |
657 |
+#define EPOLLONESHOT EPOLLONESHOT |
658 |
+ EPOLLET = (1 << 31) |
659 |
+#define EPOLLET EPOLLET |
660 |
+ }; |
661 |
+ |
662 |
+ |
663 |
+/* Valid opcodes ( "op" parameter ) to issue to epoll_ctl(). */ |
664 |
+#define EPOLL_CTL_ADD 1 /* Add a file descriptor to the interface. */ |
665 |
+#define EPOLL_CTL_DEL 2 /* Remove a file descriptor from the interface. */ |
666 |
+#define EPOLL_CTL_MOD 3 /* Change file descriptor epoll_event structure. */ |
667 |
+ |
668 |
+ |
669 |
+typedef union epoll_data |
670 |
+{ |
671 |
+ void *ptr; |
672 |
+ int fd; |
673 |
+ uint32_t u32; |
674 |
+ uint64_t u64; |
675 |
+} epoll_data_t; |
676 |
+ |
677 |
+struct epoll_event |
678 |
+{ |
679 |
+ uint32_t events; /* Epoll events */ |
680 |
+ epoll_data_t data; /* User data variable */ |
681 |
+}; |
682 |
+ |
683 |
+ |
684 |
+__BEGIN_DECLS |
685 |
+ |
686 |
+/* Creates an epoll instance. Returns an fd for the new instance. |
687 |
+ The "size" parameter is a hint specifying the number of file |
688 |
+ descriptors to be associated with the new instance. The fd |
689 |
+ returned by epoll_create() should be closed with close(). */ |
690 |
+extern int epoll_create (int __size) __THROW; |
691 |
+ |
692 |
+/* Same as epoll_create but with an FLAGS parameter. The unused SIZE |
693 |
+ parameter has been dropped. */ |
694 |
+extern int epoll_create1 (int __flags) __THROW; |
695 |
+ |
696 |
+ |
697 |
+/* Manipulate an epoll instance "epfd". Returns 0 in case of success, |
698 |
+ -1 in case of error ( the "errno" variable will contain the |
699 |
+ specific error code ) The "op" parameter is one of the EPOLL_CTL_* |
700 |
+ constants defined above. The "fd" parameter is the target of the |
701 |
+ operation. The "event" parameter describes which events the caller |
702 |
+ is interested in and any associated user data. */ |
703 |
+extern int epoll_ctl (int __epfd, int __op, int __fd, |
704 |
+ struct epoll_event *__event) __THROW; |
705 |
+ |
706 |
+ |
707 |
+/* Wait for events on an epoll instance "epfd". Returns the number of |
708 |
+ triggered events returned in "events" buffer. Or -1 in case of |
709 |
+ error with the "errno" variable set to the specific error code. The |
710 |
+ "events" parameter is a buffer that will contain triggered |
711 |
+ events. The "maxevents" is the maximum number of events to be |
712 |
+ returned ( usually size of "events" ). The "timeout" parameter |
713 |
+ specifies the maximum wait time in milliseconds (-1 == infinite). |
714 |
+ |
715 |
+ This function is a cancellation point and therefore not marked with |
716 |
+ __THROW. */ |
717 |
+extern int epoll_wait (int __epfd, struct epoll_event *__events, |
718 |
+ int __maxevents, int __timeout); |
719 |
+ |
720 |
+ |
721 |
+/* Same as epoll_wait, but the thread's signal mask is temporarily |
722 |
+ and atomically replaced with the one provided as parameter. |
723 |
+ |
724 |
+ This function is a cancellation point and therefore not marked with |
725 |
+ __THROW. */ |
726 |
+extern int epoll_pwait (int __epfd, struct epoll_event *__events, |
727 |
+ int __maxevents, int __timeout, |
728 |
+ __const __sigset_t *__ss); |
729 |
+ |
730 |
+__END_DECLS |
731 |
+ |
732 |
+#endif /* sys/epoll.h */ |
733 |
--- ports/sysdeps/unix/sysv/linux/hppa/sys/eventfd.h |
734 |
+++ ports/sysdeps/unix/sysv/linux/hppa/sys/eventfd.h |
735 |
@@ -0,0 +1,54 @@ |
736 |
+/* Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. |
737 |
+ This file is part of the GNU C Library. |
738 |
+ |
739 |
+ The GNU C Library is free software; you can redistribute it and/or |
740 |
+ modify it under the terms of the GNU Lesser General Public |
741 |
+ License as published by the Free Software Foundation; either |
742 |
+ version 2.1 of the License, or (at your option) any later version. |
743 |
+ |
744 |
+ The GNU C Library is distributed in the hope that it will be useful, |
745 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
746 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
747 |
+ Lesser General Public License for more details. |
748 |
+ |
749 |
+ You should have received a copy of the GNU Lesser General Public |
750 |
+ License along with the GNU C Library; if not, write to the Free |
751 |
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
752 |
+ 02111-1307 USA. */ |
753 |
+ |
754 |
+#ifndef _SYS_EVENTFD_H |
755 |
+#define _SYS_EVENTFD_H 1 |
756 |
+ |
757 |
+#include <stdint.h> |
758 |
+ |
759 |
+ |
760 |
+/* Type for event counter. */ |
761 |
+typedef uint64_t eventfd_t; |
762 |
+ |
763 |
+/* Flags for signalfd. */ |
764 |
+enum |
765 |
+ { |
766 |
+ EFD_SEMAPHORE = 1, |
767 |
+#define EFD_SEMAPHORE EFD_SEMAPHORE |
768 |
+ EFD_CLOEXEC = 010000000, |
769 |
+#define EFD_CLOEXEC EFD_CLOEXEC |
770 |
+ EFD_NONBLOCK = 00200004 /* HPUX has separate NDELAY & NONBLOCK */ |
771 |
+#define EFD_NONBLOCK EFD_NONBLOCK |
772 |
+ }; |
773 |
+ |
774 |
+ |
775 |
+__BEGIN_DECLS |
776 |
+ |
777 |
+/* Return file descriptor for generic event channel. Set initial |
778 |
+ value to COUNT. */ |
779 |
+extern int eventfd (int __count, int __flags) __THROW; |
780 |
+ |
781 |
+/* Read event counter and possibly wait for events. */ |
782 |
+extern int eventfd_read (int __fd, eventfd_t *__value); |
783 |
+ |
784 |
+/* Increment event counter. */ |
785 |
+extern int eventfd_write (int __fd, eventfd_t __value); |
786 |
+ |
787 |
+__END_DECLS |
788 |
+ |
789 |
+#endif /* sys/eventfd.h */ |
790 |
--- ports/sysdeps/unix/sysv/linux/hppa/sys/inotify.h |
791 |
+++ ports/sysdeps/unix/sysv/linux/hppa/sys/inotify.h |
792 |
@@ -0,0 +1,105 @@ |
793 |
+/* Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc. |
794 |
+ This file is part of the GNU C Library. |
795 |
+ |
796 |
+ The GNU C Library is free software; you can redistribute it and/or |
797 |
+ modify it under the terms of the GNU Lesser General Public |
798 |
+ License as published by the Free Software Foundation; either |
799 |
+ version 2.1 of the License, or (at your option) any later version. |
800 |
+ |
801 |
+ The GNU C Library is distributed in the hope that it will be useful, |
802 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
803 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
804 |
+ Lesser General Public License for more details. |
805 |
+ |
806 |
+ You should have received a copy of the GNU Lesser General Public |
807 |
+ License along with the GNU C Library; if not, write to the Free |
808 |
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
809 |
+ 02111-1307 USA. */ |
810 |
+ |
811 |
+#ifndef _SYS_INOTIFY_H |
812 |
+#define _SYS_INOTIFY_H 1 |
813 |
+ |
814 |
+#include <stdint.h> |
815 |
+ |
816 |
+ |
817 |
+/* Flags for the parameter of inotify_init1. */ |
818 |
+enum |
819 |
+ { |
820 |
+ IN_CLOEXEC = 010000000, |
821 |
+#define IN_CLOEXEC IN_CLOEXEC |
822 |
+ IN_NONBLOCK = 000200004 /* HPUX has separate NDELAY & NONBLOCK */ |
823 |
+#define IN_NONBLOCK IN_NONBLOCK |
824 |
+ }; |
825 |
+ |
826 |
+ |
827 |
+/* Structure describing an inotify event. */ |
828 |
+struct inotify_event |
829 |
+{ |
830 |
+ int wd; /* Watch descriptor. */ |
831 |
+ uint32_t mask; /* Watch mask. */ |
832 |
+ uint32_t cookie; /* Cookie to synchronize two events. */ |
833 |
+ uint32_t len; /* Length (including NULs) of name. */ |
834 |
+ char name __flexarr; /* Name. */ |
835 |
+}; |
836 |
+ |
837 |
+ |
838 |
+/* Supported events suitable for MASK parameter of INOTIFY_ADD_WATCH. */ |
839 |
+#define IN_ACCESS 0x00000001 /* File was accessed. */ |
840 |
+#define IN_MODIFY 0x00000002 /* File was modified. */ |
841 |
+#define IN_ATTRIB 0x00000004 /* Metadata changed. */ |
842 |
+#define IN_CLOSE_WRITE 0x00000008 /* Writtable file was closed. */ |
843 |
+#define IN_CLOSE_NOWRITE 0x00000010 /* Unwrittable file closed. */ |
844 |
+#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */ |
845 |
+#define IN_OPEN 0x00000020 /* File was opened. */ |
846 |
+#define IN_MOVED_FROM 0x00000040 /* File was moved from X. */ |
847 |
+#define IN_MOVED_TO 0x00000080 /* File was moved to Y. */ |
848 |
+#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */ |
849 |
+#define IN_CREATE 0x00000100 /* Subfile was created. */ |
850 |
+#define IN_DELETE 0x00000200 /* Subfile was deleted. */ |
851 |
+#define IN_DELETE_SELF 0x00000400 /* Self was deleted. */ |
852 |
+#define IN_MOVE_SELF 0x00000800 /* Self was moved. */ |
853 |
+ |
854 |
+/* Events sent by the kernel. */ |
855 |
+#define IN_UNMOUNT 0x00002000 /* Backing fs was unmounted. */ |
856 |
+#define IN_Q_OVERFLOW 0x00004000 /* Event queued overflowed. */ |
857 |
+#define IN_IGNORED 0x00008000 /* File was ignored. */ |
858 |
+ |
859 |
+/* Helper events. */ |
860 |
+#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */ |
861 |
+#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */ |
862 |
+ |
863 |
+/* Special flags. */ |
864 |
+#define IN_ONLYDIR 0x01000000 /* Only watch the path if it is a |
865 |
+ directory. */ |
866 |
+#define IN_DONT_FOLLOW 0x02000000 /* Do not follow a sym link. */ |
867 |
+#define IN_MASK_ADD 0x20000000 /* Add to the mask of an already |
868 |
+ existing watch. */ |
869 |
+#define IN_ISDIR 0x40000000 /* Event occurred against dir. */ |
870 |
+#define IN_ONESHOT 0x80000000 /* Only send event once. */ |
871 |
+ |
872 |
+/* All events which a program can wait on. */ |
873 |
+#define IN_ALL_EVENTS (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE \ |
874 |
+ | IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM \ |
875 |
+ | IN_MOVED_TO | IN_CREATE | IN_DELETE \ |
876 |
+ | IN_DELETE_SELF | IN_MOVE_SELF) |
877 |
+ |
878 |
+ |
879 |
+__BEGIN_DECLS |
880 |
+ |
881 |
+/* Create and initialize inotify instance. */ |
882 |
+extern int inotify_init (void) __THROW; |
883 |
+ |
884 |
+/* Create and initialize inotify instance. */ |
885 |
+extern int inotify_init1 (int __flags) __THROW; |
886 |
+ |
887 |
+/* Add watch of object NAME to inotify instance FD. Notify about |
888 |
+ events specified by MASK. */ |
889 |
+extern int inotify_add_watch (int __fd, const char *__name, uint32_t __mask) |
890 |
+ __THROW; |
891 |
+ |
892 |
+/* Remove the watch specified by WD from the inotify instance FD. */ |
893 |
+extern int inotify_rm_watch (int __fd, int __wd) __THROW; |
894 |
+ |
895 |
+__END_DECLS |
896 |
+ |
897 |
+#endif /* sys/inotify.h */ |
898 |
--- ports/sysdeps/unix/sysv/linux/hppa/sys/signalfd.h |
899 |
+++ ports/sysdeps/unix/sysv/linux/hppa/sys/signalfd.h |
900 |
@@ -0,0 +1,66 @@ |
901 |
+/* Copyright (C) 2007, 2008 Free Software Foundation, Inc. |
902 |
+ This file is part of the GNU C Library. |
903 |
+ |
904 |
+ The GNU C Library is free software; you can redistribute it and/or |
905 |
+ modify it under the terms of the GNU Lesser General Public |
906 |
+ License as published by the Free Software Foundation; either |
907 |
+ version 2.1 of the License, or (at your option) any later version. |
908 |
+ |
909 |
+ The GNU C Library is distributed in the hope that it will be useful, |
910 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
911 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
912 |
+ Lesser General Public License for more details. |
913 |
+ |
914 |
+ You should have received a copy of the GNU Lesser General Public |
915 |
+ License along with the GNU C Library; if not, write to the Free |
916 |
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
917 |
+ 02111-1307 USA. */ |
918 |
+ |
919 |
+#ifndef _SYS_SIGNALFD_H |
920 |
+#define _SYS_SIGNALFD_H 1 |
921 |
+ |
922 |
+#define __need_sigset_t |
923 |
+#include <signal.h> |
924 |
+#include <stdint.h> |
925 |
+ |
926 |
+ |
927 |
+struct signalfd_siginfo |
928 |
+{ |
929 |
+ uint32_t ssi_signo; |
930 |
+ int32_t ssi_errno; |
931 |
+ int32_t ssi_code; |
932 |
+ uint32_t ssi_pid; |
933 |
+ uint32_t ssi_uid; |
934 |
+ int32_t ssi_fd; |
935 |
+ uint32_t ssi_tid; |
936 |
+ uint32_t ssi_band; |
937 |
+ uint32_t ssi_overrun; |
938 |
+ uint32_t ssi_trapno; |
939 |
+ int32_t ssi_status; |
940 |
+ int32_t ssi_int; |
941 |
+ uint64_t ssi_ptr; |
942 |
+ uint64_t ssi_utime; |
943 |
+ uint64_t ssi_stime; |
944 |
+ uint64_t ssi_addr; |
945 |
+ uint8_t __pad[48]; |
946 |
+}; |
947 |
+ |
948 |
+/* Flags for signalfd. */ |
949 |
+enum |
950 |
+ { |
951 |
+ SFD_CLOEXEC = 010000000, |
952 |
+#define SFD_CLOEXEC SFD_CLOEXEC |
953 |
+ SFD_NONBLOCK = 00200004 /* HPUX has separate NDELAY & NONBLOCK */ |
954 |
+#define SFD_NONBLOCK SFD_NONBLOCK |
955 |
+ }; |
956 |
+ |
957 |
+__BEGIN_DECLS |
958 |
+ |
959 |
+/* Request notification for delivery of signals in MASK to be |
960 |
+ performed using descriptor FD.*/ |
961 |
+extern int signalfd (int __fd, const sigset_t *__mask, int __flags) |
962 |
+ __THROW __nonnull ((2)); |
963 |
+ |
964 |
+__END_DECLS |
965 |
+ |
966 |
+#endif /* sys/signalfd.h */ |
967 |
--- ports/sysdeps/unix/sysv/linux/hppa/sys/timerfd.h |
968 |
+++ ports/sysdeps/unix/sysv/linux/hppa/sys/timerfd.h |
969 |
@@ -0,0 +1,60 @@ |
970 |
+/* Copyright (C) 2008 Free Software Foundation, Inc. |
971 |
+ This file is part of the GNU C Library. |
972 |
+ |
973 |
+ The GNU C Library is free software; you can redistribute it and/or |
974 |
+ modify it under the terms of the GNU Lesser General Public |
975 |
+ License as published by the Free Software Foundation; either |
976 |
+ version 2.1 of the License, or (at your option) any later version. |
977 |
+ |
978 |
+ The GNU C Library is distributed in the hope that it will be useful, |
979 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
980 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
981 |
+ Lesser General Public License for more details. |
982 |
+ |
983 |
+ You should have received a copy of the GNU Lesser General Public |
984 |
+ License along with the GNU C Library; if not, write to the Free |
985 |
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
986 |
+ 02111-1307 USA. */ |
987 |
+ |
988 |
+#ifndef _SYS_TIMERFD_H |
989 |
+#define _SYS_TIMERFD_H 1 |
990 |
+ |
991 |
+#include <time.h> |
992 |
+ |
993 |
+ |
994 |
+/* Bits to be set in the FLAGS parameter of `timerfd_create'. */ |
995 |
+enum |
996 |
+ { |
997 |
+ TFD_CLOEXEC = 010000000, |
998 |
+#define TFD_CLOEXEC TFD_CLOEXEC |
999 |
+ TFD_NONBLOCK = 000200004 /* HPUX has separate NDELAY & NONBLOCK */ |
1000 |
+#define TFD_NONBLOCK TFD_NONBLOCK |
1001 |
+ }; |
1002 |
+ |
1003 |
+ |
1004 |
+/* Bits to be set in the FLAGS parameter of `timerfd_settime'. */ |
1005 |
+enum |
1006 |
+ { |
1007 |
+ TFD_TIMER_ABSTIME = 1 << 0 |
1008 |
+#define TFD_TIMER_ABSTIME TFD_TIMER_ABSTIME |
1009 |
+ }; |
1010 |
+ |
1011 |
+ |
1012 |
+__BEGIN_DECLS |
1013 |
+ |
1014 |
+/* Return file descriptor for new interval timer source. */ |
1015 |
+extern int timerfd_create (clockid_t __clock_id, int __flags) __THROW; |
1016 |
+ |
1017 |
+/* Set next expiration time of interval timer source UFD to UTMR. If |
1018 |
+ FLAGS has the TFD_TIMER_ABSTIME flag set the timeout value is |
1019 |
+ absolute. Optionally return the old expiration time in OTMR. */ |
1020 |
+extern int timerfd_settime (int __ufd, int __flags, |
1021 |
+ __const struct itimerspec *__utmr, |
1022 |
+ struct itimerspec *__otmr) __THROW; |
1023 |
+ |
1024 |
+/* Return the next expiration time of UFD. */ |
1025 |
+extern int timerfd_gettime (int __ufd, struct itimerspec *__otmr) __THROW; |
1026 |
+ |
1027 |
+__END_DECLS |
1028 |
+ |
1029 |
+#endif /* sys/timerfd.h */ |
1030 |
|
1031 |
|
1032 |
|
1033 |
1.1 src/patchsets/glibc/2.14/ports/1530_all_glibc-m68k-sys-user.patch |
1034 |
|
1035 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/1530_all_glibc-m68k-sys-user.patch?rev=1.1&view=markup |
1036 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/1530_all_glibc-m68k-sys-user.patch?rev=1.1&content-type=text/plain |
1037 |
|
1038 |
Index: 1530_all_glibc-m68k-sys-user.patch |
1039 |
=================================================================== |
1040 |
copied from kernel as it is sanitized now |
1041 |
|
1042 |
--- libc/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h |
1043 |
+++ libc/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h |
1044 |
@@ -0,0 +1,87 @@ |
1045 |
+#ifndef _SYS_USER_H |
1046 |
+#define _SYS_USER_H |
1047 |
+ |
1048 |
+/* Core file format: The core file is written in such a way that gdb |
1049 |
+ can understand it and provide useful information to the user (under |
1050 |
+ linux we use the 'trad-core' bfd). There are quite a number of |
1051 |
+ obstacles to being able to view the contents of the floating point |
1052 |
+ registers, and until these are solved you will not be able to view the |
1053 |
+ contents of them. Actually, you can read in the core file and look at |
1054 |
+ the contents of the user struct to find out what the floating point |
1055 |
+ registers contain. |
1056 |
+ The actual file contents are as follows: |
1057 |
+ UPAGE: 1 page consisting of a user struct that tells gdb what is present |
1058 |
+ in the file. Directly after this is a copy of the task_struct, which |
1059 |
+ is currently not used by gdb, but it may come in useful at some point. |
1060 |
+ All of the registers are stored as part of the upage. The upage should |
1061 |
+ always be only one page. |
1062 |
+ DATA: The data area is stored. We use current->end_text to |
1063 |
+ current->brk to pick up all of the user variables, plus any memory |
1064 |
+ that may have been malloced. No attempt is made to determine if a page |
1065 |
+ is demand-zero or if a page is totally unused, we just cover the entire |
1066 |
+ range. All of the addresses are rounded in such a way that an integral |
1067 |
+ number of pages is written. |
1068 |
+ STACK: We need the stack information in order to get a meaningful |
1069 |
+ backtrace. We need to write the data from (esp) to |
1070 |
+ current->start_stack, so we round each of these off in order to be able |
1071 |
+ to write an integer number of pages. |
1072 |
+ The minimum core file size is 3 pages, or 12288 bytes. |
1073 |
+*/ |
1074 |
+ |
1075 |
+struct user_m68kfp_struct { |
1076 |
+ unsigned long fpregs[8*3]; /* fp0-fp7 registers */ |
1077 |
+ unsigned long fpcntl[3]; /* fp control regs */ |
1078 |
+}; |
1079 |
+ |
1080 |
+/* This is the old layout of "struct pt_regs" as of Linux 1.x, and |
1081 |
+ is still the layout used by user (the new pt_regs doesn't have |
1082 |
+ all registers). */ |
1083 |
+struct user_regs_struct { |
1084 |
+ long d1,d2,d3,d4,d5,d6,d7; |
1085 |
+ long a0,a1,a2,a3,a4,a5,a6; |
1086 |
+ long d0; |
1087 |
+ long usp; |
1088 |
+ long orig_d0; |
1089 |
+ short stkadj; |
1090 |
+ short sr; |
1091 |
+ long pc; |
1092 |
+ short fmtvec; |
1093 |
+ short __fill; |
1094 |
+}; |
1095 |
+ |
1096 |
+ |
1097 |
+/* When the kernel dumps core, it starts by dumping the user struct - |
1098 |
+ this will be used by gdb to figure out where the data and stack segments |
1099 |
+ are within the file, and what virtual addresses to use. */ |
1100 |
+struct user{ |
1101 |
+/* We start with the registers, to mimic the way that "memory" is returned |
1102 |
+ from the ptrace(3,...) function. */ |
1103 |
+ struct user_regs_struct regs; /* Where the registers are actually stored */ |
1104 |
+/* ptrace does not yet supply these. Someday.... */ |
1105 |
+ int u_fpvalid; /* True if math co-processor being used. */ |
1106 |
+ /* for this mess. Not yet used. */ |
1107 |
+ struct user_m68kfp_struct m68kfp; /* Math Co-processor registers. */ |
1108 |
+/* The rest of this junk is to help gdb figure out what goes where */ |
1109 |
+ unsigned long int u_tsize; /* Text segment size (pages). */ |
1110 |
+ unsigned long int u_dsize; /* Data segment size (pages). */ |
1111 |
+ unsigned long int u_ssize; /* Stack segment size (pages). */ |
1112 |
+ unsigned long start_code; /* Starting virtual address of text. */ |
1113 |
+ unsigned long start_stack; /* Starting virtual address of stack area. |
1114 |
+ This is actually the bottom of the stack, |
1115 |
+ the top of the stack is always found in the |
1116 |
+ esp register. */ |
1117 |
+ long int signal; /* Signal that caused the core dump. */ |
1118 |
+ int reserved; /* No longer used */ |
1119 |
+ struct user_regs_struct *u_ar0; |
1120 |
+ /* Used by gdb to help find the values for */ |
1121 |
+ /* the registers. */ |
1122 |
+ struct user_m68kfp_struct* u_fpstate; /* Math Co-processor pointer. */ |
1123 |
+ unsigned long magic; /* To uniquely identify a core file */ |
1124 |
+ char u_comm[32]; /* User command that was responsible */ |
1125 |
+}; |
1126 |
+#define NBPG 4096 |
1127 |
+#define UPAGES 1 |
1128 |
+#define HOST_TEXT_START_ADDR (u.start_code) |
1129 |
+#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) |
1130 |
+ |
1131 |
+#endif |
1132 |
|
1133 |
|
1134 |
|
1135 |
1.1 src/patchsets/glibc/2.14/ports/6018_all_alpha-glibc-2.8-cache-shape.patch |
1136 |
|
1137 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6018_all_alpha-glibc-2.8-cache-shape.patch?rev=1.1&view=markup |
1138 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6018_all_alpha-glibc-2.8-cache-shape.patch?rev=1.1&content-type=text/plain |
1139 |
|
1140 |
Index: 6018_all_alpha-glibc-2.8-cache-shape.patch |
1141 |
=================================================================== |
1142 |
older verisons of glibc would build dl-sysdep as shared-only and dl-support as |
1143 |
static-only. alpha hooks in a cache variable via dl-auxv.h. newer versions of |
1144 |
glibc build dl-sysdep as both shared and static which means we now have symbol |
1145 |
duplication for static builds with dl-sysdep and dl-support. since dl-sysdep |
1146 |
is both shared/static, there is no point in hooking dl-support anymore, so we |
1147 |
can punt it. |
1148 |
|
1149 |
--- ports/sysdeps/unix/sysv/linux/alpha/dl-support.c |
1150 |
+++ ports/sysdeps/unix/sysv/linux/alpha/dl-support.c |
1151 |
@@ -1,2 +0,0 @@ |
1152 |
-#include "dl-auxv.h" |
1153 |
-#include <elf/dl-support.c> |
1154 |
|
1155 |
|
1156 |
|
1157 |
1.1 src/patchsets/glibc/2.14/ports/6019_all_alpha-glibc-2.13-longjmp-chk.patch |
1158 |
|
1159 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6019_all_alpha-glibc-2.13-longjmp-chk.patch?rev=1.1&view=markup |
1160 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6019_all_alpha-glibc-2.13-longjmp-chk.patch?rev=1.1&content-type=text/plain |
1161 |
|
1162 |
Index: 6019_all_alpha-glibc-2.13-longjmp-chk.patch |
1163 |
=================================================================== |
1164 |
From: Aurelien Jarno <aurelien@×××××××.net> |
1165 |
Date: Sat, 19 Mar 2011 13:29:29 +0100 |
1166 |
To: libc-ports@××××××××××.org |
1167 |
Subject: [PATCH][alpha] Fix ____longjmp_chk |
1168 |
|
1169 |
____longjmp_chk is broken on alpha due to a wrong register used for a |
1170 |
comparison. The patch below fixes that and with it the following |
1171 |
testsuite errors: |
1172 |
- tst-longjmp_chk.out, Error 1 |
1173 |
- tst-chk2.out, Error 127 |
1174 |
- tst-chk3.out, Error 127 |
1175 |
- tst-chk5.out, Error 127 |
1176 |
- tst-chk6.out, Error 127 |
1177 |
- tst-lfschk2.out, Error 127 |
1178 |
- tst-lfschk3.out, Error 127 |
1179 |
- tst-lfschk5.out, Error 127 |
1180 |
- tst-lfschk6.out, Error 127 |
1181 |
|
1182 |
2011-03-20 Aurelien Jarno <aurelien@×××××××.net> |
1183 |
|
1184 |
* sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S(____longjmp_chk): |
1185 |
Fix wrong register in stack pointer comparison. |
1186 |
|
1187 |
diff --git a/sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S b/sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S |
1188 |
index 5194ed8..e0e7106 100644 |
1189 |
--- ports/sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S |
1190 |
+++ ports/sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S |
1191 |
@@ -58,7 +58,7 @@ ____longjmp_chk: |
1192 |
PTR_DEMANGLE2(s3, t1) |
1193 |
PTR_DEMANGLE2(fp, t1) |
1194 |
#endif |
1195 |
- cmpule t0, sp, t1 |
1196 |
+ cmpule s3, sp, t1 |
1197 |
bne t1, .Lfail |
1198 |
|
1199 |
.align 4 |
1200 |
|
1201 |
|
1202 |
|
1203 |
1.1 src/patchsets/glibc/2.14/ports/6020_all_alpha-fix-gcc-4.1-warnings.patch |
1204 |
|
1205 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6020_all_alpha-fix-gcc-4.1-warnings.patch?rev=1.1&view=markup |
1206 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6020_all_alpha-fix-gcc-4.1-warnings.patch?rev=1.1&content-type=text/plain |
1207 |
|
1208 |
Index: 6020_all_alpha-fix-gcc-4.1-warnings.patch |
1209 |
=================================================================== |
1210 |
2006-05-30 Falk Hueffner <falk@××××××.org> |
1211 |
|
1212 |
* sysdeps/unix/sysv/linux/alpha/ioperm.c: force the architecture |
1213 |
to ev6 in assembly code. |
1214 |
|
1215 |
{standard input}: Assembler messages: |
1216 |
{standard input}:341: Error: macro requires $at register while noat in effect |
1217 |
{standard input}:374: Error: macro requires $at register while noat in effect |
1218 |
{standard input}:438: Error: macro requires $at register while noat in effect |
1219 |
{standard input}:471: Error: macro requires $at register while noat in effect |
1220 |
make[3]: *** [/tmp/buildd/glibc-2.3.6/build-tree/alpha-libc/misc/ioperm.o] Error 1 |
1221 |
|
1222 |
Hrm. gcc puts .arch ev4 into the .s, and this overrides -mev6 for as. |
1223 |
I cannot really think of anything better than |
1224 |
|
1225 |
--- |
1226 |
ports/sysdeps/unix/sysv/linux/alpha/ioperm.c | 8 ++++---- |
1227 |
1 file changed, 4 insertions(+), 4 deletions(-) |
1228 |
|
1229 |
--- ports/sysdeps/unix/sysv/linux/alpha/ioperm.c |
1230 |
+++ ports/sysdeps/unix/sysv/linux/alpha/ioperm.c |
1231 |
@@ -178,13 +178,13 @@ |
1232 |
static inline void |
1233 |
stb_mb(unsigned char val, unsigned long addr) |
1234 |
{ |
1235 |
- __asm__("stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val)); |
1236 |
+ __asm__(".arch ev6; stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val)); |
1237 |
} |
1238 |
|
1239 |
static inline void |
1240 |
stw_mb(unsigned short val, unsigned long addr) |
1241 |
{ |
1242 |
- __asm__("stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val)); |
1243 |
+ __asm__(".arch ev6; stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val)); |
1244 |
} |
1245 |
|
1246 |
static inline void |
1247 |
@@ -356,7 +356,7 @@ |
1248 |
unsigned long int addr = dense_port_to_cpu_addr (port); |
1249 |
unsigned char r; |
1250 |
|
1251 |
- __asm__ ("ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr)); |
1252 |
+ __asm__ (".arch ev6; ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr)); |
1253 |
return r; |
1254 |
} |
1255 |
|
1256 |
@@ -366,7 +366,7 @@ |
1257 |
unsigned long int addr = dense_port_to_cpu_addr (port); |
1258 |
unsigned short r; |
1259 |
|
1260 |
- __asm__ ("ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr)); |
1261 |
+ __asm__ (".arch ev6; ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr)); |
1262 |
return r; |
1263 |
} |
1264 |
|
1265 |
|
1266 |
|
1267 |
|
1268 |
1.1 src/patchsets/glibc/2.14/ports/6021_all_alpha-glibc-2.13-ptr-mangle.patch |
1269 |
|
1270 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6021_all_alpha-glibc-2.13-ptr-mangle.patch?rev=1.1&view=markup |
1271 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6021_all_alpha-glibc-2.13-ptr-mangle.patch?rev=1.1&content-type=text/plain |
1272 |
|
1273 |
Index: 6021_all_alpha-glibc-2.13-ptr-mangle.patch |
1274 |
=================================================================== |
1275 |
Date: Sat, 26 Mar 2011 19:44:05 +0100 |
1276 |
From: Aurelien Jarno <aurelien@×××××××.net> |
1277 |
To: libc-ports@××××××××××.org |
1278 |
Subject: [PATCH][alpha] Fix exception support |
1279 |
|
1280 |
All tests built with -fexceptions are not working, due to a bug in |
1281 |
pointer mangling. PTR_MANGLE and PTR_DEMANGLE are defined in |
1282 |
sysdeps/unix/alpha/sysdep.h for both ASSEMBLER and !ASSEMBLER cases, but |
1283 |
within a !ASSEMBLER ifdef block. As a result pointer mangling is never |
1284 |
done for assembler code. |
1285 |
|
1286 |
The patch below fixes the issues, and fixes the following tests of the |
1287 |
testsuite: |
1288 |
- tst-cancel24.out, Error 1 |
1289 |
- tst-cancelx16.out, Error 1 |
1290 |
- tst-cancelx17.out, Error 1 |
1291 |
- tst-cancelx18.out, Error 1 |
1292 |
- tst-cancelx20.out, Error 1 |
1293 |
- tst-cancelx21.out, Error 1 |
1294 |
- tst-cancelx4.out, Error 1 |
1295 |
- tst-cancelx5.out, Error 1 |
1296 |
- tst-cleanupx0.out, Error 1 |
1297 |
- tst-cleanupx1.out, Error 1 |
1298 |
- tst-cleanupx3.out, Error 1 |
1299 |
- tst-cleanupx4.out, Error 1 |
1300 |
- tst-mqueue8x.out, Error 1 |
1301 |
- tst-oncex3.out, Error 1 |
1302 |
- tst-oncex4.out, Error 1 |
1303 |
|
1304 |
2011-03-26 Aurelien Jarno <aurelien@×××××××.net> |
1305 |
|
1306 |
* sysdeps/unix/alpha/sysdep.h (PTR_MANGLE): Move out of ASSEMBLER |
1307 |
ifdef. |
1308 |
(PTR_DEMANGLE): Likewise. |
1309 |
|
1310 |
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h |
1311 |
index d9009c1..25979ad 100644 |
1312 |
--- ports/sysdeps/unix/alpha/sysdep.h |
1313 |
+++ ports/sysdeps/unix/alpha/sysdep.h |
1314 |
@@ -157,6 +157,8 @@ __LABEL(name) \ |
1315 |
|
1316 |
#else /* !ASSEMBLER */ |
1317 |
|
1318 |
+#include <stdint.h> |
1319 |
+ |
1320 |
/* ??? Linux needs to be able to override INLINE_SYSCALL for one |
1321 |
particular special case. Make this easy. */ |
1322 |
|
1323 |
@@ -399,11 +401,11 @@ __LABEL(name) \ |
1324 |
_sc_ret = _sc_0, _sc_err = _sc_19; \ |
1325 |
} |
1326 |
|
1327 |
+#endif /* ASSEMBLER */ |
1328 |
+ |
1329 |
/* Pointer mangling support. Note that tls access is slow enough that |
1330 |
we don't deoptimize things by placing the pointer check value there. */ |
1331 |
|
1332 |
-#include <stdint.h> |
1333 |
- |
1334 |
#if defined NOT_IN_libc && defined IS_IN_rtld |
1335 |
# ifdef __ASSEMBLER__ |
1336 |
# define PTR_MANGLE(dst, src, tmp) \ |
1337 |
@@ -447,4 +449,3 @@ extern const uintptr_t __pointer_chk_guard attribute_relro; |
1338 |
# endif |
1339 |
#endif |
1340 |
|
1341 |
-#endif /* ASSEMBLER */ |
1342 |
|
1343 |
|
1344 |
|
1345 |
1.1 src/patchsets/glibc/2.14/ports/6022_alpha_alpha-add-fdatasync-support.patch |
1346 |
|
1347 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6022_alpha_alpha-add-fdatasync-support.patch?rev=1.1&view=markup |
1348 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6022_alpha_alpha-add-fdatasync-support.patch?rev=1.1&content-type=text/plain |
1349 |
|
1350 |
Index: 6022_alpha_alpha-add-fdatasync-support.patch |
1351 |
=================================================================== |
1352 |
2009-07-25 Aurelien Jarno <aurelien@×××××××.net> |
1353 |
|
1354 |
* sysdeps/unix/sysv/linux/kernel-features.h: define |
1355 |
__ASSUME_FDATASYNC. |
1356 |
* sysdeps/unix/sysv/linux/fdatasync.c: New file. |
1357 |
* sysdeps/unix/sysv/linux/Makefile: compile fdatasync.c with |
1358 |
-fexceptions. |
1359 |
* sysdeps/unix/sysv/linux/syscalls.list: Remove fdatasync. |
1360 |
|
1361 |
--- |
1362 |
sysdeps/unix/sysv/linux/Makefile | 1 |
1363 |
sysdeps/unix/sysv/linux/fdatasync.c | 69 ++++++++++++++++++++++++++++++ |
1364 |
sysdeps/unix/sysv/linux/kernel-features.h | 6 ++ |
1365 |
sysdeps/unix/sysv/linux/syscalls.list | 1 |
1366 |
4 files changed, 76 insertions(+), 1 deletion(-) |
1367 |
|
1368 |
--- a/sysdeps/unix/sysv/linux/kernel-features.h |
1369 |
+++ b/sysdeps/unix/sysv/linux/kernel-features.h |
1370 |
@@ -474,6 +474,12 @@ |
1371 |
# define __ASSUME_FUTEX_LOCK_PI 1 |
1372 |
#endif |
1373 |
|
1374 |
+/* Support for fsyncdata syscall was added in 2.6.22 on alpha, but it |
1375 |
+ was already present in 2.0 kernels on other architectures. */ |
1376 |
+#if (!defined __alpha || __LINUX_KERNEL_VERSION >= 0x020616) |
1377 |
+# define __ASSUME_FDATASYNC 1 |
1378 |
+#endif |
1379 |
+ |
1380 |
/* Support for utimensat syscall was added in 2.6.22, on SH |
1381 |
only after 2.6.22-rc1. */ |
1382 |
#if __LINUX_KERNEL_VERSION >= 0x020616 \ |
1383 |
--- /dev/null |
1384 |
+++ b/sysdeps/unix/sysv/linux/fdatasync.c |
1385 |
@@ -0,0 +1,69 @@ |
1386 |
+/* fdatasync -- synchronize at least the data part of a file with |
1387 |
+ the underlying media. Linux version. |
1388 |
+ |
1389 |
+ Copyright (C) 2007 Free Software Foundation, Inc. |
1390 |
+ This file is part of the GNU C Library. |
1391 |
+ |
1392 |
+ The GNU C Library is free software; you can redistribute it and/or |
1393 |
+ modify it under the terms of the GNU Lesser General Public |
1394 |
+ License as published by the Free Software Foundation; either |
1395 |
+ version 2.1 of the License, or (at your option) any later version. |
1396 |
+ |
1397 |
+ The GNU C Library is distributed in the hope that it will be useful, |
1398 |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
1399 |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1400 |
+ Lesser General Public License for more details. |
1401 |
+ |
1402 |
+ You should have received a copy of the GNU Lesser General Public |
1403 |
+ License along with the GNU C Library; if not, write to the Free |
1404 |
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
1405 |
+ 02111-1307 USA. */ |
1406 |
+ |
1407 |
+#include <errno.h> |
1408 |
+#include <unistd.h> |
1409 |
+ |
1410 |
+#include <sysdep-cancel.h> |
1411 |
+#include <sys/syscall.h> |
1412 |
+#include <bp-checks.h> |
1413 |
+ |
1414 |
+#include <kernel-features.h> |
1415 |
+ |
1416 |
+#if defined __NR_fdatasync && !defined __ASSUME_FDATASYNC |
1417 |
+static int __have_no_fdatasync; |
1418 |
+#endif |
1419 |
+ |
1420 |
+static int |
1421 |
+do_fdatasync (int fd) |
1422 |
+{ |
1423 |
+#ifdef __ASSUME_FDATASYNC |
1424 |
+ return INLINE_SYSCALL (fdatasync, 1, fd); |
1425 |
+#elif defined __NR_fdatasync |
1426 |
+ if (!__builtin_expect (__have_no_fdatasync, 0)) |
1427 |
+ { |
1428 |
+ int result = INLINE_SYSCALL (fdatasync, 1, fd); |
1429 |
+ if (__builtin_expect (result, 0) != -1 || errno != ENOSYS) |
1430 |
+ return result; |
1431 |
+ |
1432 |
+ __have_no_fdatasync = 1; |
1433 |
+ } |
1434 |
+#endif |
1435 |
+ return INLINE_SYSCALL (fsync, 1, fd); |
1436 |
+} |
1437 |
+ |
1438 |
+int |
1439 |
+__fdatasync (int fd) |
1440 |
+{ |
1441 |
+ if (SINGLE_THREAD_P) |
1442 |
+ return do_fdatasync (fd); |
1443 |
+ |
1444 |
+ int oldtype = LIBC_CANCEL_ASYNC (); |
1445 |
+ |
1446 |
+ int result = do_fdatasync (fd); |
1447 |
+ |
1448 |
+ LIBC_CANCEL_RESET (oldtype); |
1449 |
+ |
1450 |
+ return result; |
1451 |
+} |
1452 |
+ |
1453 |
+weak_alias (__fdatasync, fdatasync) |
1454 |
+ |
1455 |
--- a/sysdeps/unix/sysv/linux/syscalls.list |
1456 |
+++ b/sysdeps/unix/sysv/linux/syscalls.list |
1457 |
@@ -11,7 +11,6 @@ |
1458 |
epoll_create1 EXTRA epoll_create1 i:i epoll_create1 |
1459 |
epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl |
1460 |
epoll_wait EXTRA epoll_wait Ci:ipii epoll_wait |
1461 |
-fdatasync - fdatasync Ci:i fdatasync |
1462 |
flock - flock i:ii __flock flock |
1463 |
fork - fork i: __libc_fork __fork fork |
1464 |
get_kernel_syms EXTRA get_kernel_syms i:p get_kernel_syms |
1465 |
--- a/sysdeps/unix/sysv/linux/Makefile |
1466 |
+++ b/sysdeps/unix/sysv/linux/Makefile |
1467 |
@@ -17,6 +17,7 @@ |
1468 |
eventfd eventfd_read eventfd_write |
1469 |
|
1470 |
|
1471 |
+CFLAGS-fdatasync.c = -fexceptions |
1472 |
CFLAGS-gethostid.c = -fexceptions |
1473 |
|
1474 |
sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \ |
1475 |
|
1476 |
|
1477 |
|
1478 |
1.1 src/patchsets/glibc/2.14/ports/6023_all_alpha-glibc-2.13-statfs64.patch |
1479 |
|
1480 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6023_all_alpha-glibc-2.13-statfs64.patch?rev=1.1&view=markup |
1481 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6023_all_alpha-glibc-2.13-statfs64.patch?rev=1.1&content-type=text/plain |
1482 |
|
1483 |
Index: 6023_all_alpha-glibc-2.13-statfs64.patch |
1484 |
=================================================================== |
1485 |
From cd96467fcfa0b2a9be52dfc4e013d8051a827edc Mon Sep 17 00:00:00 2001 |
1486 |
From: Mike Frysinger <vapier@g.o> |
1487 |
Date: Sun, 3 Apr 2011 16:54:50 -0400 |
1488 |
Subject: [PATCH] alpha: do not assume statfs64 support |
1489 |
|
1490 |
In the past, the alpha port used the wordsize-64/statfs64.c stub which |
1491 |
allowed the statfs64() func to alias to statfs(). But after the move |
1492 |
to the ports tree, some shuffling happened and now alpha's statfs64.c |
1493 |
will pull in the standard 32bit linux statfs64.c file. The problem |
1494 |
with this is that the code expands into a stub function if the 64bit |
1495 |
syscall is not defined and __ASSUME_STATFS64 is defined (which is |
1496 |
currently the case for alpha). |
1497 |
|
1498 |
Since the alpha port has never had a statfs64 func, but has always had |
1499 |
only a 32bit struct version with the kernel ABI, it is wrong to alias |
1500 |
statfs64 to statfs. So rather than restore the stub statfs64.c file, |
1501 |
undef __ASSUME_STATFS64 in the alpha kernel-features.h. This way the |
1502 |
common code will do the right thing -- use the 32bit statfs syscall |
1503 |
and translate the result in userspace from the 32bit struct to the |
1504 |
64bit struct. |
1505 |
|
1506 |
Signed-off-by: Mike Frysinger <vapier@g.o> |
1507 |
--- |
1508 |
sysdeps/unix/sysv/linux/alpha/kernel-features.h | 3 +++ |
1509 |
1 files changed, 3 insertions(+), 0 deletions(-) |
1510 |
|
1511 |
diff --git a/sysdeps/unix/sysv/linux/alpha/kernel-features.h b/sysdeps/unix/sysv/linux/alpha/kernel-features.h |
1512 |
index 9c640f9..5217ca8 100644 |
1513 |
--- ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h |
1514 |
+++ ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h |
1515 |
@@ -70,6 +70,9 @@ |
1516 |
|
1517 |
#undef __ASSUME_ST_INO_64_BIT |
1518 |
|
1519 |
+/* Alpha does not have a 64bit syscall, and its native syscall is 32bits. */ |
1520 |
+#undef __ASSUME_STATFS64 |
1521 |
+ |
1522 |
/* pselect/ppoll were introduced on alpha just after 2.6.22-rc1. */ |
1523 |
#if __LINUX_KERNEL_VERSION < 0x020617 |
1524 |
# undef __ASSUME_PSELECT |
1525 |
-- |
1526 |
1.7.4.1 |
1527 |
|
1528 |
|
1529 |
|
1530 |
|
1531 |
1.1 src/patchsets/glibc/2.14/ports/6026_all_alpha-fix-rtld-fPIC.patch |
1532 |
|
1533 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6026_all_alpha-fix-rtld-fPIC.patch?rev=1.1&view=markup |
1534 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6026_all_alpha-fix-rtld-fPIC.patch?rev=1.1&content-type=text/plain |
1535 |
|
1536 |
Index: 6026_all_alpha-fix-rtld-fPIC.patch |
1537 |
=================================================================== |
1538 |
2009-05-26 Aurelien Jarno <aurelien@×××××××.net> |
1539 |
|
1540 |
* sysdeps/alpha/Makefile (CFLAGS-rtld.c): add $(PIC-ccflag). |
1541 |
(CFLAGS-dl-close.c): Likewise. |
1542 |
|
1543 |
--- ports/sysdeps/alpha/Makefile |
1544 |
+++ ports/sysdeps/alpha/Makefile |
1545 |
@@ -35,6 +35,9 @@ |
1546 |
ifeq ($(subdir),elf) |
1547 |
# The ld.so startup code cannot use literals until it self-relocates. |
1548 |
CFLAGS-rtld.c = -mbuild-constants |
1549 |
+# It uses more than 64k for the small data area. |
1550 |
+CFLAGS-rtld.c += $(PIC-ccflag) |
1551 |
+CFLAGS-dl-close.c = $(PIC-ccflag) |
1552 |
endif |
1553 |
|
1554 |
# Build everything with full IEEE math support, and with dynamic rounding; |
1555 |
|
1556 |
|
1557 |
|
1558 |
1.1 src/patchsets/glibc/2.14/ports/6027_all_alpha-glibc-2.13-F_GET-SETPIPE_SZ.patch |
1559 |
|
1560 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6027_all_alpha-glibc-2.13-F_GET-SETPIPE_SZ.patch?rev=1.1&view=markup |
1561 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6027_all_alpha-glibc-2.13-F_GET-SETPIPE_SZ.patch?rev=1.1&content-type=text/plain |
1562 |
|
1563 |
Index: 6027_all_alpha-glibc-2.13-F_GET-SETPIPE_SZ.patch |
1564 |
=================================================================== |
1565 |
already in upstream ports repo |
1566 |
|
1567 |
From 146c8734c741e7f592cf07e7fd12644506c4c4c5 Mon Sep 17 00:00:00 2001 |
1568 |
From: Aurelien Jarno <aurelien@×××××××.net> |
1569 |
Date: Tue, 1 Mar 2011 09:59:13 +1000 |
1570 |
Subject: [PATCH] alpha: Define F_GET/SETPIPE_SZ |
1571 |
|
1572 |
--- |
1573 |
ChangeLog.alpha | 5 +++++ |
1574 |
sysdeps/unix/sysv/linux/alpha/bits/fcntl.h | 2 ++ |
1575 |
2 files changed, 7 insertions(+), 0 deletions(-) |
1576 |
|
1577 |
2011-02-28 Aurelien Jarno <aurelien@×××××××.net> |
1578 |
|
1579 |
* sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (F_SETPIPE_SZ, |
1580 |
F_GETPIPE_SZ): Define. |
1581 |
|
1582 |
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h |
1583 |
index 860e9ac..e5e726b 100644 |
1584 |
--- ports/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h |
1585 |
+++ ports/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h |
1586 |
@@ -97,6 +97,8 @@ |
1587 |
# define F_SETLEASE 1024 /* Set a lease. */ |
1588 |
# define F_GETLEASE 1025 /* Enquire what lease is active. */ |
1589 |
# define F_NOTIFY 1026 /* Request notfications on a directory. */ |
1590 |
+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */ |
1591 |
+# define F_GETPIPE_SZ 1032 /* Set pipe page size array. */ |
1592 |
#endif |
1593 |
#ifdef __USE_XOPEN2K8 |
1594 |
# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with |
1595 |
-- |
1596 |
1.7.4.1 |
1597 |
|
1598 |
|
1599 |
|
1600 |
|
1601 |
1.1 src/patchsets/glibc/2.14/ports/6028_all_alpha-glibc-2.13-statfs.f_flags.patch |
1602 |
|
1603 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6028_all_alpha-glibc-2.13-statfs.f_flags.patch?rev=1.1&view=markup |
1604 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6028_all_alpha-glibc-2.13-statfs.f_flags.patch?rev=1.1&content-type=text/plain |
1605 |
|
1606 |
Index: 6028_all_alpha-glibc-2.13-statfs.f_flags.patch |
1607 |
=================================================================== |
1608 |
patch from upstream ports repo |
1609 |
|
1610 |
From 79abd1fbfcd082e5e9857d41d0acb4f64e9299de Mon Sep 17 00:00:00 2001 |
1611 |
From: Aurelien Jarno <aurelien@×××××××.net> |
1612 |
Date: Tue, 1 Mar 2011 10:02:04 +1000 |
1613 |
Subject: [PATCH] alpha: Add f_flags to struct statfs |
1614 |
|
1615 |
--- |
1616 |
ChangeLog.alpha | 11 ++++++++--- |
1617 |
sysdeps/unix/sysv/linux/alpha/bits/statfs.h | 6 ++++-- |
1618 |
2 files changed, 12 insertions(+), 5 deletions(-) |
1619 |
|
1620 |
2011-02-28 Aurelien Jarno <aurelien@×××××××.net> |
1621 |
|
1622 |
* sysdeps/unix/sysv/linux/alpha/bits/statfs.h (struct statfs, |
1623 |
struct statfs64): Add f_flags field. |
1624 |
|
1625 |
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/statfs.h b/sysdeps/unix/sysv/linux/alpha/bits/statfs.h |
1626 |
index d838e6b..157591d 100644 |
1627 |
--- ports/sysdeps/unix/sysv/linux/alpha/bits/statfs.h |
1628 |
+++ ports/sysdeps/unix/sysv/linux/alpha/bits/statfs.h |
1629 |
@@ -42,7 +42,8 @@ struct statfs |
1630 |
__fsid_t f_fsid; |
1631 |
int f_namelen; |
1632 |
int f_frsize; |
1633 |
- int f_spare[5]; |
1634 |
+ int f_flags; |
1635 |
+ int f_spare[4]; |
1636 |
}; |
1637 |
|
1638 |
#ifdef __USE_LARGEFILE64 |
1639 |
@@ -58,7 +59,8 @@ struct statfs64 |
1640 |
__fsid_t f_fsid; |
1641 |
int f_namelen; |
1642 |
int f_frsize; |
1643 |
- int f_spare[5]; |
1644 |
+ int f_flags; |
1645 |
+ int f_spare[4]; |
1646 |
}; |
1647 |
#endif |
1648 |
|
1649 |
-- |
1650 |
1.7.4.1 |
1651 |
|
1652 |
|
1653 |
|
1654 |
|
1655 |
1.1 src/patchsets/glibc/2.14/ports/6029_all_alpha-glibc-2.13-DEFAULT_STACK_PERMS.patch |
1656 |
|
1657 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6029_all_alpha-glibc-2.13-DEFAULT_STACK_PERMS.patch?rev=1.1&view=markup |
1658 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6029_all_alpha-glibc-2.13-DEFAULT_STACK_PERMS.patch?rev=1.1&content-type=text/plain |
1659 |
|
1660 |
Index: 6029_all_alpha-glibc-2.13-DEFAULT_STACK_PERMS.patch |
1661 |
=================================================================== |
1662 |
taken from upstream glibc ports git repo |
1663 |
|
1664 |
From 65342356965f356a7fb9b4578856c5ad0861d423 Mon Sep 17 00:00:00 2001 |
1665 |
From: Aurelien Jarno <aurelien@×××××××.net> |
1666 |
Date: Tue, 1 Mar 2011 10:00:28 +1000 |
1667 |
Subject: [PATCH] alpha: Define DEFAULT_STACK_PERMS |
1668 |
|
1669 |
--- |
1670 |
ChangeLog.alpha | 4 ++++ |
1671 |
sysdeps/alpha/stackinfo.h | 6 ++++++ |
1672 |
2 files changed, 10 insertions(+), 0 deletions(-) |
1673 |
|
1674 |
2011-02-28 Aurelien Jarno <aurelien@×××××××.net> |
1675 |
|
1676 |
* sysdeps/alpha/stackinfo.h: Define DEFAULT_STACK_PERMS with PF_X. |
1677 |
|
1678 |
diff --git a/sysdeps/alpha/stackinfo.h b/sysdeps/alpha/stackinfo.h |
1679 |
index 0a281bd..d9dbc35 100644 |
1680 |
--- ports/sysdeps/alpha/stackinfo.h |
1681 |
+++ ports/sysdeps/alpha/stackinfo.h |
1682 |
@@ -22,7 +22,13 @@ |
1683 |
#ifndef _STACKINFO_H |
1684 |
#define _STACKINFO_H 1 |
1685 |
|
1686 |
+#include <elf.h> |
1687 |
+ |
1688 |
/* On Alpha the stack grows down. */ |
1689 |
#define _STACK_GROWS_DOWN 1 |
1690 |
|
1691 |
+/* Default to an executable stack. PF_X can be overridden if PT_GNU_STACK is |
1692 |
+ * present, but it is presumed absent. */ |
1693 |
+#define DEFAULT_STACK_PERMS (PF_R|PF_W|PF_X) |
1694 |
+ |
1695 |
#endif /* stackinfo.h */ |
1696 |
-- |
1697 |
1.7.4.1 |
1698 |
|
1699 |
|
1700 |
|
1701 |
|
1702 |
1.1 src/patchsets/glibc/2.14/ports/6030_all_alpha-glibc-2.13-hidden-libm.patch |
1703 |
|
1704 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6030_all_alpha-glibc-2.13-hidden-libm.patch?rev=1.1&view=markup |
1705 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6030_all_alpha-glibc-2.13-hidden-libm.patch?rev=1.1&content-type=text/plain |
1706 |
|
1707 |
Index: 6030_all_alpha-glibc-2.13-hidden-libm.patch |
1708 |
=================================================================== |
1709 |
taken from upstream ports git repo |
1710 |
|
1711 |
From a8505de8a46aa0e70928c4e8d8a68d948436da4f Mon Sep 17 00:00:00 2001 |
1712 |
From: Aurelien Jarno <aurelien@×××××××.net> |
1713 |
Date: Tue, 1 Mar 2011 10:04:15 +1000 |
1714 |
Subject: [PATCH] alpha: Add libm_hidden_def to feupdateenv and fetestexcept |
1715 |
|
1716 |
--- |
1717 |
sysdeps/alpha/fpu/feupdateenv.c | 1 + |
1718 |
sysdeps/alpha/fpu/ftestexcept.c | 1 + |
1719 |
2 files changed, 2 insertions(+), 0 deletions(-) |
1720 |
|
1721 |
diff --git a/sysdeps/alpha/fpu/feupdateenv.c b/sysdeps/alpha/fpu/feupdateenv.c |
1722 |
index c798070..7fc3816 100644 |
1723 |
--- ports/sysdeps/alpha/fpu/feupdateenv.c |
1724 |
+++ ports/sysdeps/alpha/fpu/feupdateenv.c |
1725 |
@@ -46,4 +46,5 @@ strong_alias (__feupdateenv, __old_feupdateenv) |
1726 |
compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1); |
1727 |
#endif |
1728 |
|
1729 |
+libm_hidden_ver (__feupdateenv, feupdateenv) |
1730 |
versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2); |
1731 |
diff --git a/sysdeps/alpha/fpu/ftestexcept.c b/sysdeps/alpha/fpu/ftestexcept.c |
1732 |
index a4b3081..34d8113 100644 |
1733 |
--- ports/sysdeps/alpha/fpu/ftestexcept.c |
1734 |
+++ ports/sysdeps/alpha/fpu/ftestexcept.c |
1735 |
@@ -30,3 +30,4 @@ fetestexcept (int excepts) |
1736 |
|
1737 |
return tmp & excepts & SWCR_STATUS_MASK; |
1738 |
} |
1739 |
+libm_hidden_def (fetestexcept) |
1740 |
-- |
1741 |
1.7.4.1 |
1742 |
|
1743 |
|
1744 |
|
1745 |
|
1746 |
1.1 src/patchsets/glibc/2.14/ports/6031_all_alpha-glibc-2.12-epoll_create1.patch |
1747 |
|
1748 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6031_all_alpha-glibc-2.12-epoll_create1.patch?rev=1.1&view=markup |
1749 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6031_all_alpha-glibc-2.12-epoll_create1.patch?rev=1.1&content-type=text/plain |
1750 |
|
1751 |
Index: 6031_all_alpha-glibc-2.12-epoll_create1.patch |
1752 |
=================================================================== |
1753 |
https://bugs.gentoo.org/331639 |
1754 |
|
1755 |
From 3fe89ea4365a2294f56ddba91f3a84086fd15d42 Mon Sep 17 00:00:00 2001 |
1756 |
From: Mike Frysinger <vapier@g.o> |
1757 |
Date: Tue, 31 Aug 2010 16:06:02 -0400 |
1758 |
Subject: [PATCH] linux/alpha: convert from epoll_create2 to epoll_create1 |
1759 |
|
1760 |
Alpha's epoll.h was missed when epoll_create2 was changed to epoll_create1. |
1761 |
|
1762 |
Signed-off-by: Mike Frysinger <vapier@g.o> |
1763 |
|
1764 |
2010-08-31 Mike Frysinger <vapier@g.o> |
1765 |
|
1766 |
* sysdeps/unix/sysv/linux/alpha/sys/epoll.h (epoll_create2): Delete. |
1767 |
(epoll_create1): Add. |
1768 |
--- |
1769 |
sysdeps/unix/sysv/linux/alpha/sys/epoll.h | 9 +++++---- |
1770 |
1 files changed, 5 insertions(+), 4 deletions(-) |
1771 |
|
1772 |
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/epoll.h b/sysdeps/unix/sysv/linux/alpha/sys/epoll.h |
1773 |
index 9f983a5..9177c31 100644 |
1774 |
--- ports/sysdeps/unix/sysv/linux/alpha/sys/epoll.h |
1775 |
+++ ports/sysdeps/unix/sysv/linux/alpha/sys/epoll.h |
1776 |
@@ -31,7 +31,7 @@ typedef __sigset_t sigset_t; |
1777 |
#endif |
1778 |
|
1779 |
|
1780 |
-/* Flags to be passed to epoll_create2. */ |
1781 |
+/* Flags to be passed to epoll_create1. */ |
1782 |
enum |
1783 |
{ |
1784 |
EPOLL_CLOEXEC = 010000000, |
1785 |
@@ -101,8 +101,9 @@ __BEGIN_DECLS |
1786 |
returned by epoll_create() should be closed with close(). */ |
1787 |
extern int epoll_create (int __size) __THROW; |
1788 |
|
1789 |
-/* Same as epoll_create but with an additional FLAGS parameter. */ |
1790 |
-extern int epoll_create2 (int __size, int __flags) __THROW; |
1791 |
+/* Same as epoll_create but with an FLAGS parameter. The unused SIZE |
1792 |
+ parameter has been dropped. */ |
1793 |
+extern int epoll_create1 (int __flags) __THROW; |
1794 |
|
1795 |
|
1796 |
/* Manipulate an epoll instance "epfd". Returns 0 in case of success, |
1797 |
-- |
1798 |
1.7.2 |
1799 |
|
1800 |
|
1801 |
|
1802 |
|
1803 |
1.1 src/patchsets/glibc/2.14/ports/6032_all_alpha-syscall-6.patch |
1804 |
|
1805 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6032_all_alpha-syscall-6.patch?rev=1.1&view=markup |
1806 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6032_all_alpha-syscall-6.patch?rev=1.1&content-type=text/plain |
1807 |
|
1808 |
Index: 6032_all_alpha-syscall-6.patch |
1809 |
=================================================================== |
1810 |
http://sourceware.org/bugzilla/show_bug.cgi?id=11677 |
1811 |
|
1812 |
2009-05-31 Mike Hommey <mh+reportbug@××××××××.org> |
1813 |
|
1814 |
* sysdeps/unix/sysv/linux/alpha/syscall.S: add support for 6th |
1815 |
argument. |
1816 |
|
1817 |
--- ports/sysdeps/unix/sysv/linux/alpha/syscall.S |
1818 |
+++ ports/sysdeps/unix/sysv/linux/alpha/syscall.S |
1819 |
@@ -31,13 +31,13 @@ |
1820 |
* |
1821 |
* Usage: |
1822 |
* |
1823 |
- * long syscall(syscall_number, arg1, arg2, arg3, arg4, arg5) |
1824 |
+ * long syscall(syscall_number, arg1, arg2, arg3, arg4, arg5, arg6) |
1825 |
* |
1826 |
* syscall_number = the index of the system call we're invoking |
1827 |
- * arg1-arg5 = up to 5 integer arguments to the system call |
1828 |
+ * arg1-arg6 = up to 6 integer arguments to the system call |
1829 |
* |
1830 |
* We need to do some arg shifting: the kernel expects the |
1831 |
- * syscall number in v0 and the first five args in a0-a4. |
1832 |
+ * syscall number in v0 and the first six args in a0-a5. |
1833 |
* |
1834 |
*/ |
1835 |
|
1836 |
@@ -60,6 +60,7 @@ |
1837 |
mov a3, a2 |
1838 |
mov a4, a3 |
1839 |
mov a5, a4 |
1840 |
+ ldq a5,0(sp) /* arg6 -> a5 */ |
1841 |
|
1842 |
call_pal PAL_callsys /* Invoke system call */ |
1843 |
bne a3, $error |
1844 |
|
1845 |
|
1846 |
|
1847 |
1.1 src/patchsets/glibc/2.14/ports/6220_all_glibc-2.4-arm-cirrus-ep93xx-maverick-crunch-fpu.patch |
1848 |
|
1849 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6220_all_glibc-2.4-arm-cirrus-ep93xx-maverick-crunch-fpu.patch?rev=1.1&view=markup |
1850 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6220_all_glibc-2.4-arm-cirrus-ep93xx-maverick-crunch-fpu.patch?rev=1.1&content-type=text/plain |
1851 |
|
1852 |
Index: 6220_all_glibc-2.4-arm-cirrus-ep93xx-maverick-crunch-fpu.patch |
1853 |
=================================================================== |
1854 |
http://yann.poupet.free.fr/ep93xx/ |
1855 |
Add support for the Maverick Crunch FPU on Cirrus EP93XX processor series |
1856 |
|
1857 |
--- ports/sysdeps/arm/bits/endian.h |
1858 |
+++ ports/sysdeps/arm/bits/endian.h |
1859 |
@@ -12,7 +12,7 @@ |
1860 |
/* FPA floating point units are always big-endian, irrespective of the |
1861 |
CPU endianness. VFP floating point units use the same endianness |
1862 |
as the rest of the system. */ |
1863 |
-#ifdef __VFP_FP__ |
1864 |
+#if defined __VFP_FP__ || defined __MAVERICK__ |
1865 |
#define __FLOAT_WORD_ORDER __BYTE_ORDER |
1866 |
#else |
1867 |
#define __FLOAT_WORD_ORDER __BIG_ENDIAN |
1868 |
--- ports/sysdeps/arm/fpu/bits/fenv.h |
1869 |
+++ ports/sysdeps/arm/fpu/bits/fenv.h |
1870 |
@@ -20,6 +20,45 @@ |
1871 |
# error "Never use <bits/fenv.h> directly; include <fenv.h> instead." |
1872 |
#endif |
1873 |
|
1874 |
+#if defined(__MAVERICK__) |
1875 |
+ |
1876 |
+/* Define bits representing exceptions in the FPU status word. */ |
1877 |
+enum |
1878 |
+ { |
1879 |
+ FE_INVALID = 1, |
1880 |
+#define FE_INVALID FE_INVALID |
1881 |
+ FE_OVERFLOW = 4, |
1882 |
+#define FE_OVERFLOW FE_OVERFLOW |
1883 |
+ FE_UNDERFLOW = 8, |
1884 |
+#define FE_UNDERFLOW FE_UNDERFLOW |
1885 |
+ FE_INEXACT = 16, |
1886 |
+#define FE_INEXACT FE_INEXACT |
1887 |
+ }; |
1888 |
+ |
1889 |
+/* Amount to shift by to convert an exception to a mask bit. */ |
1890 |
+#define FE_EXCEPT_SHIFT 5 |
1891 |
+ |
1892 |
+/* All supported exceptions. */ |
1893 |
+#define FE_ALL_EXCEPT \ |
1894 |
+ (FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT) |
1895 |
+ |
1896 |
+/* IEEE rounding modes. */ |
1897 |
+enum |
1898 |
+ { |
1899 |
+ FE_TONEAREST = 0, |
1900 |
+#define FE_TONEAREST FE_TONEAREST |
1901 |
+ FE_TOWARDZERO = 0x400, |
1902 |
+#define FE_TOWARDZERO FE_TOWARDZERO |
1903 |
+ FE_DOWNWARD = 0x800, |
1904 |
+#define FE_DOWNWARD FE_DOWNWARD |
1905 |
+ FE_UPWARD = 0xc00, |
1906 |
+#define FE_UPWARD FE_UPWARD |
1907 |
+ }; |
1908 |
+ |
1909 |
+#define FE_ROUND_MASK (FE_UPWARD) |
1910 |
+ |
1911 |
+#else /* FPA */ |
1912 |
+ |
1913 |
/* Define bits representing exceptions in the FPU status word. */ |
1914 |
enum |
1915 |
{ |
1916 |
@@ -44,6 +83,8 @@ |
1917 |
modes exist, but you have to encode them in the actual instruction. */ |
1918 |
#define FE_TONEAREST 0 |
1919 |
|
1920 |
+#endif |
1921 |
+ |
1922 |
/* Type representing exception flags. */ |
1923 |
typedef unsigned long int fexcept_t; |
1924 |
|
1925 |
--- ports/sysdeps/arm/fpu/bits/setjmp.h |
1926 |
+++ ports/sysdeps/arm/fpu/bits/setjmp.h |
1927 |
@@ -28,7 +28,11 @@ |
1928 |
#ifndef _ASM |
1929 |
/* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not |
1930 |
saved. */ |
1931 |
+#ifdef __MAVERICK__ |
1932 |
+typedef int __jmp_buf[34]; |
1933 |
+#else |
1934 |
typedef int __jmp_buf[22]; |
1935 |
#endif |
1936 |
+#endif |
1937 |
|
1938 |
#endif |
1939 |
--- ports/sysdeps/arm/fpu/jmpbuf-offsets.h |
1940 |
+++ ports/sysdeps/arm/fpu/jmpbuf-offsets.h |
1941 |
@@ -17,4 +17,8 @@ |
1942 |
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
1943 |
02111-1307 USA. */ |
1944 |
|
1945 |
+#ifdef __MAVERICK__ |
1946 |
+#define __JMP_BUF_SP 32 |
1947 |
+#else |
1948 |
#define __JMP_BUF_SP 20 |
1949 |
+#endif |
1950 |
--- ports/sysdeps/arm/fpu/fegetround.c |
1951 |
+++ ports/sysdeps/arm/fpu/fegetround.c |
1952 |
@@ -18,9 +18,21 @@ |
1953 |
02111-1307 USA. */ |
1954 |
|
1955 |
#include <fenv.h> |
1956 |
+#include <fpu_control.h> |
1957 |
|
1958 |
int |
1959 |
fegetround (void) |
1960 |
{ |
1961 |
+#if defined(__MAVERICK__) |
1962 |
+ |
1963 |
+ unsigned long temp; |
1964 |
+ |
1965 |
+ _FPU_GETCW (temp); |
1966 |
+ return temp & FE_ROUND_MASK; |
1967 |
+ |
1968 |
+#else /* FPA */ |
1969 |
+ |
1970 |
return FE_TONEAREST; /* Easy. :-) */ |
1971 |
+ |
1972 |
+#endif |
1973 |
} |
1974 |
--- ports/sysdeps/arm/fpu/fesetround.c |
1975 |
+++ ports/sysdeps/arm/fpu/fesetround.c |
1976 |
@@ -18,12 +18,28 @@ |
1977 |
02111-1307 USA. */ |
1978 |
|
1979 |
#include <fenv.h> |
1980 |
+#include <fpu_control.h> |
1981 |
|
1982 |
int |
1983 |
fesetround (int round) |
1984 |
{ |
1985 |
+#if defined(__MAVERICK__) |
1986 |
+ unsigned long temp; |
1987 |
+ |
1988 |
+ if (round & ~FE_ROUND_MASK) |
1989 |
+ return 1; |
1990 |
+ |
1991 |
+ _FPU_GETCW (temp); |
1992 |
+ temp = (temp & ~FE_ROUND_MASK) | round; |
1993 |
+ _FPU_SETCW (temp); |
1994 |
+ return 0; |
1995 |
+ |
1996 |
+#else /* FPA */ |
1997 |
+ |
1998 |
/* We only support FE_TONEAREST, so there is no need for any work. */ |
1999 |
return (round == FE_TONEAREST)?0:1; |
2000 |
+ |
2001 |
+#endif |
2002 |
} |
2003 |
|
2004 |
libm_hidden_def (fesetround) |
2005 |
--- ports/sysdeps/arm/fpu/fpu_control.h |
2006 |
+++ ports/sysdeps/arm/fpu/fpu_control.h |
2007 |
@@ -1,5 +1,6 @@ |
2008 |
/* FPU control word definitions. ARM version. |
2009 |
- Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc. |
2010 |
+ Copyright (C) 1996, 1997, 1998, 2000, 2005 |
2011 |
+ Free Software Foundation, Inc. |
2012 |
This file is part of the GNU C Library. |
2013 |
|
2014 |
The GNU C Library is free software; you can redistribute it and/or |
2015 |
@@ -20,6 +21,79 @@ |
2016 |
#ifndef _FPU_CONTROL_H |
2017 |
#define _FPU_CONTROL_H |
2018 |
|
2019 |
+#if defined(__MAVERICK__) |
2020 |
+ |
2021 |
+/* DSPSC register: (from EP9312 User's Guide) |
2022 |
+ * |
2023 |
+ * bits 31..29 - DAID |
2024 |
+ * bits 28..26 - HVID |
2025 |
+ * bits 25..24 - RSVD |
2026 |
+ * bit 23 - ISAT |
2027 |
+ * bit 22 - UI |
2028 |
+ * bit 21 - INT |
2029 |
+ * bit 20 - AEXC |
2030 |
+ * bits 19..18 - SAT |
2031 |
+ * bits 17..16 - FCC |
2032 |
+ * bit 15 - V |
2033 |
+ * bit 14 - FWDEN |
2034 |
+ * bit 13 - Invalid |
2035 |
+ * bit 12 - Denorm |
2036 |
+ * bits 11..10 - RM |
2037 |
+ * bits 9..5 - IXE, UFE, OFE, RSVD, IOE |
2038 |
+ * bits 4..0 - IX, UF, OF, RSVD, IO |
2039 |
+ */ |
2040 |
+ |
2041 |
+/* masking of interrupts */ |
2042 |
+#define _FPU_MASK_IM (1 << 5) /* invalid operation */ |
2043 |
+#define _FPU_MASK_ZM 0 /* divide by zero */ |
2044 |
+#define _FPU_MASK_OM (1 << 7) /* overflow */ |
2045 |
+#define _FPU_MASK_UM (1 << 8) /* underflow */ |
2046 |
+#define _FPU_MASK_PM (1 << 9) /* inexact */ |
2047 |
+#define _FPU_MASK_DM 0 /* denormalized operation */ |
2048 |
+ |
2049 |
+#define _FPU_RESERVED 0xfffff000 /* These bits are reserved. */ |
2050 |
+ |
2051 |
+#define _FPU_DEFAULT 0x00b00000 /* Default value. */ |
2052 |
+#define _FPU_IEEE 0x00b003a0 /* Default + exceptions enabled. */ |
2053 |
+ |
2054 |
+/* Type of the control word. */ |
2055 |
+typedef unsigned int fpu_control_t; |
2056 |
+ |
2057 |
+/* Macros for accessing the hardware control word. */ |
2058 |
+#define _FPU_GETCW(cw) ({ \ |
2059 |
+ register int __t1, __t2; \ |
2060 |
+ \ |
2061 |
+ __asm__ volatile ( \ |
2062 |
+ "cfmvr64l %1, mvdx0\n\t" \ |
2063 |
+ "cfmvr64h %2, mvdx0\n\t" \ |
2064 |
+ "cfmv32sc mvdx0, dspsc\n\t" \ |
2065 |
+ "cfmvr64l %0, mvdx0\n\t" \ |
2066 |
+ "cfmv64lr mvdx0, %1\n\t" \ |
2067 |
+ "cfmv64hr mvdx0, %2" \ |
2068 |
+ : "=r" (cw), "=r" (__t1), "=r" (__t2) \ |
2069 |
+ ); \ |
2070 |
+}) |
2071 |
+ |
2072 |
+#define _FPU_SETCW(cw) ({ \ |
2073 |
+ register int __t0, __t1, __t2; \ |
2074 |
+ \ |
2075 |
+ __asm__ volatile ( \ |
2076 |
+ "cfmvr64l %1, mvdx0\n\t" \ |
2077 |
+ "cfmvr64h %2, mvdx0\n\t" \ |
2078 |
+ "cfmv64lr mvdx0, %0\n\t" \ |
2079 |
+ "cfmvsc32 dspsc, mvdx0\n\t" \ |
2080 |
+ "cfmv64lr mvdx0, %1\n\t" \ |
2081 |
+ "cfmv64hr mvdx0, %2" \ |
2082 |
+ : "=r" (__t0), "=r" (__t1), "=r" (__t2) \ |
2083 |
+ : "0" (cw) \ |
2084 |
+ ); \ |
2085 |
+}) |
2086 |
+ |
2087 |
+/* Default control word set at startup. */ |
2088 |
+extern fpu_control_t __fpu_control; |
2089 |
+ |
2090 |
+#else /* FPA */ |
2091 |
+ |
2092 |
/* We have a slight terminology confusion here. On the ARM, the register |
2093 |
* we're interested in is actually the FPU status word - the FPU control |
2094 |
* word is something different (which is implementation-defined and only |
2095 |
@@ -99,4 +173,6 @@ |
2096 |
/* Default control word set at startup. */ |
2097 |
extern fpu_control_t __fpu_control; |
2098 |
|
2099 |
+#endif |
2100 |
+ |
2101 |
#endif /* _FPU_CONTROL_H */ |
2102 |
--- ports/sysdeps/arm/fpu/__longjmp.S |
2103 |
+++ ports/sysdeps/arm/fpu/__longjmp.S |
2104 |
@@ -30,7 +30,33 @@ |
2105 |
movs r0, r1 /* get the return value in place */ |
2106 |
moveq r0, #1 /* can't let setjmp() return zero! */ |
2107 |
|
2108 |
+#ifdef __MAVERICK__ |
2109 |
+ cfldrd mvd4, [ip], #8 |
2110 |
+ nop |
2111 |
+ cfldrd mvd5, [ip], #8 |
2112 |
+ nop |
2113 |
+ cfldrd mvd6, [ip], #8 |
2114 |
+ nop |
2115 |
+ cfldrd mvd7, [ip], #8 |
2116 |
+ nop |
2117 |
+ cfldrd mvd8, [ip], #8 |
2118 |
+ nop |
2119 |
+ cfldrd mvd9, [ip], #8 |
2120 |
+ nop |
2121 |
+ cfldrd mvd10, [ip], #8 |
2122 |
+ nop |
2123 |
+ cfldrd mvd11, [ip], #8 |
2124 |
+ nop |
2125 |
+ cfldrd mvd12, [ip], #8 |
2126 |
+ nop |
2127 |
+ cfldrd mvd13, [ip], #8 |
2128 |
+ nop |
2129 |
+ cfldrd mvd14, [ip], #8 |
2130 |
+ nop |
2131 |
+ cfldrd mvd15, [ip], #8 |
2132 |
+#else |
2133 |
lfmfd f4, 4, [ip] ! /* load the floating point regs */ |
2134 |
+#endif |
2135 |
|
2136 |
LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc}) |
2137 |
END (__longjmp) |
2138 |
--- ports/sysdeps/arm/fpu/setjmp.S |
2139 |
+++ ports/sysdeps/arm/fpu/setjmp.S |
2140 |
@@ -24,11 +24,41 @@ |
2141 |
|
2142 |
ENTRY (__sigsetjmp) |
2143 |
/* Save registers */ |
2144 |
+#ifdef __MAVERICK__ |
2145 |
+ cfstrd mvd4, [r0], #8 |
2146 |
+ nop |
2147 |
+ cfstrd mvd5, [r0], #8 |
2148 |
+ nop |
2149 |
+ cfstrd mvd6, [r0], #8 |
2150 |
+ nop |
2151 |
+ cfstrd mvd7, [r0], #8 |
2152 |
+ nop |
2153 |
+ cfstrd mvd8, [r0], #8 |
2154 |
+ nop |
2155 |
+ cfstrd mvd9, [r0], #8 |
2156 |
+ nop |
2157 |
+ cfstrd mvd10, [r0], #8 |
2158 |
+ nop |
2159 |
+ cfstrd mvd11, [r0], #8 |
2160 |
+ nop |
2161 |
+ cfstrd mvd12, [r0], #8 |
2162 |
+ nop |
2163 |
+ cfstrd mvd13, [r0], #8 |
2164 |
+ nop |
2165 |
+ cfstrd mvd14, [r0], #8 |
2166 |
+ nop |
2167 |
+ cfstrd mvd15, [r0], #8 |
2168 |
+#else |
2169 |
sfmea f4, 4, [r0]! |
2170 |
+#endif |
2171 |
stmia r0, {v1-v6, sl, fp, sp, lr} |
2172 |
|
2173 |
/* Restore pointer to jmp_buf */ |
2174 |
+#ifdef __MAVERICK__ |
2175 |
+ sub r0, r0, #96 |
2176 |
+#else |
2177 |
sub r0, r0, #48 |
2178 |
+#endif |
2179 |
|
2180 |
/* Make a tail call to __sigjmp_save; it takes the same args. */ |
2181 |
B PLTJMP(C_SYMBOL_NAME(__sigjmp_save)) |
2182 |
--- ports/sysdeps/arm/gccframe.h |
2183 |
+++ ports/sysdeps/arm/gccframe.h |
2184 |
@@ -17,6 +17,10 @@ |
2185 |
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
2186 |
02111-1307 USA. */ |
2187 |
|
2188 |
+#ifdef __MAVERICK__ |
2189 |
+#define FIRST_PSEUDO_REGISTER 43 |
2190 |
+#else |
2191 |
#define FIRST_PSEUDO_REGISTER 27 |
2192 |
+#endif |
2193 |
|
2194 |
#include <sysdeps/generic/gccframe.h> |
2195 |
--- ports/sysdeps/arm/gmp-mparam.h |
2196 |
+++ ports/sysdeps/arm/gmp-mparam.h |
2197 |
@@ -29,7 +29,7 @@ |
2198 |
#if defined(__ARMEB__) |
2199 |
# define IEEE_DOUBLE_MIXED_ENDIAN 0 |
2200 |
# define IEEE_DOUBLE_BIG_ENDIAN 1 |
2201 |
-#elif defined(__VFP_FP__) |
2202 |
+#elif defined(__VFP_FP__) || defined(__MAVERICK__) |
2203 |
# define IEEE_DOUBLE_MIXED_ENDIAN 0 |
2204 |
# define IEEE_DOUBLE_BIG_ENDIAN 0 |
2205 |
#else |
2206 |
|
2207 |
|
2208 |
|
2209 |
1.1 src/patchsets/glibc/2.14/ports/6230_all_arm-glibc-hardened.patch |
2210 |
|
2211 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6230_all_arm-glibc-hardened.patch?rev=1.1&view=markup |
2212 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6230_all_arm-glibc-hardened.patch?rev=1.1&content-type=text/plain |
2213 |
|
2214 |
Index: 6230_all_arm-glibc-hardened.patch |
2215 |
=================================================================== |
2216 |
patch by David Lamparter to fix build errors for hardened/arm systems. |
2217 |
the logic in setjmp/__longjmp incorrectly tie to "PIC" to figure out |
2218 |
whether the code is going into a shared library when it should be using |
2219 |
"SHARED". otherwise, building static PIC code goes wrong. |
2220 |
|
2221 |
https://bugs.gentoo.org/336914 |
2222 |
|
2223 |
--- ports/sysdeps/arm/eabi/setjmp.S |
2224 |
+++ ports/sysdeps/arm/eabi/setjmp.S |
2225 |
@@ -37,7 +37,7 @@ |
2226 |
add a3, a3, a4 |
2227 |
ldr a3, [a3, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET] |
2228 |
#else |
2229 |
-#ifdef PIC |
2230 |
+#ifdef SHARED |
2231 |
ldr a3, 1f |
2232 |
ldr a4, Lrtld_global_ro |
2233 |
0: add a3, pc, a3 |
2234 |
@@ -84,7 +84,7 @@ |
2235 |
Lrtld_local_ro: |
2236 |
.long C_SYMBOL_NAME(_rtld_local_ro)(GOTOFF) |
2237 |
#else |
2238 |
-#ifdef PIC |
2239 |
+#ifdef SHARED |
2240 |
1: .long _GLOBAL_OFFSET_TABLE_ - 0b - 8 |
2241 |
Lrtld_global_ro: |
2242 |
.long C_SYMBOL_NAME(_rtld_global_ro)(GOT) |
2243 |
--- ports/sysdeps/arm/eabi/__longjmp.S |
2244 |
+++ ports/sysdeps/arm/eabi/__longjmp.S |
2245 |
@@ -43,7 +43,7 @@ |
2246 |
add a2, a2, a3 |
2247 |
ldr a2, [a2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET] |
2248 |
#else |
2249 |
-#ifdef PIC |
2250 |
+#ifdef SHARED |
2251 |
ldr a2, 1f |
2252 |
ldr a3, Lrtld_global_ro |
2253 |
0: add a2, pc, a2 |
2254 |
@@ -87,7 +87,7 @@ |
2255 |
Lrtld_local_ro: |
2256 |
.long C_SYMBOL_NAME(_rtld_local_ro)(GOTOFF) |
2257 |
#else |
2258 |
-#ifdef PIC |
2259 |
+#ifdef SHARED |
2260 |
1: .long _GLOBAL_OFFSET_TABLE_ - 0b - 8 |
2261 |
Lrtld_global_ro: |
2262 |
.long C_SYMBOL_NAME(_rtld_global_ro)(GOT) |
2263 |
|
2264 |
|
2265 |
|
2266 |
1.1 src/patchsets/glibc/2.14/ports/6240_all_glibc-2.8-nptl-lowlevellock.patch |
2267 |
|
2268 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6240_all_glibc-2.8-nptl-lowlevellock.patch?rev=1.1&view=markup |
2269 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6240_all_glibc-2.8-nptl-lowlevellock.patch?rev=1.1&content-type=text/plain |
2270 |
|
2271 |
Index: 6240_all_glibc-2.8-nptl-lowlevellock.patch |
2272 |
=================================================================== |
2273 |
fix build error on arm like on hppa: |
2274 |
|
2275 |
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../ |
2276 |
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 |
2277 |
_IN_libc=1 -DIS_IN_rtld=1 |
2278 |
In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21: |
2279 |
../nptl/sysdeps/unix/sysv/linux/lowlevellock.c: In function '__lll_lock_wait_private': |
2280 |
../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: warning: implicit declaration of function 'THREAD_GETMEM' |
2281 |
../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'THREAD_SELF' undeclared (first use in this function) |
2282 |
../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: (Each undeclared identifier is reported only once |
2283 |
../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: for each function it appears in.) |
2284 |
../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'header' undeclared (first use in this function) |
2285 |
|
2286 |
--- ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h |
2287 |
+++ ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h |
2288 |
@@ -25,6 +25,7 @@ |
2289 |
#include <atomic.h> |
2290 |
#include <sysdep.h> |
2291 |
#include <kernel-features.h> |
2292 |
+#include <tls.h> /* Need THREAD_*, and header.*. */ |
2293 |
|
2294 |
#define FUTEX_WAIT 0 |
2295 |
#define FUTEX_WAKE 1 |
2296 |
|
2297 |
|
2298 |
|
2299 |
1.1 src/patchsets/glibc/2.14/ports/6600_mips_librt-mips.patch |
2300 |
|
2301 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6600_mips_librt-mips.patch?rev=1.1&view=markup |
2302 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6600_mips_librt-mips.patch?rev=1.1&content-type=text/plain |
2303 |
|
2304 |
Index: 6600_mips_librt-mips.patch |
2305 |
=================================================================== |
2306 |
we kind of screwed ourselves into a corner by having the clock symbols |
2307 |
exported only with the glibc-2.0 version ... this patch fixes the |
2308 |
export so all new binaries built against librt will use the correct |
2309 |
glibc-2.2 symbol version |
2310 |
|
2311 |
one day, we'll just drop this on the floor (maybe after 2006.1) |
2312 |
|
2313 |
--- ports/sysdeps/unix/sysv/linux/mips/Versions |
2314 |
+++ ports/sysdeps/unix/sysv/linux/mips/Versions |
2315 |
@@ -34,3 +34,9 @@ |
2316 |
_test_and_set; |
2317 |
} |
2318 |
} |
2319 |
+librt { |
2320 |
+ GLIBC_2.0 { |
2321 |
+ # c* |
2322 |
+ clock_gettime; clock_settime; |
2323 |
+ } |
2324 |
+} |
2325 |
--- Versions.def |
2326 |
+++ Versions.def |
2327 |
@@ -90,6 +90,7 @@ |
2328 |
GLIBC_PRIVATE |
2329 |
} |
2330 |
librt { |
2331 |
+ GLIBC_2.0 |
2332 |
GLIBC_2.1 |
2333 |
GLIBC_2.2 |
2334 |
GLIBC_2.3 |
2335 |
--- sysdeps/unix/clock_gettime.c |
2336 |
+++ sysdeps/unix/clock_gettime.c |
2337 |
@@ -23,6 +23,7 @@ |
2338 |
#include <sys/time.h> |
2339 |
#include <libc-internal.h> |
2340 |
#include <ldsodefs.h> |
2341 |
+#include <shlib-compat.h> |
2342 |
|
2343 |
|
2344 |
#if HP_TIMING_AVAIL |
2345 |
@@ -90,7 +91,7 @@ |
2346 |
|
2347 |
/* Get current value of CLOCK and store it in TP. */ |
2348 |
int |
2349 |
-clock_gettime (clockid_t clock_id, struct timespec *tp) |
2350 |
+__clock_gettime (clockid_t clock_id, struct timespec *tp) |
2351 |
{ |
2352 |
int retval = -1; |
2353 |
struct timeval tv; |
2354 |
@@ -131,4 +132,10 @@ |
2355 |
|
2356 |
return retval; |
2357 |
} |
2358 |
-librt_hidden_def (clock_gettime) |
2359 |
+versioned_symbol (librt, __clock_gettime, clock_gettime, GLIBC_2_2); |
2360 |
+librt_hidden_ver (__clock_gettime, clock_gettime) |
2361 |
+ |
2362 |
+#if defined __mips__ && defined SHARED |
2363 |
+strong_alias (__clock_gettime, __mips_clock_gettime) |
2364 |
+compat_symbol (librt, __mips_clock_gettime, clock_gettime, GLIBC_2_0); |
2365 |
+#endif |
2366 |
--- sysdeps/unix/clock_settime.c |
2367 |
+++ sysdeps/unix/clock_settime.c |
2368 |
@@ -21,6 +21,7 @@ |
2369 |
#include <sys/time.h> |
2370 |
#include <libc-internal.h> |
2371 |
#include <ldsodefs.h> |
2372 |
+#include <shlib-compat.h> |
2373 |
|
2374 |
|
2375 |
#if HP_TIMING_AVAIL |
2376 |
@@ -38,7 +39,7 @@ |
2377 |
|
2378 |
/* Set CLOCK to value TP. */ |
2379 |
int |
2380 |
-clock_settime (clockid_t clock_id, const struct timespec *tp) |
2381 |
+__clock_settime (clockid_t clock_id, const struct timespec *tp) |
2382 |
{ |
2383 |
int retval; |
2384 |
|
2385 |
@@ -123,3 +124,9 @@ |
2386 |
|
2387 |
return retval; |
2388 |
} |
2389 |
+versioned_symbol (librt, __clock_settime, clock_settime, GLIBC_2_2); |
2390 |
+ |
2391 |
+#if defined __mips__ && defined SHARED |
2392 |
+strong_alias (__clock_settime, __mips_clock_settime) |
2393 |
+compat_symbol (librt, __mips_clock_settime, clock_settime, GLIBC_2_0); |
2394 |
+#endif |
2395 |
|
2396 |
|
2397 |
|
2398 |
1.1 src/patchsets/glibc/2.14/ports/6605_all_glibc-2.4-fpu-cw-mips.patch |
2399 |
|
2400 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6605_all_glibc-2.4-fpu-cw-mips.patch?rev=1.1&view=markup |
2401 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.14/ports/6605_all_glibc-2.4-fpu-cw-mips.patch?rev=1.1&content-type=text/plain |
2402 |
|
2403 |
Index: 6605_all_glibc-2.4-fpu-cw-mips.patch |
2404 |
=================================================================== |
2405 |
http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html |
2406 |
|
2407 |
--- ports/sysdeps/mips/fpu_control.h |
2408 |
+++ ports/sysdeps/mips/fpu_control.h |
2409 |
@@ -74,7 +74,7 @@ |
2410 |
#define _FPU_RC_UP 0x2 |
2411 |
#define _FPU_RC_DOWN 0x3 |
2412 |
|
2413 |
-#define _FPU_RESERVED 0xfe3c0000 /* Reserved bits in cw */ |
2414 |
+#define _FPU_RESERVED 0xfebc0000 /* Reserved bits in cw */ |
2415 |
|
2416 |
|
2417 |
/* The fdlibm code requires strict IEEE double precision arithmetic, |