Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in src/patchsets/glibc/2.7: 0010_all_glibc-2.7-ssp-compat.patch 0030_all_glibc-respect-env-CPPFLAGS.patch 1025_all_glibc-gcc-4.3-include-fixed.patch 1030_all_glibc-manual-no-perl.patch 1040_all_2.3.3-localedef-fix-trampoline.patch 1045_all_glibc-handle-long-kernel-versions.patch 1055_all_glibc-resolv-dynamic.patch 1075_all_glibc-section-comments.patch 1090_all_glibc-2.3.6-fix-pr631.patch 1100_all_glibc-2.3.3-china.patch 1103_all_glibc-new-valencian-locale.patch 1120_all_glibc-2.5-strict-aliasing.patch 1130_all_glibc-2.4-undefine-__i686.patch 1530_all_glibc-m68k-sys-user.patch 3000_all_2.3.6-dl_execstack-PaX-support.patch 3010_all_2.3.3_pre20040117-pt_pax.patch 3020_all_glibc-tests-sandbox-libdl-paths.patch 5063_all_glibc-dont-build-timezone.patch 5070_all_glibc-2.7-cross-compile-nptl.patch 6001_all_alpha-glibc-2.4-xstat.patch 6015_all_alpha-glibc-2.5-no-page-header.patch 6016_all_alpha-glibc-2.5-no-asm-elf-header.patch 6220_all_glibc-2! .4-arm-cirrus-ep93 xx-maverick-crunch-fpu.patch 6230_all_arm-glibc-2.5-no-page-header.patch 6400_all_sh-glibc-2.3.2-fpscr_values.patch 6415_all_sh-glibc-2.5-no-asm-user-header.patch 6416_all_sh-glibc-2.5-no-asm-elf-header.patch 6600_mips_librt-mips.patch 6605_all_glibc-2.4-fpu-cw-mips.patch 6645_all_glibc-mips_shn_undef-hack.patch 6650_all_glibc-mips_gnu-hash_support.patch README.history
Date: Mon, 22 Oct 2007 17:00:27
Message-Id: E1Ik0dU-0003iu-1Q@stork.gentoo.org
1 vapier 07/10/22 17:00:16
2
3 Added: 0010_all_glibc-2.7-ssp-compat.patch
4 0030_all_glibc-respect-env-CPPFLAGS.patch
5 1025_all_glibc-gcc-4.3-include-fixed.patch
6 1030_all_glibc-manual-no-perl.patch
7 1040_all_2.3.3-localedef-fix-trampoline.patch
8 1045_all_glibc-handle-long-kernel-versions.patch
9 1055_all_glibc-resolv-dynamic.patch
10 1075_all_glibc-section-comments.patch
11 1090_all_glibc-2.3.6-fix-pr631.patch
12 1100_all_glibc-2.3.3-china.patch
13 1103_all_glibc-new-valencian-locale.patch
14 1120_all_glibc-2.5-strict-aliasing.patch
15 1130_all_glibc-2.4-undefine-__i686.patch
16 1530_all_glibc-m68k-sys-user.patch
17 3000_all_2.3.6-dl_execstack-PaX-support.patch
18 3010_all_2.3.3_pre20040117-pt_pax.patch
19 3020_all_glibc-tests-sandbox-libdl-paths.patch
20 5063_all_glibc-dont-build-timezone.patch
21 5070_all_glibc-2.7-cross-compile-nptl.patch
22 6001_all_alpha-glibc-2.4-xstat.patch
23 6015_all_alpha-glibc-2.5-no-page-header.patch
24 6016_all_alpha-glibc-2.5-no-asm-elf-header.patch
25 6220_all_glibc-2.4-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
26 6230_all_arm-glibc-2.5-no-page-header.patch
27 6400_all_sh-glibc-2.3.2-fpscr_values.patch
28 6415_all_sh-glibc-2.5-no-asm-user-header.patch
29 6416_all_sh-glibc-2.5-no-asm-elf-header.patch
30 6600_mips_librt-mips.patch
31 6605_all_glibc-2.4-fpu-cw-mips.patch
32 6645_all_glibc-mips_shn_undef-hack.patch
33 6650_all_glibc-mips_gnu-hash_support.patch
34 README.history
35 Log:
36 initial 2.7 patchset based on last 2.6.1 patchset
37
38 Revision Changes Path
39 1.1 src/patchsets/glibc/2.7/0010_all_glibc-2.7-ssp-compat.patch
40
41 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/0010_all_glibc-2.7-ssp-compat.patch?rev=1.1&view=markup
42 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/0010_all_glibc-2.7-ssp-compat.patch?rev=1.1&content-type=text/plain
43
44 Index: 0010_all_glibc-2.7-ssp-compat.patch
45 ===================================================================
46 Add backwards compat support for gcc-3.x ssp ... older ssp versions
47 used __guard and __stack_smash_handler symbols while gcc-4.1 and newer
48 uses __stack_chk_guard and __stack_chk_fail.
49
50 --- glibc-2.7/config.h.in
51 +++ glibc-2.7/config.h.in
52 @@ -42,6 +42,9 @@
53 assembler instructions per line. Default is `;' */
54 #undef ASM_LINE_SEP
55
56 +/* Define if we want to enable support for old ssp symbols */
57 +#undef ENABLE_OLD_SSP_COMPAT
58 +
59 /* Define if not using ELF, but `.init' and `.fini' sections are available. */
60 #undef HAVE_INITFINI
61
62 --- glibc-2.7/configure
63 +++ glibc-2.7/configure
64 @@ -1378,6 +1378,9 @@ Optional Features:
65 --enable-kernel=VERSION compile for compatibility with kernel not older than
66 VERSION
67 --enable-all-warnings enable all useful warnings gcc can issue
68 + --disable-old-ssp-compat
69 + enable support for older ssp symbols
70 + [default=no]
71
72 Optional Packages:
73 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
74 @@ -6462,6 +6465,20 @@ fi
75 echo "${ECHO_T}$libc_cv_ssp" >&6; }
76
77
78 +# Check whether --enable-old-ssp-compat or --disable-old-ssp-compat was given.
79 +if test "${enable_old_ssp_compat+set}" = set; then
80 + enableval="$enable_old_ssp_compat"
81 + enable_old_ssp_compat=$enableval
82 +else
83 + enable_old_ssp_compat=no
84 +fi;
85 +if test "x$enable_old_ssp_compat" = "xyes"; then
86 + cat >>confdefs.h <<\_ACEOF
87 +#define ENABLE_OLD_SSP_COMPAT 1
88 +_ACEOF
89 +
90 +fi
91 +
92 { echo "$as_me:$LINENO: checking for -fgnu89-inline" >&5
93 echo $ECHO_N "checking for -fgnu89-inline... $ECHO_C" >&6; }
94 if test "${libc_cv_gnu89_inline+set}" = set; then
95 --- glibc-2.7/configure.in
96 +++ glibc-2.7/configure.in
97 @@ -1641,6 +1641,15 @@ fi
98 rm -f conftest*])
99 AC_SUBST(libc_cv_ssp)
100
101 +AC_ARG_ENABLE([old-ssp-compat],
102 + AC_HELP_STRING([--enable-old-ssp-compat],
103 + [enable support for older ssp symbols @<:@default=no@:>@]),
104 + [enable_old_ssp_compat=$enableval],
105 + [enable_old_ssp_compat=no])
106 +if test "x$enable_old_ssp_compat" = "xyes"; then
107 + AC_DEFINE(ENABLE_OLD_SSP_COMPAT)
108 +fi
109 +
110 AC_CACHE_CHECK(for -fgnu89-inline, libc_cv_gnu89_inline, [dnl
111 cat > conftest.c <<EOF
112 int foo;
113 --- glibc-2.7/csu/libc-start.c
114 +++ glibc-2.7/csu/libc-start.c
115 @@ -37,6 +37,10 @@ extern void __pthread_initialize_minimal
116 uintptr_t __stack_chk_guard attribute_relro;
117 # endif
118 #endif
119 +#ifdef ENABLE_OLD_SSP_COMPAT
120 +uintptr_t __guard_local attribute_relro attribute_hidden __attribute__ ((nocommon,weak));
121 +weak_alias (__guard_local, __guard);
122 +#endif
123
124 #ifdef HAVE_PTR_NTHREADS
125 /* We need atomic operations. */
126 @@ -141,6 +145,9 @@ LIBC_START_MAIN (int (*main) (int, char
127
128 /* Set up the stack checker's canary. */
129 uintptr_t stack_chk_guard = _dl_setup_stack_chk_guard ();
130 +#ifdef ENABLE_OLD_SSP_COMPAT
131 + __guard_local = stack_chk_guard;
132 +#endif
133 # ifdef THREAD_SET_STACK_GUARD
134 THREAD_SET_STACK_GUARD (stack_chk_guard);
135 # else
136 --- glibc-2.7/csu/Versions
137 +++ glibc-2.7/csu/Versions
138 @@ -17,6 +17,12 @@ libc {
139 # New special glibc functions.
140 gnu_get_libc_release; gnu_get_libc_version;
141 }
142 + GLIBC_2.3.2 {
143 +%ifdef ENABLE_OLD_SSP_COMPAT
144 + # global objects and functions for the old propolice patch in gcc
145 + __guard;
146 +%endif
147 + }
148 GLIBC_PRIVATE {
149 %if HAVE___THREAD
150 # This version is for the TLS symbol, GLIBC_2.0 is the old object symbol.
151 --- glibc-2.7/debug/stack_chk_fail.c
152 +++ glibc-2.7/debug/stack_chk_fail.c
153 @@ -28,3 +28,7 @@ __stack_chk_fail (void)
154 {
155 __fortify_fail ("stack smashing detected");
156 }
157 +
158 +#ifdef ENABLE_OLD_SSP_COMPAT
159 +strong_alias (__stack_chk_fail, __stack_smash_handler)
160 +#endif
161 --- glibc-2.7/debug/Versions
162 +++ glibc-2.7/debug/Versions
163 @@ -10,6 +10,12 @@ libc {
164 # These are to support some gcc features.
165 __cyg_profile_func_enter; __cyg_profile_func_exit;
166 }
167 +%ifdef ENABLE_OLD_SSP_COMPAT
168 + GLIBC_2.3.2 {
169 + # backwards ssp compat support; alias to __stack_chk_fail
170 + __stack_smash_handler;
171 + }
172 +%endif
173 GLIBC_2.3.4 {
174 __chk_fail;
175 __memcpy_chk; __memmove_chk; __mempcpy_chk; __memset_chk; __stpcpy_chk;
176 --- glibc-2.7/elf/rtld.c
177 +++ glibc-2.7/elf/rtld.c
178 @@ -89,6 +89,10 @@ INTDEF(_dl_argv)
179 in thread local area. */
180 uintptr_t __stack_chk_guard attribute_relro;
181 #endif
182 +#ifdef ENABLE_OLD_SSP_COMPAT
183 +uintptr_t __guard_local attribute_relro attribute_hidden __attribute__ ((nocommon));
184 +weak_alias (__guard_local, __guard);
185 +#endif
186
187 /* Only exported for architectures that don't store the pointer guard
188 value in thread local area. */
189 @@ -1817,6 +1821,9 @@ ERROR: ld.so: object '%s' cannot be load
190
191 /* Set up the stack checker's canary. */
192 uintptr_t stack_chk_guard = _dl_setup_stack_chk_guard ();
193 +#ifdef ENABLE_OLD_SSP_COMPAT
194 + __guard_local = stack_chk_guard;
195 +#endif
196 #ifdef THREAD_SET_STACK_GUARD
197 THREAD_SET_STACK_GUARD (stack_chk_guard);
198 #else
199 --- glibc-2.7/elf/Versions
200 +++ glibc-2.7/elf/Versions
201 @@ -43,6 +43,12 @@ ld {
202 # runtime interface to TLS
203 __tls_get_addr;
204 }
205 +%ifdef ENABLE_OLD_SSP_COMPAT
206 + GLIBC_2.3.2 {
207 + # backwards ssp compat support
208 + __guard;
209 + }
210 +%endif
211 GLIBC_2.4 {
212 # stack canary
213 __stack_chk_guard;
214 --- glibc-2.7/Versions.def
215 +++ glibc-2.7/Versions.def
216 @@ -109,6 +109,9 @@ ld {
217 GLIBC_2.0
218 GLIBC_2.1
219 GLIBC_2.3
220 +%ifdef ENABLE_OLD_SSP_COMPAT
221 + GLIBC_2.3.2
222 +%endif
223 GLIBC_2.4
224 GLIBC_PRIVATE
225 }
226
227
228
229 1.1 src/patchsets/glibc/2.7/0030_all_glibc-respect-env-CPPFLAGS.patch
230
231 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/0030_all_glibc-respect-env-CPPFLAGS.patch?rev=1.1&view=markup
232 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/0030_all_glibc-respect-env-CPPFLAGS.patch?rev=1.1&content-type=text/plain
233
234 Index: 0030_all_glibc-respect-env-CPPFLAGS.patch
235 ===================================================================
236 Respect environment CPPFLAGS when we run ./configure so we can inject
237 random -D things without having to set CFLAGS/ASFLAGS
238
239 --- libc/Makeconfig
240 +++ libc/Makeconfig
241 @@ -672,6 +672,7 @@ CPPFLAGS = $($(subdir)-CPPFLAGS) $(+incl
242 $(foreach lib,$(libof-$(basename $(@F))) \
243 $(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \
244 $(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F)))
245 +CPPFLAGS += $(CPPFLAGS-config)
246 override CFLAGS = -std=gnu99 $(gnu89-inline-CFLAGS) \
247 $(filter-out %frame-pointer,$(+cflags)) $(+gccwarn-c) \
248 $(sysdep-CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) \
249 --- libc/config.make.in
250 +++ libc/config.make.in
251 @@ -95,6 +95,7 @@ CC = @CC@
252 CXX = @CXX@
253 BUILD_CC = @BUILD_CC@
254 CFLAGS = @CFLAGS@
255 +CPPFLAGS-config = @CPPFLAGS@
256 ASFLAGS-config = @ASFLAGS_config@
257 AR = @AR@
258 RANLIB = @RANLIB@
259
260
261
262 1.1 src/patchsets/glibc/2.7/1025_all_glibc-gcc-4.3-include-fixed.patch
263
264 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1025_all_glibc-gcc-4.3-include-fixed.patch?rev=1.1&view=markup
265 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1025_all_glibc-gcc-4.3-include-fixed.patch?rev=1.1&content-type=text/plain
266
267 Index: 1025_all_glibc-gcc-4.3-include-fixed.patch
268 ===================================================================
269 http://bugs.gentoo.org/183358
270 http://sourceware.org/ml/libc-alpha/2007-03/msg00017.html
271
272 From: "Joseph S. Myers" <joseph at codesourcery dot com>
273 To: libc-alpha at sourceware dot org
274 Date: Sun, 18 Mar 2007 20:40:59 +0000 (UTC)
275 Subject: Support GCC 4.3's include-fixed directory
276
277 GCC trunk now has multiple internal headers directories, one
278 containing the self-contained GCC-provided headers and one containing
279 the <limits.h> (not self-contained but including libc's <limits.h> or
280 a fixed version thereof) and the fixed headers; more such directories
281 may be added in future.
282
283 When glibc uses -nostdinc, it needs to use -isystem options for all
284 these internal directories. This patch teaches it about the
285 include-fixed directory (and is harmless with old GCC versions without
286 that directory).
287
288 2007-03-18 Joseph Myers <joseph@××××××××××××.com>
289
290 * configure.in: Also pass -isystem option for GCC's include-fixed
291 directory.
292 * configure: Regenerate.
293
294 Index: configure.in
295 ===================================================================
296 RCS file: /cvs/glibc/libc/configure.in,v
297 retrieving revision 1.468
298 diff -u -r1.468 configure.in
299 --- configure.in 17 Mar 2007 17:01:46 -0000 1.468
300 +++ configure.in 18 Mar 2007 20:35:03 -0000
301 @@ -912,7 +912,7 @@
302 # thing on a system that doesn't need fixincludes. (Not presently a problem.)
303 if test -n "$sysheaders"; then
304 ccheaders=`$CC -print-file-name=include`
305 - SYSINCLUDES="-nostdinc -isystem $ccheaders \
306 + SYSINCLUDES="-nostdinc -isystem $ccheaders -isystem $ccheaders-fixed \
307 -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
308 if test -n "$CXX"; then
309 cxxversion=`$CXX -dumpversion 2>&AS_MESSAGE_LOG_FD` &&
310 --- configure 17 Mar 2007 17:01:46 -0000 1.468
311 +++ configure 18 Mar 2007 20:35:03 -0000
312 @@ -912,7 +912,7 @@
313 # thing on a system that doesn't need fixincludes. (Not presently a problem.)
314 if test -n "$sysheaders"; then
315 ccheaders=`$CC -print-file-name=include`
316 - SYSINCLUDES="-nostdinc -isystem $ccheaders \
317 + SYSINCLUDES="-nostdinc -isystem $ccheaders -isystem $ccheaders-fixed \
318 -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
319 if test -n "$CXX"; then
320 cxxversion=`$CXX -dumpversion 2>&AS_MESSAGE_LOG_FD` &&
321
322 --
323 Joseph S. Myers
324 joseph@××××××××××××.com
325
326
327
328 1.1 src/patchsets/glibc/2.7/1030_all_glibc-manual-no-perl.patch
329
330 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1030_all_glibc-manual-no-perl.patch?rev=1.1&view=markup
331 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1030_all_glibc-manual-no-perl.patch?rev=1.1&content-type=text/plain
332
333 Index: 1030_all_glibc-manual-no-perl.patch
334 ===================================================================
335 If we're using a cvs snapshot which updates the source files, and
336 perl isn't installed yet, then we can't regen the docs. Not a big
337 deal, so just whine a little and continue on our merry way.
338
339 http://bugs.gentoo.org/60132
340
341 --- libc/manual/Makefile
342 +++ libc/manual/Makefile
343 @@ -104,9 +104,14 @@
344 libm-err.texi: stamp-libm-err
345 stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\
346 $(dir)/libm-test-ulps))
347 +ifneq ($(PERL),no)
348 pwd=`pwd`; \
349 $(PERL) $< $$pwd/.. > libm-err-tmp
350 $(move-if-change) libm-err-tmp libm-err.texi
351 +else
352 + echo "Unable to rebuild math docs, no perl installed"
353 + touch libm-err.texi
354 +endif
355 touch $@
356
357 # Generate Texinfo files from the C source for the example programs.
358
359
360
361 1.1 src/patchsets/glibc/2.7/1040_all_2.3.3-localedef-fix-trampoline.patch
362
363 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1040_all_2.3.3-localedef-fix-trampoline.patch?rev=1.1&view=markup
364 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1040_all_2.3.3-localedef-fix-trampoline.patch?rev=1.1&content-type=text/plain
365
366 Index: 1040_all_2.3.3-localedef-fix-trampoline.patch
367 ===================================================================
368 #! /bin/sh -e
369
370 # DP: Description: Fix localedef segfault when run under exec-shield,
371 # PaX or similar. (#231438, #198099)
372 # DP: Dpatch Author: James Troup <james@××××××.org>
373 # DP: Patch Author: (probably) Jakub Jelinek <jakub@××××××.com>
374 # DP: Upstream status: Unknown
375 # DP: Status Details: Unknown
376 # DP: Date: 2004-03-16
377
378 if [ $# -ne 2 ]; then
379 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
380 exit 1
381 fi
382 case "$1" in
383 -patch) patch -d "$2" -f --no-backup-if-mismatch -p1 < $0;;
384 -unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p1 < $0;;
385 *)
386 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
387 exit 1
388 esac
389 exit 0
390
391 --- glibc-2.3.3-net/locale/programs/3level.h 16 Jun 2003 07:19:09 -0000 1.1.1.5
392 +++ glibc-2.3.3-redhat/locale/programs/3level.h 16 Jun 2003 09:32:40 -0000 1.4
393 @@ -204,6 +204,42 @@ CONCAT(TABLE,_iterate) (struct TABLE *t,
394 }
395 }
396 }
397 +
398 +/* GCC ATM seems to do a poor job with pointers to nested functions passed
399 + to inlined functions. Help it a little bit with this hack. */
400 +#define wchead_table_iterate(tp, fn) \
401 +do \
402 + { \
403 + struct wchead_table *t = (tp); \
404 + uint32_t index1; \
405 + for (index1 = 0; index1 < t->level1_size; index1++) \
406 + { \
407 + uint32_t lookup1 = t->level1[index1]; \
408 + if (lookup1 != ((uint32_t) ~0)) \
409 + { \
410 + uint32_t lookup1_shifted = lookup1 << t->q; \
411 + uint32_t index2; \
412 + for (index2 = 0; index2 < (1 << t->q); index2++) \
413 + { \
414 + uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \
415 + if (lookup2 != ((uint32_t) ~0)) \
416 + { \
417 + uint32_t lookup2_shifted = lookup2 << t->p; \
418 + uint32_t index3; \
419 + for (index3 = 0; index3 < (1 << t->p); index3++) \
420 + { \
421 + struct element_t *lookup3 \
422 + = t->level3[index3 + lookup2_shifted]; \
423 + if (lookup3 != NULL) \
424 + fn ((((index1 << t->q) + index2) << t->p) + index3, \
425 + lookup3); \
426 + } \
427 + } \
428 + } \
429 + } \
430 + } \
431 + } while (0)
432 +
433 #endif
434
435 #ifndef NO_FINALIZE
436
437
438
439 1.1 src/patchsets/glibc/2.7/1045_all_glibc-handle-long-kernel-versions.patch
440
441 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1045_all_glibc-handle-long-kernel-versions.patch?rev=1.1&view=markup
442 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1045_all_glibc-handle-long-kernel-versions.patch?rev=1.1&content-type=text/plain
443
444 Index: 1045_all_glibc-handle-long-kernel-versions.patch
445 ===================================================================
446 http://sourceware.org/ml/libc-alpha/2007-07/msg00023.html
447
448 2007-07-07 Mike Frysinger <vapier@g.o>
449
450 * sysdeps/unix/sysv/linux/dl-osinfo.h (_dl_discover_osversion): Break
451 after reading the first 3 parts of the kernel version.
452
453 --- libc/sysdeps/unix/sysv/linux/dl-osinfo.h
454 +++ libc/sysdeps/unix/sysv/linux/dl-osinfo.h
455 @@ -112,7 +112,7 @@ _dl_discover_osversion (void)
456 version = 0;
457 parts = 0;
458 cp = buf;
459 - while ((*cp >= '0') && (*cp <= '9'))
460 + while ((*cp >= '0') && (*cp <= '9') && parts < 3)
461 {
462 unsigned int here = *cp++ - '0';
463
464
465
466
467 1.1 src/patchsets/glibc/2.7/1055_all_glibc-resolv-dynamic.patch
468
469 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1055_all_glibc-resolv-dynamic.patch?rev=1.1&view=markup
470 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1055_all_glibc-resolv-dynamic.patch?rev=1.1&content-type=text/plain
471
472 Index: 1055_all_glibc-resolv-dynamic.patch
473 ===================================================================
474 ripped from SuSE
475
476 if /etc/resolv.conf is updated, then make sure applications
477 already running get the updated information.
478
479 http://bugs.gentoo.org/177416
480
481 --- libc/resolv/res_libc.c
482 +++ libc/resolv/res_libc.c
483 @@ -22,6 +22,7 @@
484 #include <arpa/nameser.h>
485 #include <resolv.h>
486 #include <bits/libc-lock.h>
487 +#include <sys/stat.h>
488
489
490 /* The following bit is copied from res_data.c (where it is #ifdef'ed
491 @@ -101,6 +102,20 @@
492 __res_maybe_init (res_state resp, int preinit)
493 {
494 if (resp->options & RES_INIT) {
495 + static time_t last_mtime, last_check;
496 + time_t now;
497 + struct stat statbuf;
498 +
499 + time (&now);
500 + if (now != last_check) {
501 + last_check = now;
502 + if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) {
503 + last_mtime = statbuf.st_mtime;
504 + atomicinclock (lock);
505 + atomicinc (__res_initstamp);
506 + atomicincunlock (lock);
507 + }
508 + }
509 if (__res_initstamp != resp->_u._ext.initstamp) {
510 if (resp->nscount > 0) {
511 __res_nclose (resp);
512
513
514
515 1.1 src/patchsets/glibc/2.7/1075_all_glibc-section-comments.patch
516
517 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1075_all_glibc-section-comments.patch?rev=1.1&view=markup
518 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1075_all_glibc-section-comments.patch?rev=1.1&content-type=text/plain
519
520 Index: 1075_all_glibc-section-comments.patch
521 ===================================================================
522 http://sources.redhat.com/ml/binutils/2004-04/msg00665.html
523
524 fixes building on some architectures (like m68k/arm/cris/etc...) because
525 it does the right thing
526
527 --- libc/include/libc-symbols.h
528 +++ libc/include/libc-symbols.h
529 @@ -232,12 +232,12 @@
530 # define __make_section_unallocated(section_string)
531 # endif
532
533 -/* Tacking on "\n\t#" to the section name makes gcc put it's bogus
534 +/* Tacking on "\n#APP\n\t#" to the section name makes gcc put it's bogus
535 section attributes on what looks like a comment to the assembler. */
536 # ifdef HAVE_SECTION_QUOTES
537 -# define __sec_comment "\"\n\t#\""
538 +# define __sec_comment "\"\n#APP\n\t#\""
539 # else
540 -# define __sec_comment "\n\t#"
541 +# define __sec_comment "\n#APP\n\t#"
542 # endif
543 # define link_warning(symbol, msg) \
544 __make_section_unallocated (".gnu.warning." #symbol) \
545
546
547
548 1.1 src/patchsets/glibc/2.7/1090_all_glibc-2.3.6-fix-pr631.patch
549
550 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1090_all_glibc-2.3.6-fix-pr631.patch?rev=1.1&view=markup
551 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1090_all_glibc-2.3.6-fix-pr631.patch?rev=1.1&content-type=text/plain
552
553 Index: 1090_all_glibc-2.3.6-fix-pr631.patch
554 ===================================================================
555 >From dank@×××××.com
556 Wed Jun 15 09:12:43 PDT 2005
557
558 Fixes
559
560 build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
561 build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
562 ... 53 lines deleted ...
563 build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
564 collect2: ld returned 1 exit status
565 make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1
566
567 when building glibc with --enable-static-nss.
568
569 See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
570
571 --- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005
572 +++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005
573 @@ -487,7 +487,7 @@
574
575 # The static libraries.
576 ifeq (yes,$(build-static))
577 -link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
578 +link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
579 else
580 ifeq (yes,$(build-shared))
581 # We can try to link the programs with lib*_pic.a...
582 --- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005
583 +++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005
584 @@ -115,6 +115,13 @@
585 install-bin-script = ldd
586 endif
587
588 +ifeq (yes,$(build-static-nss))
589 +nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
590 +resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
591 +otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
592 + $(resolvobjdir)/libresolv.a
593 +endif
594 +
595 others = sprof sln
596 install-bin = sprof
597 others-static = sln
598
599 Signed-off-by: Robert P. J. Day <rpjday@××××××××××.com>
600
601
602
603 1.1 src/patchsets/glibc/2.7/1100_all_glibc-2.3.3-china.patch
604
605 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1100_all_glibc-2.3.3-china.patch?rev=1.1&view=markup
606 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1100_all_glibc-2.3.3-china.patch?rev=1.1&content-type=text/plain
607
608 Index: 1100_all_glibc-2.3.3-china.patch
609 ===================================================================
610 --- localedata/locales/zh_TW
611 +++ localedata/locales/zh_TW
612 @@ -1,7 +1,7 @@
613 comment_char %
614 escape_char /
615 %
616 -% Chinese language locale for Taiwan R.O.C.
617 +% Chinese language locale for Taiwan
618 % charmap: BIG5-CP950
619 %
620 % Original Author:
621 @@ -17,7 +17,7 @@
622 % Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf
623
624 LC_IDENTIFICATION
625 -title "Chinese locale for Taiwan R.O.C."
626 +title "Chinese locale for Taiwan"
627 source ""
628 address ""
629 contact ""
630 @@ -25,7 +25,7 @@
631 tel ""
632 fax ""
633 language "Chinese"
634 -territory "Taiwan R.O.C."
635 +territory "Taiwan"
636 revision "0.2"
637 date "2000-08-02"
638 %
639
640
641
642 1.1 src/patchsets/glibc/2.7/1103_all_glibc-new-valencian-locale.patch
643
644 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1103_all_glibc-new-valencian-locale.patch?rev=1.1&view=markup
645 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1103_all_glibc-new-valencian-locale.patch?rev=1.1&content-type=text/plain
646
647 Index: 1103_all_glibc-new-valencian-locale.patch
648 ===================================================================
649 http://bugs.gentoo.org/show_bug.cgi?id=131815
650 http://sourceware.org/bugzilla/show_bug.cgi?id=2522
651
652 --- localedata/SUPPORTED
653 +++ localedata/SUPPORTED
654 @@ -68,6 +68,8 @@
655 ca_ES.UTF-8/UTF-8 \
656 ca_ES/ISO-8859-1 \
657 ca_ES@euro/ISO-8859-15 \
658 +ca_ES.UTF-8@valencia/UTF-8 \
659 +ca_ES@valencia/ISO-8859-15 \
660 ca_FR.UTF-8/UTF-8 \
661 ca_FR/ISO-8859-15 \
662 ca_IT.UTF-8/UTF-8 \
663 --- localedata/locales/ca_ES@valencia
664 +++ localedata/locales/ca_ES@valencia
665 @@ -0,0 +1,96 @@
666 +comment_char %
667 +escape_char /
668 +%
669 +% Valencian (southern Catalan) locale for Spain with Euro
670 +%
671 +% Note that this locale is almost the same as ca_ES@euro. The point of having
672 +% a separate locale is only for PO translations, which have a lot of social
673 +% support and are very appreciated by the Valencian-speaking community.
674 +%
675 +% Contact: Jordi Mallach
676 +% Email: jordi@×××.org
677 +% Tel:
678 +% Fax:
679 +% Language: ca
680 +% Territory: ES
681 +% Option: euro
682 +% Revision: 1.0
683 +% Date: 2006-04-06
684 +% Application: general
685 +% Users: general
686 +% Repertoiremap: mnemonic,ds
687 +% Charset: ISO-8859-15
688 +% Distribution and use is free, also
689 +% for commercial purposes.
690 +
691 +LC_IDENTIFICATION
692 +title "Valencian (southern Catalan) locale for Spain with Euro"
693 +source ""
694 +address ""
695 +contact "Jordi Mallach"
696 +email "jordi@×××.org"
697 +tel ""
698 +fax ""
699 +language "Catalan"
700 +territory "Spain"
701 +revision "1.0"
702 +date "2006-04-06"
703 +%
704 +category "ca_ES@valencia:2006";LC_IDENTIFICATION
705 +category "ca_ES@valencia:2006";LC_CTYPE
706 +category "ca_ES@valencia:2006";LC_COLLATE
707 +category "ca_ES@valencia:2006";LC_MONETARY
708 +category "ca_ES@valencia:2006";LC_NUMERIC
709 +category "ca_ES@valencia:2006";LC_TIME
710 +category "ca_ES@valencia:2006";LC_MESSAGES
711 +category "ca_ES@valencia:2006";LC_PAPER
712 +category "ca_ES@valencia:2006";LC_NAME
713 +category "ca_ES@valencia:2006";LC_ADDRESS
714 +category "ca_ES@valencia:2006";LC_TELEPHONE
715 +category "ca_ES@valencia:2006";LC_MEASUREMENT
716 +
717 +END LC_IDENTIFICATION
718 +
719 +LC_CTYPE
720 +copy "i18n"
721 +END LC_CTYPE
722 +
723 +LC_COLLATE
724 +copy "ca_ES"
725 +END LC_COLLATE
726 +
727 +LC_MONETARY
728 +copy "ca_ES"
729 +END LC_MONETARY
730 +
731 +LC_NUMERIC
732 +copy "ca_ES"
733 +END LC_NUMERIC
734 +
735 +LC_TIME
736 +copy "ca_ES"
737 +END LC_TIME
738 +
739 +LC_MESSAGES
740 +copy "ca_ES"
741 +END LC_MESSAGES
742 +
743 +LC_PAPER
744 +copy "ca_ES"
745 +END LC_PAPER
746 +
747 +LC_NAME
748 +copy "ca_ES"
749 +END LC_NAME
750 +
751 +LC_ADDRESS
752 +copy "ca_ES"
753 +END LC_ADDRESS
754 +
755 +LC_TELEPHONE
756 +copy "ca_ES"
757 +END LC_TELEPHONE
758 +
759 +LC_MEASUREMENT
760 +copy "ca_ES"
761 +END LC_MEASUREMENT
762
763
764
765 1.1 src/patchsets/glibc/2.7/1120_all_glibc-2.5-strict-aliasing.patch
766
767 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1120_all_glibc-2.5-strict-aliasing.patch?rev=1.1&view=markup
768 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1120_all_glibc-2.5-strict-aliasing.patch?rev=1.1&content-type=text/plain
769
770 Index: 1120_all_glibc-2.5-strict-aliasing.patch
771 ===================================================================
772 workaround strict aliasing warnings on individual files rather than
773 forcing the whole build with -fno-strict-aliasing
774
775 http://bugs.gentoo.org/155906
776
777 note that we leave the logout.c and logwtmp.c warnings alone as the
778 code path that invokes the warning should not be executed when the
779 warning is applicable.
780
781 --- libio/Makefile
782 +++ libio/Makefile
783 @@ -90,7 +90,7 @@ CFLAGS-fseeko.c = $(exceptions)
784 CFLAGS-ftello64.c = $(exceptions)
785 CFLAGS-ftello.c = $(exceptions)
786 CFLAGS-fwide.c = $(exceptions)
787 -CFLAGS-genops.c = $(exceptions)
788 +CFLAGS-genops.c = $(exceptions) -fno-strict-aliasing
789 CFLAGS-getc.c = $(exceptions)
790 CFLAGS-getchar.c = $(exceptions)
791 CFLAGS-getwc.c = $(exceptions)
792 @@ -132,7 +132,7 @@ CFLAGS-putwc.c = $(exceptions)
793 CFLAGS-putwchar.c = $(exceptions)
794 CFLAGS-rewind.c = $(exceptions)
795 CFLAGS-wfileops.c = $(exceptions)
796 -CFLAGS-wgenops.c = $(exceptions)
797 +CFLAGS-wgenops.c = $(exceptions) -fno-strict-aliasing
798 CFLAGS-oldiofopen.c = $(exceptions)
799 CFLAGS-iofopen.c = $(exceptions)
800 CFLAGS-iofopen64.c = $(exceptions)
801 --- sunrpc/Makefile
802 +++ sunrpc/Makefile
803 @@ -127,6 +127,6 @@ CFLAGS-pmap_rmt.c = -fexceptions
804 CFLAGS-clnt_perr.c = -fexceptions
805 CFLAGS-openchild.c = -fexceptions
806
807 -CPPFLAGS += -D_RPC_THREAD_SAFE_
808 +CPPFLAGS += -D_RPC_THREAD_SAFE_ -fno-strict-aliasing
809
810 include ../Rules
811
812 --- nis/Makefile
813 +++ nis/Makefile
814 @@ -67,6 +67,9 @@ libnss_nisplus-routines := $(addprefix n
815 nss-nisplus nisplus-initgroups
816 libnss_nisplus-inhibit-o = $(filter-out .os,$(object-suffixes))
817
818 +CFLAGS-nis_xdr.c += -fno-strict-aliasing
819 +CFLAGS-yp_xdr.c += -fno-strict-aliasing
820 +
821 include ../Rules
822
823
824 --- nss/Makefile
825 +++ nss/Makefile
826 @@ -71,6 +71,8 @@ ifneq ($(build-static-nss),yes)
827 libnss_files-inhibit-o = $(filter-out .os,$(object-suffixes))
828 endif
829
830 +CFLAGS-nsswitch.c += -fno-strict-aliasing
831 +
832 include ../Rules
833
834
835 --- nptl/Makefile
836 +++ nptl/Makefile
837 @@ -192,6 +192,8 @@
838
839 CFLAGS-pt-system.c = -fexceptions
840
841 +CFLAGS-unwind-dw2.c += -fno-strict-aliasing
842 +
843 # Don't generate deps for calls with no sources. See sysdeps/unix/Makefile.
844 omit-deps = $(unix-syscalls:%=ptw-%)
845
846
847
848
849 1.1 src/patchsets/glibc/2.7/1130_all_glibc-2.4-undefine-__i686.patch
850
851 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1130_all_glibc-2.4-undefine-__i686.patch?rev=1.1&view=markup
852 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1130_all_glibc-2.4-undefine-__i686.patch?rev=1.1&content-type=text/plain
853
854 Index: 1130_all_glibc-2.4-undefine-__i686.patch
855 ===================================================================
856 If gcc is configured to generate i686 code or better by default (like
857 when using the --with-arch=pentium3 configure option), then the __i686
858 macro will always be defined automatically and thus screw up the
859 compilation of some .S files.
860 http://bugs.gentoo.org/131108
861 http://sourceware.org/ml/libc-alpha/2006-04/msg00090.html
862
863 2006-04-25 Mike Frysinger <vapier@g.o>
864
865 * sysdeps/i386/sysdep.h (__i686): Undefine.
866
867 --- sysdeps/i386/sysdep.h
868 +++ sysdeps/i386/sysdep.h
869 @@ -17,6 +17,14 @@
870 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
871 02111-1307 USA. */
872
873 +/*
874 + * When building for i686 targets or better, gcc automatically defines
875 + * '__i686' to '1' for us which causes trouble when using section names
876 + * like '__i686.get_pc_thunk.reg'. Since we check for __i686__ in the
877 + * code, killing '__i686' shouldn't be a problem.
878 + */
879 +#undef __i686
880 +
881 #include <sysdeps/generic/sysdep.h>
882
883 #ifdef __ASSEMBLER__
884
885 Note: this breaks mips so we wrap it in a hackish __i686__ for now ...
886
887 2006-04-25 Mike Frysinger <vapier@g.o>
888
889 * sysdeps/pthread/pt-initfini.c: Include sysdep.h.
890
891 --- nptl/sysdeps/pthread/pt-initfini.c
892 +++ nptl/sysdeps/pthread/pt-initfini.c
893 @@ -45,6 +45,9 @@
894 /* Embed an #include to pull in the alignment and .end directives. */
895 asm ("\n#include \"defs.h\"");
896
897 +/* Embed an #include to pull in asm settings. */
898 +asm ("\n#ifdef __i686__\n#include <sysdep.h>\n#endif");
899 +
900 /* The initial common code ends here. */
901 asm ("\n/*@HEADER_ENDS*/");
902
903
904
905
906 1.1 src/patchsets/glibc/2.7/1530_all_glibc-m68k-sys-user.patch
907
908 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1530_all_glibc-m68k-sys-user.patch?rev=1.1&view=markup
909 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1530_all_glibc-m68k-sys-user.patch?rev=1.1&content-type=text/plain
910
911 Index: 1530_all_glibc-m68k-sys-user.patch
912 ===================================================================
913 copied from kernel as it is sanitized now
914
915 --- libc/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h
916 +++ libc/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h
917 @@ -0,0 +1,87 @@
918 +#ifndef _SYS_USER_H
919 +#define _SYS_USER_H
920 +
921 +/* Core file format: The core file is written in such a way that gdb
922 + can understand it and provide useful information to the user (under
923 + linux we use the 'trad-core' bfd). There are quite a number of
924 + obstacles to being able to view the contents of the floating point
925 + registers, and until these are solved you will not be able to view the
926 + contents of them. Actually, you can read in the core file and look at
927 + the contents of the user struct to find out what the floating point
928 + registers contain.
929 + The actual file contents are as follows:
930 + UPAGE: 1 page consisting of a user struct that tells gdb what is present
931 + in the file. Directly after this is a copy of the task_struct, which
932 + is currently not used by gdb, but it may come in useful at some point.
933 + All of the registers are stored as part of the upage. The upage should
934 + always be only one page.
935 + DATA: The data area is stored. We use current->end_text to
936 + current->brk to pick up all of the user variables, plus any memory
937 + that may have been malloced. No attempt is made to determine if a page
938 + is demand-zero or if a page is totally unused, we just cover the entire
939 + range. All of the addresses are rounded in such a way that an integral
940 + number of pages is written.
941 + STACK: We need the stack information in order to get a meaningful
942 + backtrace. We need to write the data from (esp) to
943 + current->start_stack, so we round each of these off in order to be able
944 + to write an integer number of pages.
945 + The minimum core file size is 3 pages, or 12288 bytes.
946 +*/
947 +
948 +struct user_m68kfp_struct {
949 + unsigned long fpregs[8*3]; /* fp0-fp7 registers */
950 + unsigned long fpcntl[3]; /* fp control regs */
951 +};
952 +
953 +/* This is the old layout of "struct pt_regs" as of Linux 1.x, and
954 + is still the layout used by user (the new pt_regs doesn't have
955 + all registers). */
956 +struct user_regs_struct {
957 + long d1,d2,d3,d4,d5,d6,d7;
958 + long a0,a1,a2,a3,a4,a5,a6;
959 + long d0;
960 + long usp;
961 + long orig_d0;
962 + short stkadj;
963 + short sr;
964 + long pc;
965 + short fmtvec;
966 + short __fill;
967 +};
968 +
969 +
970 +/* When the kernel dumps core, it starts by dumping the user struct -
971 + this will be used by gdb to figure out where the data and stack segments
972 + are within the file, and what virtual addresses to use. */
973 +struct user{
974 +/* We start with the registers, to mimic the way that "memory" is returned
975 + from the ptrace(3,...) function. */
976 + struct user_regs_struct regs; /* Where the registers are actually stored */
977 +/* ptrace does not yet supply these. Someday.... */
978 + int u_fpvalid; /* True if math co-processor being used. */
979 + /* for this mess. Not yet used. */
980 + struct user_m68kfp_struct m68kfp; /* Math Co-processor registers. */
981 +/* The rest of this junk is to help gdb figure out what goes where */
982 + unsigned long int u_tsize; /* Text segment size (pages). */
983 + unsigned long int u_dsize; /* Data segment size (pages). */
984 + unsigned long int u_ssize; /* Stack segment size (pages). */
985 + unsigned long start_code; /* Starting virtual address of text. */
986 + unsigned long start_stack; /* Starting virtual address of stack area.
987 + This is actually the bottom of the stack,
988 + the top of the stack is always found in the
989 + esp register. */
990 + long int signal; /* Signal that caused the core dump. */
991 + int reserved; /* No longer used */
992 + struct user_regs_struct *u_ar0;
993 + /* Used by gdb to help find the values for */
994 + /* the registers. */
995 + struct user_m68kfp_struct* u_fpstate; /* Math Co-processor pointer. */
996 + unsigned long magic; /* To uniquely identify a core file */
997 + char u_comm[32]; /* User command that was responsible */
998 +};
999 +#define NBPG 4096
1000 +#define UPAGES 1
1001 +#define HOST_TEXT_START_ADDR (u.start_code)
1002 +#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
1003 +
1004 +#endif
1005
1006
1007
1008 1.1 src/patchsets/glibc/2.7/3000_all_2.3.6-dl_execstack-PaX-support.patch
1009
1010 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/3000_all_2.3.6-dl_execstack-PaX-support.patch?rev=1.1&view=markup
1011 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/3000_all_2.3.6-dl_execstack-PaX-support.patch?rev=1.1&content-type=text/plain
1012
1013 Index: 3000_all_2.3.6-dl_execstack-PaX-support.patch
1014 ===================================================================
1015 With latest versions of glibc, a lot of apps failed on a PaX enabled
1016 system with:
1017 cannot enable executable stack as shared object requires: Permission denied
1018
1019 This is due to PaX 'exec-protecting' the stack, and ld.so then trying
1020 to make the stack executable due to some libraries not containing the
1021 PT_GNU_STACK section. Bug #32960. <azarah@g.o> (12 Nov 2003).
1022
1023 Patch also NPTL. Bug #116086. <kevquinn@g.o> (20 Dec 2005).
1024
1025 --- sysdeps/unix/sysv/linux/dl-execstack.c
1026 +++ sysdeps/unix/sysv/linux/dl-execstack.c
1027 @@ -63,7 +63,10 @@
1028 else
1029 # endif
1030 {
1031 - result = errno;
1032 + if (errno == EACCES) /* PAX is enabled */
1033 + result = 0;
1034 + else
1035 + result = errno;
1036 goto out;
1037 }
1038 }
1039 @@ -89,7 +92,12 @@
1040 page -= size;
1041 else
1042 {
1043 - if (errno != ENOMEM) /* Unexpected failure mode. */
1044 + if (errno == EACCES) /* PAX is enabled */
1045 + {
1046 + result = 0;
1047 + goto out;
1048 + }
1049 + else if (errno != ENOMEM) /* Unexpected failure mode. */
1050 {
1051 result = errno;
1052 goto out;
1053 @@ -115,7 +123,12 @@
1054 page += size;
1055 else
1056 {
1057 - if (errno != ENOMEM) /* Unexpected failure mode. */
1058 + if (errno == EACCES) /* PAX is enabled */
1059 + {
1060 + result = 0;
1061 + goto out;
1062 + }
1063 + else if (errno != ENOMEM) /* Unexpected failure mode. */
1064 {
1065 result = errno;
1066 goto out;
1067 --- nptl/allocatestack.c
1068 +++ nptl/allocatestack.c
1069 @@ -279,7 +279,8 @@
1070 size_t len = pd->stackblock_size - pd->guardsize;
1071 #endif
1072 if (mprotect (stack, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0)
1073 - return errno;
1074 + if (errno != EACCES) /* PAX is enabled */
1075 + return errno;
1076
1077 return 0;
1078 }
1079
1080
1081
1082 1.1 src/patchsets/glibc/2.7/3010_all_2.3.3_pre20040117-pt_pax.patch
1083
1084 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/3010_all_2.3.3_pre20040117-pt_pax.patch?rev=1.1&view=markup
1085 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/3010_all_2.3.3_pre20040117-pt_pax.patch?rev=1.1&content-type=text/plain
1086
1087 Index: 3010_all_2.3.3_pre20040117-pt_pax.patch
1088 ===================================================================
1089 --- elf/elf.h
1090 +++ elf/elf.h
1091 @@ -568,6 +568,7 @@
1092 #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */
1093 #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */
1094 #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */
1095 +#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */
1096 #define PT_LOSUNW 0x6ffffffa
1097 #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */
1098 #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */
1099 @@ -581,6 +582,18 @@
1100 #define PF_X (1 << 0) /* Segment is executable */
1101 #define PF_W (1 << 1) /* Segment is writable */
1102 #define PF_R (1 << 2) /* Segment is readable */
1103 +#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */
1104 +#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */
1105 +#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */
1106 +#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */
1107 +#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */
1108 +#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */
1109 +#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */
1110 +#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */
1111 +#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */
1112 +#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */
1113 +#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */
1114 +#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */
1115 #define PF_MASKOS 0x0ff00000 /* OS-specific */
1116 #define PF_MASKPROC 0xf0000000 /* Processor-specific */
1117
1118
1119
1120
1121 1.1 src/patchsets/glibc/2.7/3020_all_glibc-tests-sandbox-libdl-paths.patch
1122
1123 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/3020_all_glibc-tests-sandbox-libdl-paths.patch?rev=1.1&view=markup
1124 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/3020_all_glibc-tests-sandbox-libdl-paths.patch?rev=1.1&content-type=text/plain
1125
1126 Index: 3020_all_glibc-tests-sandbox-libdl-paths.patch
1127 ===================================================================
1128 when glibc runs its tests, it does so by invoking the local library loader.
1129 in Gentoo, we build/run inside of our "sandbox" which itself is linked against
1130 libdl (so that it can load libraries and pull out symbols). the trouble
1131 is that when you upgrade from an older glibc to the new one, often times
1132 internal symbols change name or abi. this is normally OK as you cannot use
1133 libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so
1134 we always say "keep all of the glibc libraries from the same build". but
1135 when glibc runs its tests, it uses dynamic paths to point to its new local
1136 copies of libraries. if the test doesnt use libdl, then glibc doesnt add
1137 its path, and when sandbox triggers the loading of libdl, glibc does so
1138 from the host system system. this gets us into the case of all libraries
1139 are from the locally compiled version of glibc except for libdl.so.
1140
1141 Fix by Wormo
1142
1143 http://bugs.gentoo.org/56898
1144
1145 --- libc/grp/tst_fgetgrent.sh
1146 +++ libc/grp/tst_fgetgrent.sh
1147 @@ -24,7 +24,8 @@
1148 rtld_installed_name=$1; shift
1149
1150 testout=${common_objpfx}/grp/tst_fgetgrent.out
1151 -library_path=${common_objpfx}
1152 +# make sure libdl is also in path in case sandbox is in use
1153 +library_path=${common_objpfx}:${common_objpfx}/dlfcn
1154
1155 result=0
1156
1157 --- libc/iconvdata/run-iconv-test.sh
1158 +++ libc/iconvdata/run-iconv-test.sh
1159 @@ -34,7 +34,7 @@
1160 export GCONV_PATH
1161
1162 # We have to have some directories in the library path.
1163 -LIBPATH=$codir:$codir/iconvdata
1164 +LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn
1165
1166 # How the start the iconv(1) program.
1167 ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \
1168 --- libc/iconvdata/tst-table.sh
1169 +++ libc/iconvdata/tst-table.sh
1170 @@ -59,8 +59,11 @@
1171 irreversible=${charset}.irreversible
1172 fi
1173
1174 +# make sure libdl is also in path in case sandbox is in use
1175 +library_path=${common_objpfx}:${common_objpfx}/dlfcn
1176 +
1177 # iconv in one direction.
1178 -${common_objpfx}elf/ld.so --library-path $common_objpfx \
1179 +${common_objpfx}elf/ld.so --library-path $library_path \
1180 ${objpfx}tst-table-from ${charset} \
1181 > ${objpfx}tst-${charset}.table
1182
1183 --- libc/intl/tst-codeset.sh
1184 +++ libc/intl/tst-codeset.sh
1185 @@ -37,6 +37,9 @@
1186 LOCPATH=${common_objpfx}localedata
1187 export LOCPATH
1188
1189 +# make sure libdl is also in path in case sandbox is in use
1190 +library_path=${common_objpfx}:${common_objpfx}/dlfcn
1191 +
1192 ${common_objpfx}elf/ld.so --library-path $common_objpfx \
1193 ${objpfx}tst-codeset > ${objpfx}tst-codeset.out
1194
1195 --- libc/intl/tst-gettext.sh
1196 +++ libc/intl/tst-gettext.sh
1197 @@ -51,9 +51,12 @@
1198 LOCPATH=${common_objpfx}localedata
1199 export LOCPATH
1200
1201 +# make sure libdl is also in path in case sandbox is in use
1202 +library_path=${common_objpfx}:${common_objpfx}/dlfcn
1203 +
1204 # Now run the test.
1205 MALLOC_TRACE=$malloc_trace LOCPATH=${objpfx}localedir:$LOCPATH \
1206 -${common_objpfx}elf/ld.so --library-path $common_objpfx \
1207 +${common_objpfx}elf/ld.so --library-path $library_path \
1208 ${objpfx}tst-gettext > ${objpfx}tst-gettext.out ${objpfx}domaindir
1209
1210 exit $?
1211 --- libc/intl/tst-gettext2.sh
1212 +++ libc/intl/tst-gettext2.sh
1213 @@ -65,8 +65,11 @@
1214 LOCPATH=${objpfx}domaindir
1215 export LOCPATH
1216
1217 +# make sure libdl is also in path in case sandbox is in use
1218 +library_path=${common_objpfx}:${common_objpfx}/dlfcn
1219 +
1220 # Now run the test.
1221 -${common_objpfx}elf/ld.so --library-path $common_objpfx \
1222 +${common_objpfx}elf/ld.so --library-path $library_path \
1223 ${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir &&
1224 cmp ${objpfx}tst-gettext2.out - <<EOF
1225 String1 - Lang1: 1st string
1226 --- libc/intl/tst-translit.sh
1227 +++ libc/intl/tst-translit.sh
1228 @@ -36,7 +36,10 @@
1229 LOCPATH=${common_objpfx}localedata
1230 export LOCPATH
1231
1232 -${common_objpfx}elf/ld.so --library-path $common_objpfx \
1233 +# make sure libdl is also in path in case sandbox is in use
1234 +library_path=${common_objpfx}:${common_objpfx}/dlfcn
1235 +
1236 +${common_objpfx}elf/ld.so --library-path $library_path \
1237 ${objpfx}tst-translit > ${objpfx}tst-translit.out ${objpfx}domaindir
1238
1239 exit $?
1240 --- libc/malloc/tst-mtrace.sh
1241 +++ libc/malloc/tst-mtrace.sh
1242 @@ -24,9 +24,12 @@
1243 status=0
1244 trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15
1245
1246 +# make sure libdl is also in path in case sandbox is in use
1247 +library_path=${common_objpfx}:${common_objpfx}/dlfcn
1248 +
1249 MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \
1250 LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \
1251 -${common_objpfx}elf/ld.so --library-path $common_objpfx \
1252 +${common_objpfx}elf/ld.so --library-path $library_path \
1253 ${common_objpfx}malloc/tst-mtrace || status=1
1254
1255 if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then
1256 --- libc/nptl/tst-tls6.sh
1257 +++ libc/nptl/tst-tls6.sh
1258 @@ -5,8 +5,8 @@
1259 rtld_installed_name=$1; shift
1260 logfile=$common_objpfx/nptl/tst-tls6.out
1261
1262 -# We have to find libc and nptl
1263 -library_path=${common_objpfx}:${common_objpfx}nptl
1264 +# We have to find libc and nptl (also libdl in case sandbox is in use)
1265 +library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn
1266 tst_tls5="${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
1267 ${common_objpfx}/nptl/tst-tls5"
1268
1269 --- libc/posix/globtest.sh
1270 +++ libc/posix/globtest.sh
1271 @@ -18,7 +18,7 @@
1272 esac
1273
1274 # We have to find the libc and the NSS modules.
1275 -library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod
1276 +library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod:${common_objpfx}/dlfcn
1277
1278 # Since we use `sort' we must make sure to use the same locale everywhere.
1279 LC_ALL=C
1280 --- libc/posix/tst-getconf.sh
1281 +++ libc/posix/tst-getconf.sh
1282 @@ -10,7 +10,10 @@
1283 else
1284 rtld_installed_name=$1; shift
1285 runit() {
1286 - ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} "$@"
1287 +
1288 + # make sure libdl is also in path in case sandbox is in use
1289 + library_path=${common_objpfx}:${common_objpfx}/dlfcn
1290 + ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} "$@"
1291 }
1292 fi
1293
1294 --- libc/posix/wordexp-tst.sh
1295 +++ libc/posix/wordexp-tst.sh
1296 @@ -19,8 +19,11 @@
1297 "
1298 export IFS
1299
1300 +# make sure libdl is also in path in case sandbox is in use
1301 +library_path=${common_objpfx}:${common_objpfx}/dlfcn
1302 +
1303 failed=0
1304 -${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \
1305 +${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
1306 ${common_objpfx}posix/wordexp-test '$*' > ${testout}1
1307 cat <<"EOF" | cmp - ${testout}1 >> $logfile || failed=1
1308 wordexp returned 0
1309
1310
1311
1312 1.1 src/patchsets/glibc/2.7/5063_all_glibc-dont-build-timezone.patch
1313
1314 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/5063_all_glibc-dont-build-timezone.patch?rev=1.1&view=markup
1315 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/5063_all_glibc-dont-build-timezone.patch?rev=1.1&content-type=text/plain
1316
1317 Index: 5063_all_glibc-dont-build-timezone.patch
1318 ===================================================================
1319 timezone data has been split into the package sys-libs/timezone-data
1320
1321 --- glibc-2.4/Makeconfig
1322 +++ glibc-2.4/Makeconfig
1323 @@ -906,7 +906,7 @@
1324 stdlib stdio-common libio malloc string wcsmbs time dirent \
1325 grp pwd posix io termios resource misc socket sysvipc gmon \
1326 gnulib iconv iconvdata wctype manual shadow po argp \
1327 - crypt nss localedata timezone rt conform debug \
1328 + crypt nss localedata rt conform debug \
1329 $(add-on-subdirs) $(dlfcn) $(binfmt-subdir)
1330
1331 ifndef avoid-generated
1332
1333
1334
1335 1.1 src/patchsets/glibc/2.7/5070_all_glibc-2.7-cross-compile-nptl.patch
1336
1337 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/5070_all_glibc-2.7-cross-compile-nptl.patch?rev=1.1&view=markup
1338 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/5070_all_glibc-2.7-cross-compile-nptl.patch?rev=1.1&content-type=text/plain
1339
1340 Index: 5070_all_glibc-2.7-cross-compile-nptl.patch
1341 ===================================================================
1342 A little hack for cross-compiling NPTL
1343
1344 http://sourceware.org/ml/libc-alpha/2005-02/msg00043.html
1345
1346 --- libc/nptl/sysdeps/pthread/configure.in
1347 +++ libc/nptl/sysdeps/pthread/configure.in
1348 @@ -28,6 +28,9 @@
1349 struct _Unwind_Context *context;
1350 _Unwind_GetCFA (context)],
1351 libc_cv_forced_unwind=yes, libc_cv_forced_unwind=no)])
1352 +if test $libc_cv_forced_unwind = no -a $build_cpu != $host_cpu; then
1353 + libc_cv_forced_unwind=yes
1354 +fi
1355 if test $libc_cv_forced_unwind = yes; then
1356 AC_DEFINE(HAVE_FORCED_UNWIND)
1357 dnl Check for C cleanup handling.
1358 @@ -41,6 +44,9 @@
1359 puts ("test")],
1360 libc_cv_c_cleanup=yes, libc_cv_c_cleanup=no)])
1361 CFLAGS="$old_CFLAGS"
1362 + if test $libc_cv_c_cleanup = no -a $build_cpu != $host_cpu; then
1363 + libc_cv_c_cleanup=yes
1364 + fi
1365 if test $libc_cv_c_cleanup = no; then
1366 AC_MSG_ERROR([the compiler must support C cleanup handling])
1367 fi
1368 --- libc/nptl/sysdeps/pthread/configure
1369 +++ libc/nptl/sysdeps/pthread/configure
1370 @@ -78,6 +78,10 @@
1371 fi
1372 { echo "$as_me:$LINENO: result: $libc_cv_forced_unwind" >&5
1373 echo "${ECHO_T}$libc_cv_forced_unwind" >&6; }
1374 +if test $libc_cv_forced_unwind = no -a $build_cpu != $host_cpu; then
1375 + echo "$as_me:$LINENO: forcing libc_cv_forced_unwind = yes for cross-compile"
1376 + libc_cv_forced_unwind=yes
1377 +fi
1378 if test $libc_cv_forced_unwind = yes; then
1379 cat >>confdefs.h <<\_ACEOF
1380 #define HAVE_FORCED_UNWIND 1
1381 @@ -147,6 +151,10 @@
1382 { echo "$as_me:$LINENO: result: $libc_cv_c_cleanup" >&5
1383 echo "${ECHO_T}$libc_cv_c_cleanup" >&6; }
1384 CFLAGS="$old_CFLAGS"
1385 + if test $libc_cv_c_cleanup = no -a $build_cpu != $host_cpu; then
1386 + echo "$as_me:$LINENO: result: forcing libc_cv_c_cleanup = yes for cross-compile"
1387 + libc_cv_c_cleanup=yes
1388 + fi
1389 if test $libc_cv_c_cleanup = no; then
1390 { { echo "$as_me:$LINENO: error: the compiler must support C cleanup handling" >&5
1391 echo "$as_me: error: the compiler must support C cleanup handling" >&2;}
1392
1393
1394
1395 1.1 src/patchsets/glibc/2.7/6001_all_alpha-glibc-2.4-xstat.patch
1396
1397 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/6001_all_alpha-glibc-2.4-xstat.patch?rev=1.1&view=markup
1398 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/6001_all_alpha-glibc-2.4-xstat.patch?rev=1.1&content-type=text/plain
1399
1400 Index: 6001_all_alpha-glibc-2.4-xstat.patch
1401 ===================================================================
1402 http://sources.redhat.com/bugzilla/show_bug.cgi?id=1026
1403 http://sourceware.org/ml/libc-alpha/2005-02/msg00122.html
1404
1405 2005-02-26 GOTO Masanori <gotom@×××××××××.jp>
1406
1407 * sysdeps/unix/sysv/linux/kernel-features.h: Define
1408 __ASSUME_STAT64_SYSCALL.
1409 * sysdeps/unix/sysv/linux/alpha/fxstat.c: Check
1410 __ASSUME_STAT64_SYSCALL.
1411 * sysdeps/unix/sysv/linux/alpha/fxstatat.c: Likewise.
1412 * sysdeps/unix/sysv/linux/alpha/lxstat.c: Likewise.
1413 * sysdeps/unix/sysv/linux/alpha/xstat.c: Likewise.
1414 * sysdeps/unix/sysv/linux/alpha/xstatconv.c: Don't define
1415 __libc_missing_axp_stat64 when it's not needed.
1416 * sysdeps/unix/sysv/linux/alpha/xstatconv.h: Likewise.
1417
1418 --- sysdeps/unix/sysv/linux/kernel-features.h
1419 +++ sysdeps/unix/sysv/linux/kernel-features.h
1420 @@ -412,6 +412,11 @@
1421 # define __ASSUME_GETDENTS32_D_TYPE 1
1422 #endif
1423
1424 +/* Starting with version 2.6.4, alpha stat64 syscalls are available. */
1425 +#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__
1426 +# define __ASSUME_STAT64_SYSCALL 1
1427 +#endif
1428 +
1429 /* Starting with version 2.5.3, the initial location returned by `brk'
1430 after exec is always rounded up to the next page. */
1431 #if __LINUX_KERNEL_VERSION >= 132355
1432 --- sysdeps/unix/sysv/linux/alpha/fxstat.c
1433 +++ sysdeps/unix/sysv/linux/alpha/fxstat.c
1434 @@ -35,27 +35,39 @@ int
1435 __fxstat (int vers, int fd, struct stat *buf)
1436 {
1437 INTERNAL_SYSCALL_DECL (err);
1438 - int result, errno_out;
1439 + int result;
1440 struct kernel_stat kbuf;
1441
1442 +#if __ASSUME_STAT64_SYSCALL > 0
1443 + if (vers == _STAT_VER_KERNEL64)
1444 + {
1445 + result = INTERNAL_SYSCALL (fstat64, err, 2, fd, buf);
1446 + if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
1447 + return result;
1448 + __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
1449 + return -1;
1450 + }
1451 +#elif defined __NR_fstat64
1452 if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
1453 {
1454 + int errno_out;
1455 result = INTERNAL_SYSCALL (fstat64, err, 2, fd, buf);
1456 if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
1457 return result;
1458 errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
1459 if (errno_out != ENOSYS)
1460 - goto fail;
1461 + {
1462 + __set_errno (errno_out);
1463 + return -1;
1464 + }
1465 __libc_missing_axp_stat64 = 1;
1466 }
1467 +#endif
1468
1469 result = INTERNAL_SYSCALL (fstat, err, 2, fd, &kbuf);
1470 if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
1471 return __xstat_conv (vers, &kbuf, buf);
1472 - errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
1473 -
1474 - fail:
1475 - __set_errno (errno_out);
1476 + __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
1477 return -1;
1478 }
1479 hidden_def (__fxstat)
1480 --- sysdeps/unix/sysv/linux/alpha/fxstatat.c
1481 +++ sysdeps/unix/sysv/linux/alpha/fxstatat.c
1482 @@ -65,6 +65,20 @@ __fxstatat (int vers, int fd, const char
1483 int result, errno_out;
1484 struct kernel_stat kst;
1485
1486 +#if __ASSUME_STAT64_SYSCALL > 0
1487 + if (vers == _STAT_VER_KERNEL64)
1488 + {
1489 + if (flag & AT_SYMLINK_NOFOLLOW)
1490 + result = INTERNAL_SYSCALL (lstat64, err, 2, file, st);
1491 + else
1492 + result = INTERNAL_SYSCALL (stat64, err, 2, file, st);
1493 +
1494 + if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
1495 + return result;
1496 + errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
1497 + goto fail;
1498 + }
1499 +#elif defined __NR_stat64
1500 if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
1501 {
1502 if (flag & AT_SYMLINK_NOFOLLOW)
1503 @@ -79,6 +93,7 @@ __fxstatat (int vers, int fd, const char
1504 goto fail;
1505 __libc_missing_axp_stat64 = 1;
1506 }
1507 +#endif
1508
1509 if (flag & AT_SYMLINK_NOFOLLOW)
1510 result = INTERNAL_SYSCALL (lstat, err, 2, file, &kst);
1511 --- sysdeps/unix/sysv/linux/alpha/lxstat.c
1512 +++ sysdeps/unix/sysv/linux/alpha/lxstat.c
1513 @@ -35,27 +35,39 @@ int
1514 __lxstat (int vers, const char *name, struct stat *buf)
1515 {
1516 INTERNAL_SYSCALL_DECL (err);
1517 - int result, errno_out;
1518 + int result;
1519 struct kernel_stat kbuf;
1520
1521 +#if __ASSUME_STAT64_SYSCALL > 0
1522 + if (vers == _STAT_VER_KERNEL64)
1523 + {
1524 + result = INTERNAL_SYSCALL (lstat64, err, 2, name, buf);
1525 + if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
1526 + return result;
1527 + __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
1528 + return -1;
1529 + }
1530 +#elif defined __NR_lstat64
1531 if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
1532 {
1533 + int errno_out;
1534 result = INTERNAL_SYSCALL (lstat64, err, 2, name, buf);
1535 if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
1536 return result;
1537 errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
1538 if (errno_out != ENOSYS)
1539 - goto fail;
1540 + {
1541 + __set_errno (errno_out);
1542 + return -1;
1543 + }
1544 __libc_missing_axp_stat64 = 1;
1545 }
1546 +#endif
1547
1548 result = INTERNAL_SYSCALL (lstat, err, 2, name, &kbuf);
1549 if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
1550 return __xstat_conv (vers, &kbuf, buf);
1551 - errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
1552 -
1553 - fail:
1554 - __set_errno (errno_out);
1555 + __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
1556 return -1;
1557 }
1558 hidden_def (__lxstat)
1559 --- sysdeps/unix/sysv/linux/alpha/xstat.c
1560 +++ sysdeps/unix/sysv/linux/alpha/xstat.c
1561 @@ -35,27 +35,39 @@ int
1562 __xstat (int vers, const char *name, struct stat *buf)
1563 {
1564 INTERNAL_SYSCALL_DECL (err);
1565 - int result, errno_out;
1566 + int result;
1567 struct kernel_stat kbuf;
1568
1569 +#if __ASSUME_STAT64_SYSCALL > 0
1570 + if (vers == _STAT_VER_KERNEL64)
1571 + {
1572 + result = INTERNAL_SYSCALL (stat64, err, 2, name, buf);
1573 + if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
1574 + return result;
1575 + __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
1576 + return -1;
1577 + }
1578 +#elif defined __NR_stat64
1579 if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
1580 {
1581 + int errno_out;
1582 result = INTERNAL_SYSCALL (stat64, err, 2, name, buf);
1583 if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
1584 return result;
1585 errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
1586 if (errno_out != ENOSYS)
1587 - goto fail;
1588 + {
1589 + __set_errno (errno_out);
1590 + return -1;
1591 + }
1592 __libc_missing_axp_stat64 = 1;
1593 }
1594 +#endif
1595
1596 result = INTERNAL_SYSCALL (stat, err, 2, name, &kbuf);
1597 if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
1598 return __xstat_conv (vers, &kbuf, buf);
1599 - errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
1600 -
1601 - fail:
1602 - __set_errno (errno_out);
1603 + __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
1604 return -1;
1605 }
1606 hidden_def (__xstat)
1607 --- sysdeps/unix/sysv/linux/alpha/xstatconv.c
1608 +++ sysdeps/unix/sysv/linux/alpha/xstatconv.c
1609 @@ -22,9 +22,14 @@
1610 #include <sys/stat.h>
1611 #include <kernel_stat.h>
1612 #include <xstatconv.h>
1613 +#include <sys/syscall.h>
1614
1615
1616 +#ifdef __NR_stat64
1617 +# if __ASSUME_STAT64_SYSCALL == 0
1618 int __libc_missing_axp_stat64;
1619 +# endif
1620 +#endif
1621
1622 int
1623 __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
1624 --- sysdeps/unix/sysv/linux/alpha/xstatconv.h
1625 +++ sysdeps/unix/sysv/linux/alpha/xstatconv.h
1626 @@ -18,7 +18,12 @@
1627 02111-1307 USA. */
1628
1629 #include <kernel-features.h>
1630 +#include <sys/syscall.h>
1631
1632 +#ifdef __NR_stat64
1633 +# if __ASSUME_STAT64_SYSCALL == 0
1634 extern int __libc_missing_axp_stat64 attribute_hidden;
1635 +# endif
1636 +#endif
1637 extern int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
1638 attribute_hidden;
1639
1640
1641
1642 1.1 src/patchsets/glibc/2.7/6015_all_alpha-glibc-2.5-no-page-header.patch
1643
1644 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/6015_all_alpha-glibc-2.5-no-page-header.patch?rev=1.1&view=markup
1645 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/6015_all_alpha-glibc-2.5-no-page-header.patch?rev=1.1&content-type=text/plain
1646
1647 Index: 6015_all_alpha-glibc-2.5-no-page-header.patch
1648 ===================================================================
1649 2007-03-13 Mike Frysinger <vapier@g.o>
1650
1651 * sysdeps/unix/sysv/linux/alpha/sys/user.h: Include unistd.h rather
1652 than asm/page.h.
1653 (NBPG): Define to getpagesize().
1654
1655 --- sysdeps/unix/sysv/linux/alpha/sys/user.h
1656 +++ sysdeps/unix/sysv/linux/alpha/sys/user.h
1657 @@ -23,7 +23,7 @@
1658 only. Don't read too much into it. Don't use it for anything other
1659 than gdb/strace unless you know what you are doing. */
1660
1661 -#include <asm/page.h>
1662 +#include <unistd.h>
1663 #include <asm/reg.h>
1664
1665 struct user
1666 @@ -41,7 +41,7 @@ struct user
1667 char u_comm[32]; /* user command name */
1668 };
1669
1670 -#define NBPG PAGE_SIZE
1671 +#define NBPG getpagesize()
1672 #define UPAGES 1
1673 #define HOST_TEXT_START_ADDR (u.start_code)
1674 #define HOST_DATA_START_ADDR (u.start_data)
1675
1676
1677
1678 1.1 src/patchsets/glibc/2.7/6016_all_alpha-glibc-2.5-no-asm-elf-header.patch
1679
1680 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/6016_all_alpha-glibc-2.5-no-asm-elf-header.patch?rev=1.1&view=markup
1681 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/6016_all_alpha-glibc-2.5-no-asm-elf-header.patch?rev=1.1&content-type=text/plain
1682
1683 Index: 6016_all_alpha-glibc-2.5-no-asm-elf-header.patch
1684 ===================================================================
1685 2007-03-13 Mike Frysinger <vapier@g.o>
1686
1687 * sysdeps/unix/sysv/linux/alpha/sys/procfs.h: Copy some defines
1688 from alpha's asm/elf.h
1689
1690 --- libc/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
1691 +++ libc/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
1692 @@ -29,10 +29,23 @@
1693 #include <sys/types.h>
1694 #include <sys/ucontext.h>
1695 #include <sys/user.h>
1696 -#include <asm/elf.h>
1697
1698 __BEGIN_DECLS
1699
1700 +/*
1701 + * The OSF/1 version of <sys/procfs.h> makes gregset_t 46 entries long.
1702 + * I have no idea why that is so. For now, we just leave it at 33
1703 + * (32 general regs + processor status word).
1704 + */
1705 +#define ELF_NGREG 33
1706 +#define ELF_NFPREG 32
1707 +
1708 +typedef unsigned long elf_greg_t;
1709 +typedef elf_greg_t elf_gregset_t[ELF_NGREG];
1710 +
1711 +typedef double elf_fpreg_t;
1712 +typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
1713 +
1714 struct elf_siginfo
1715 {
1716 int si_signo; /* Signal number. */
1717
1718
1719
1720 1.1 src/patchsets/glibc/2.7/6220_all_glibc-2.4-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
1721
1722 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/6220_all_glibc-2.4-arm-cirrus-ep93xx-maverick-crunch-fpu.patch?rev=1.1&view=markup
1723 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/6220_all_glibc-2.4-arm-cirrus-ep93xx-maverick-crunch-fpu.patch?rev=1.1&content-type=text/plain
1724
1725 Index: 6220_all_glibc-2.4-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
1726 ===================================================================
1727 http://yann.poupet.free.fr/ep93xx/
1728 Add support for the Maverick Crunch FPU on Cirrus EP93XX processor series
1729
1730 --- ports/sysdeps/arm/bits/endian.h
1731 +++ ports/sysdeps/arm/bits/endian.h
1732 @@ -12,7 +12,7 @@
1733 /* FPA floating point units are always big-endian, irrespective of the
1734 CPU endianness. VFP floating point units use the same endianness
1735 as the rest of the system. */
1736 -#ifdef __VFP_FP__
1737 +#if defined __VFP_FP__ || defined __MAVERICK__
1738 #define __FLOAT_WORD_ORDER __BYTE_ORDER
1739 #else
1740 #define __FLOAT_WORD_ORDER __BIG_ENDIAN
1741 --- ports/sysdeps/arm/fpu/bits/fenv.h
1742 +++ ports/sysdeps/arm/fpu/bits/fenv.h
1743 @@ -20,6 +20,45 @@
1744 # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
1745 #endif
1746
1747 +#if defined(__MAVERICK__)
1748 +
1749 +/* Define bits representing exceptions in the FPU status word. */
1750 +enum
1751 + {
1752 + FE_INVALID = 1,
1753 +#define FE_INVALID FE_INVALID
1754 + FE_OVERFLOW = 4,
1755 +#define FE_OVERFLOW FE_OVERFLOW
1756 + FE_UNDERFLOW = 8,
1757 +#define FE_UNDERFLOW FE_UNDERFLOW
1758 + FE_INEXACT = 16,
1759 +#define FE_INEXACT FE_INEXACT
1760 + };
1761 +
1762 +/* Amount to shift by to convert an exception to a mask bit. */
1763 +#define FE_EXCEPT_SHIFT 5
1764 +
1765 +/* All supported exceptions. */
1766 +#define FE_ALL_EXCEPT \
1767 + (FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
1768 +
1769 +/* IEEE rounding modes. */
1770 +enum
1771 + {
1772 + FE_TONEAREST = 0,
1773 +#define FE_TONEAREST FE_TONEAREST
1774 + FE_TOWARDZERO = 0x400,
1775 +#define FE_TOWARDZERO FE_TOWARDZERO
1776 + FE_DOWNWARD = 0x800,
1777 +#define FE_DOWNWARD FE_DOWNWARD
1778 + FE_UPWARD = 0xc00,
1779 +#define FE_UPWARD FE_UPWARD
1780 + };
1781 +
1782 +#define FE_ROUND_MASK (FE_UPWARD)
1783 +
1784 +#else /* FPA */
1785 +
1786 /* Define bits representing exceptions in the FPU status word. */
1787 enum
1788 {
1789 @@ -44,6 +83,8 @@
1790 modes exist, but you have to encode them in the actual instruction. */
1791 #define FE_TONEAREST 0
1792
1793 +#endif
1794 +
1795 /* Type representing exception flags. */
1796 typedef unsigned long int fexcept_t;
1797
1798 --- ports/sysdeps/arm/fpu/bits/setjmp.h
1799 +++ ports/sysdeps/arm/fpu/bits/setjmp.h
1800 @@ -28,7 +28,11 @@
1801 #ifndef _ASM
1802 /* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not
1803 saved. */
1804 +#ifdef __MAVERICK__
1805 +typedef int __jmp_buf[34];
1806 +#else
1807 typedef int __jmp_buf[22];
1808 #endif
1809 +#endif
1810
1811 #endif
1812 --- ports/sysdeps/arm/fpu/jmpbuf-offsets.h
1813 +++ ports/sysdeps/arm/fpu/jmpbuf-offsets.h
1814 @@ -17,4 +17,8 @@
1815 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1816 02111-1307 USA. */
1817
1818 +#ifdef __MAVERICK__
1819 +#define __JMP_BUF_SP 32
1820 +#else
1821 #define __JMP_BUF_SP 20
1822 +#endif
1823 --- ports/sysdeps/arm/fpu/fegetround.c
1824 +++ ports/sysdeps/arm/fpu/fegetround.c
1825 @@ -18,9 +18,21 @@
1826 02111-1307 USA. */
1827
1828 #include <fenv.h>
1829 +#include <fpu_control.h>
1830
1831 int
1832 fegetround (void)
1833 {
1834 +#if defined(__MAVERICK__)
1835 +
1836 + unsigned long temp;
1837 +
1838 + _FPU_GETCW (temp);
1839 + return temp & FE_ROUND_MASK;
1840 +
1841 +#else /* FPA */
1842 +
1843 return FE_TONEAREST; /* Easy. :-) */
1844 +
1845 +#endif
1846 }
1847 --- ports/sysdeps/arm/fpu/fesetround.c
1848 +++ ports/sysdeps/arm/fpu/fesetround.c
1849 @@ -18,12 +18,28 @@
1850 02111-1307 USA. */
1851
1852 #include <fenv.h>
1853 +#include <fpu_control.h>
1854
1855 int
1856 fesetround (int round)
1857 {
1858 +#if defined(__MAVERICK__)
1859 + unsigned long temp;
1860 +
1861 + if (round & ~FE_ROUND_MASK)
1862 + return 1;
1863 +
1864 + _FPU_GETCW (temp);
1865 + temp = (temp & ~FE_ROUND_MASK) | round;
1866 + _FPU_SETCW (temp);
1867 + return 0;
1868 +
1869 +#else /* FPA */
1870 +
1871 /* We only support FE_TONEAREST, so there is no need for any work. */
1872 return (round == FE_TONEAREST)?0:1;
1873 +
1874 +#endif
1875 }
1876
1877 libm_hidden_def (fesetround)
1878 --- ports/sysdeps/arm/fpu/fpu_control.h
1879 +++ ports/sysdeps/arm/fpu/fpu_control.h
1880 @@ -1,5 +1,6 @@
1881 /* FPU control word definitions. ARM version.
1882 - Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
1883 + Copyright (C) 1996, 1997, 1998, 2000, 2005
1884 + Free Software Foundation, Inc.
1885 This file is part of the GNU C Library.
1886
1887 The GNU C Library is free software; you can redistribute it and/or
1888 @@ -20,6 +21,79 @@
1889 #ifndef _FPU_CONTROL_H
1890 #define _FPU_CONTROL_H
1891
1892 +#if defined(__MAVERICK__)
1893 +
1894 +/* DSPSC register: (from EP9312 User's Guide)
1895 + *
1896 + * bits 31..29 - DAID
1897 + * bits 28..26 - HVID
1898 + * bits 25..24 - RSVD
1899 + * bit 23 - ISAT
1900 + * bit 22 - UI
1901 + * bit 21 - INT
1902 + * bit 20 - AEXC
1903 + * bits 19..18 - SAT
1904 + * bits 17..16 - FCC
1905 + * bit 15 - V
1906 + * bit 14 - FWDEN
1907 + * bit 13 - Invalid
1908 + * bit 12 - Denorm
1909 + * bits 11..10 - RM
1910 + * bits 9..5 - IXE, UFE, OFE, RSVD, IOE
1911 + * bits 4..0 - IX, UF, OF, RSVD, IO
1912 + */
1913 +
1914 +/* masking of interrupts */
1915 +#define _FPU_MASK_IM (1 << 5) /* invalid operation */
1916 +#define _FPU_MASK_ZM 0 /* divide by zero */
1917 +#define _FPU_MASK_OM (1 << 7) /* overflow */
1918 +#define _FPU_MASK_UM (1 << 8) /* underflow */
1919 +#define _FPU_MASK_PM (1 << 9) /* inexact */
1920 +#define _FPU_MASK_DM 0 /* denormalized operation */
1921 +
1922 +#define _FPU_RESERVED 0xfffff000 /* These bits are reserved. */
1923 +
1924 +#define _FPU_DEFAULT 0x00b00000 /* Default value. */
1925 +#define _FPU_IEEE 0x00b003a0 /* Default + exceptions enabled. */
1926 +
1927 +/* Type of the control word. */
1928 +typedef unsigned int fpu_control_t;
1929 +
1930 +/* Macros for accessing the hardware control word. */
1931 +#define _FPU_GETCW(cw) ({ \
1932 + register int __t1, __t2; \
1933 + \
1934 + __asm__ volatile ( \
1935 + "cfmvr64l %1, mvdx0\n\t" \
1936 + "cfmvr64h %2, mvdx0\n\t" \
1937 + "cfmv32sc mvdx0, dspsc\n\t" \
1938 + "cfmvr64l %0, mvdx0\n\t" \
1939 + "cfmv64lr mvdx0, %1\n\t" \
1940 + "cfmv64hr mvdx0, %2" \
1941 + : "=r" (cw), "=r" (__t1), "=r" (__t2) \
1942 + ); \
1943 +})
1944 +
1945 +#define _FPU_SETCW(cw) ({ \
1946 + register int __t0, __t1, __t2; \
1947 + \
1948 + __asm__ volatile ( \
1949 + "cfmvr64l %1, mvdx0\n\t" \
1950 + "cfmvr64h %2, mvdx0\n\t" \
1951 + "cfmv64lr mvdx0, %0\n\t" \
1952 + "cfmvsc32 dspsc, mvdx0\n\t" \
1953 + "cfmv64lr mvdx0, %1\n\t" \
1954 + "cfmv64hr mvdx0, %2" \
1955 + : "=r" (__t0), "=r" (__t1), "=r" (__t2) \
1956 + : "0" (cw) \
1957 + ); \
1958 +})
1959 +
1960 +/* Default control word set at startup. */
1961 +extern fpu_control_t __fpu_control;
1962 +
1963 +#else /* FPA */
1964 +
1965 /* We have a slight terminology confusion here. On the ARM, the register
1966 * we're interested in is actually the FPU status word - the FPU control
1967 * word is something different (which is implementation-defined and only
1968 @@ -99,4 +173,6 @@
1969 /* Default control word set at startup. */
1970 extern fpu_control_t __fpu_control;
1971
1972 +#endif
1973 +
1974 #endif /* _FPU_CONTROL_H */
1975 --- ports/sysdeps/arm/fpu/__longjmp.S
1976 +++ ports/sysdeps/arm/fpu/__longjmp.S
1977 @@ -30,7 +30,33 @@
1978 movs r0, r1 /* get the return value in place */
1979 moveq r0, #1 /* can't let setjmp() return zero! */
1980
1981 +#ifdef __MAVERICK__
1982 + cfldrd mvd4, [ip], #8
1983 + nop
1984 + cfldrd mvd5, [ip], #8
1985 + nop
1986 + cfldrd mvd6, [ip], #8
1987 + nop
1988 + cfldrd mvd7, [ip], #8
1989 + nop
1990 + cfldrd mvd8, [ip], #8
1991 + nop
1992 + cfldrd mvd9, [ip], #8
1993 + nop
1994 + cfldrd mvd10, [ip], #8
1995 + nop
1996 + cfldrd mvd11, [ip], #8
1997 + nop
1998 + cfldrd mvd12, [ip], #8
1999 + nop
2000 + cfldrd mvd13, [ip], #8
2001 + nop
2002 + cfldrd mvd14, [ip], #8
2003 + nop
2004 + cfldrd mvd15, [ip], #8
2005 +#else
2006 lfmfd f4, 4, [ip] ! /* load the floating point regs */
2007 +#endif
2008
2009 LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc})
2010 END (__longjmp)
2011 --- ports/sysdeps/arm/fpu/setjmp.S
2012 +++ ports/sysdeps/arm/fpu/setjmp.S
2013 @@ -24,11 +24,41 @@
2014
2015 ENTRY (__sigsetjmp)
2016 /* Save registers */
2017 +#ifdef __MAVERICK__
2018 + cfstrd mvd4, [r0], #8
2019 + nop
2020 + cfstrd mvd5, [r0], #8
2021 + nop
2022 + cfstrd mvd6, [r0], #8
2023 + nop
2024 + cfstrd mvd7, [r0], #8
2025 + nop
2026 + cfstrd mvd8, [r0], #8
2027 + nop
2028 + cfstrd mvd9, [r0], #8
2029 + nop
2030 + cfstrd mvd10, [r0], #8
2031 + nop
2032 + cfstrd mvd11, [r0], #8
2033 + nop
2034 + cfstrd mvd12, [r0], #8
2035 + nop
2036 + cfstrd mvd13, [r0], #8
2037 + nop
2038 + cfstrd mvd14, [r0], #8
2039 + nop
2040 + cfstrd mvd15, [r0], #8
2041 +#else
2042 sfmea f4, 4, [r0]!
2043 +#endif
2044 stmia r0, {v1-v6, sl, fp, sp, lr}
2045
2046 /* Restore pointer to jmp_buf */
2047 +#ifdef __MAVERICK__
2048 + sub r0, r0, #96
2049 +#else
2050 sub r0, r0, #48
2051 +#endif
2052
2053 /* Make a tail call to __sigjmp_save; it takes the same args. */
2054 B PLTJMP(C_SYMBOL_NAME(__sigjmp_save))
2055 --- ports/sysdeps/arm/gccframe.h
2056 +++ ports/sysdeps/arm/gccframe.h
2057 @@ -17,6 +17,10 @@
2058 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
2059 02111-1307 USA. */
2060
2061 +#ifdef __MAVERICK__
2062 +#define FIRST_PSEUDO_REGISTER 43
2063 +#else
2064 #define FIRST_PSEUDO_REGISTER 27
2065 +#endif
2066
2067 #include <sysdeps/generic/gccframe.h>
2068 --- ports/sysdeps/arm/gmp-mparam.h
2069 +++ ports/sysdeps/arm/gmp-mparam.h
2070 @@ -29,7 +29,7 @@
2071 #if defined(__ARMEB__)
2072 # define IEEE_DOUBLE_MIXED_ENDIAN 0
2073 # define IEEE_DOUBLE_BIG_ENDIAN 1
2074 -#elif defined(__VFP_FP__)
2075 +#elif defined(__VFP_FP__) || defined(__MAVERICK__)
2076 # define IEEE_DOUBLE_MIXED_ENDIAN 0
2077 # define IEEE_DOUBLE_BIG_ENDIAN 0
2078 #else
2079
2080
2081
2082 1.1 src/patchsets/glibc/2.7/6230_all_arm-glibc-2.5-no-page-header.patch
2083
2084 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/6230_all_arm-glibc-2.5-no-page-header.patch?rev=1.1&view=markup
2085 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/6230_all_arm-glibc-2.5-no-page-header.patch?rev=1.1&content-type=text/plain
2086
2087 Index: 6230_all_arm-glibc-2.5-no-page-header.patch
2088 ===================================================================
2089 2007-03-13 Mike Frysinger <vapier@g.o>
2090
2091 * sysdeps/unix/sysv/linux/arm/ioperm.c: Don't include asm/page.h.
2092
2093 --- ports/sysdeps/unix/sysv/linux/arm/ioperm.c
2094 +++ ports/sysdeps/unix/sysv/linux/arm/ioperm.c
2095 @@ -45,7 +45,6 @@
2096 #include <sys/mman.h>
2097
2098 #include <linux/version.h>
2099 -#include <asm/page.h>
2100 #include <sys/sysctl.h>
2101
2102 #define PATH_ARM_SYSTYPE "/etc/arm_systype"
2103
2104
2105
2106 1.1 src/patchsets/glibc/2.7/6400_all_sh-glibc-2.3.2-fpscr_values.patch
2107
2108 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/6400_all_sh-glibc-2.3.2-fpscr_values.patch?rev=1.1&view=markup
2109 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/6400_all_sh-glibc-2.3.2-fpscr_values.patch?rev=1.1&content-type=text/plain
2110
2111 Index: 6400_all_sh-glibc-2.3.2-fpscr_values.patch
2112 ===================================================================
2113 http://sources.redhat.com/ml/libc-alpha/2003-06/msg00027.html
2114 http://www.m17n.org/linux-sh/ml/linux-sh/2003-05/msg00010.html
2115
2116 http://rpm.sh-linux.org/rpm-2004/target/SRPMS/glibc-2.3.3-27.12.src.rpm
2117
2118 http://bugs.gentoo.org/100696
2119
2120 --- sysdeps/unix/sysv/linux/sh/sysdep.S
2121 +++ sysdeps/unix/sysv/linux/sh/sysdep.S
2122 @@ -30,3 +30,13 @@
2123
2124 #define __syscall_error __syscall_error_1
2125 #include <sysdeps/unix/sh/sysdep.S>
2126 +
2127 + .data
2128 + .align 3
2129 + .globl ___fpscr_values
2130 + .type ___fpscr_values, @object
2131 + .size ___fpscr_values, 8
2132 +___fpscr_values:
2133 + .long 0
2134 + .long 0x80000
2135 +weak_alias (___fpscr_values, __fpscr_values)
2136 --- sysdeps/unix/sysv/linux/sh/Versions
2137 +++ sysdeps/unix/sysv/linux/sh/Versions
2138 @@ -2,6 +2,7 @@
2139 GLIBC_2.2 {
2140 # functions used in other libraries
2141 __xstat64; __fxstat64; __lxstat64;
2142 + __fpscr_values;
2143
2144 # a*
2145 alphasort64;
2146
2147
2148
2149 1.1 src/patchsets/glibc/2.7/6415_all_sh-glibc-2.5-no-asm-user-header.patch
2150
2151 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/6415_all_sh-glibc-2.5-no-asm-user-header.patch?rev=1.1&view=markup
2152 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/6415_all_sh-glibc-2.5-no-asm-user-header.patch?rev=1.1&content-type=text/plain
2153
2154 Index: 6415_all_sh-glibc-2.5-no-asm-user-header.patch
2155 ===================================================================
2156 2007-03-13 Mike Frysinger <vapier@g.o>
2157
2158 * sysdeps/unix/sysv/linux/sh/sys/user.h: Copy Linux's asm-sh/user.h.
2159
2160 --- sysdeps/unix/sysv/linux/sh/sys/user.h
2161 +++ sysdeps/unix/sysv/linux/sh/sys/user.h
2162 @@ -19,10 +19,60 @@
2163 #ifndef _SYS_USER_H
2164 #define _SYS_USER_H 1
2165
2166 -#include <features.h>
2167 +#include <unistd.h>
2168 +#include <asm/ptrace.h>
2169
2170 -#include <asm/user.h>
2171 +/*
2172 + * Core file format: The core file is written in such a way that gdb
2173 + * can understand it and provide useful information to the user (under
2174 + * linux we use the `trad-core' bfd). The file contents are as follows:
2175 + *
2176 + * upage: 1 page consisting of a user struct that tells gdb
2177 + * what is present in the file. Directly after this is a
2178 + * copy of the task_struct, which is currently not used by gdb,
2179 + * but it may come in handy at some point. All of the registers
2180 + * are stored as part of the upage. The upage should always be
2181 + * only one page long.
2182 + * data: The data segment follows next. We use current->end_text to
2183 + * current->brk to pick up all of the user variables, plus any memory
2184 + * that may have been sbrk'ed. No attempt is made to determine if a
2185 + * page is demand-zero or if a page is totally unused, we just cover
2186 + * the entire range. All of the addresses are rounded in such a way
2187 + * that an integral number of pages is written.
2188 + * stack: We need the stack information in order to get a meaningful
2189 + * backtrace. We need to write the data from usp to
2190 + * current->start_stack, so we round each of these in order to be able
2191 + * to write an integer number of pages.
2192 + */
2193
2194 -#undef start_thread
2195 +struct user_fpu_struct {
2196 + unsigned long fp_regs[16];
2197 + unsigned long xfp_regs[16];
2198 + unsigned long fpscr;
2199 + unsigned long fpul;
2200 +};
2201 +
2202 +struct user {
2203 + struct pt_regs regs; /* entire machine state */
2204 + struct user_fpu_struct fpu; /* Math Co-processor registers */
2205 + int u_fpvalid; /* True if math co-processor being used */
2206 + size_t u_tsize; /* text size (pages) */
2207 + size_t u_dsize; /* data size (pages) */
2208 + size_t u_ssize; /* stack size (pages) */
2209 + unsigned long start_code; /* text starting address */
2210 + unsigned long start_data; /* data starting address */
2211 + unsigned long start_stack; /* stack starting address */
2212 + long int signal; /* signal causing core dump */
2213 + struct regs * u_ar0; /* help gdb find registers */
2214 + struct user_fpu_struct* u_fpstate; /* Math Co-processor pointer */
2215 + unsigned long magic; /* identifies a core file */
2216 + char u_comm[32]; /* user command name */
2217 +};
2218 +
2219 +#define NBPG getpagesize()
2220 +#define UPAGES 1
2221 +#define HOST_TEXT_START_ADDR (u.start_code)
2222 +#define HOST_DATA_START_ADDR (u.start_data)
2223 +#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
2224
2225 #endif /* sys/user.h */
2226
2227
2228
2229 1.1 src/patchsets/glibc/2.7/6416_all_sh-glibc-2.5-no-asm-elf-header.patch
2230
2231 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/6416_all_sh-glibc-2.5-no-asm-elf-header.patch?rev=1.1&view=markup
2232 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/6416_all_sh-glibc-2.5-no-asm-elf-header.patch?rev=1.1&content-type=text/plain
2233
2234 Index: 6416_all_sh-glibc-2.5-no-asm-elf-header.patch
2235 ===================================================================
2236 2007-03-13 Mike Frysinger <vapier@g.o>
2237
2238 * sysdeps/unix/sysv/linux/sh/sys/procfs.h: Copy Linux's asm-sh/elf.h types.
2239
2240 --- sysdeps/unix/sysv/linux/sh/sys/procfs.h
2241 +++ sysdeps/unix/sysv/linux/sh/sys/procfs.h
2242 @@ -29,10 +29,19 @@
2243 #include <sys/types.h>
2244 #include <sys/ucontext.h>
2245 #include <sys/user.h>
2246 -#include <asm/elf.h>
2247
2248 __BEGIN_DECLS
2249
2250 +/*
2251 + * ELF register definitions...
2252 + */
2253 +typedef unsigned long elf_greg_t;
2254 +
2255 +#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t))
2256 +typedef elf_greg_t elf_gregset_t[ELF_NGREG];
2257 +
2258 +typedef struct user_fpu_struct elf_fpregset_t;
2259 +
2260 struct elf_siginfo
2261 {
2262 int si_signo; /* Signal number. */
2263
2264
2265
2266 1.1 src/patchsets/glibc/2.7/6600_mips_librt-mips.patch
2267
2268 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/6600_mips_librt-mips.patch?rev=1.1&view=markup
2269 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/6600_mips_librt-mips.patch?rev=1.1&content-type=text/plain
2270
2271 Index: 6600_mips_librt-mips.patch
2272 ===================================================================
2273 we kind of screwed ourselves into a corner by having the clock symbols
2274 exported only with the glibc-2.0 version ... this patch fixes the
2275 export so all new binaries built against librt will use the correct
2276 glibc-2.2 symbol version
2277
2278 one day, we'll just drop this on the floor (maybe after 2006.1)
2279
2280 --- ports/sysdeps/unix/sysv/linux/mips/Versions
2281 +++ ports/sysdeps/unix/sysv/linux/mips/Versions
2282 @@ -34,3 +34,9 @@
2283 _test_and_set;
2284 }
2285 }
2286 +librt {
2287 + GLIBC_2.0 {
2288 + # c*
2289 + clock_gettime; clock_settime;
2290 + }
2291 +}
2292 --- Versions.def
2293 +++ Versions.def
2294 @@ -90,6 +90,7 @@
2295 GLIBC_PRIVATE
2296 }
2297 librt {
2298 + GLIBC_2.0
2299 GLIBC_2.1
2300 GLIBC_2.2
2301 GLIBC_2.3
2302 --- sysdeps/unix/clock_gettime.c
2303 +++ sysdeps/unix/clock_gettime.c
2304 @@ -23,6 +23,7 @@
2305 #include <sys/time.h>
2306 #include <libc-internal.h>
2307 #include <ldsodefs.h>
2308 +#include <shlib-compat.h>
2309
2310
2311 #if HP_TIMING_AVAIL
2312 @@ -90,7 +91,7 @@
2313
2314 /* Get current value of CLOCK and store it in TP. */
2315 int
2316 -clock_gettime (clockid_t clock_id, struct timespec *tp)
2317 +__clock_gettime (clockid_t clock_id, struct timespec *tp)
2318 {
2319 int retval = -1;
2320 struct timeval tv;
2321 @@ -131,4 +132,10 @@
2322
2323 return retval;
2324 }
2325 -librt_hidden_def (clock_gettime)
2326 +versioned_symbol (librt, __clock_gettime, clock_gettime, GLIBC_2_2);
2327 +librt_hidden_ver (__clock_gettime, clock_gettime)
2328 +
2329 +#if defined __mips__ && defined SHARED
2330 +strong_alias (__clock_gettime, __mips_clock_gettime)
2331 +compat_symbol (librt, __mips_clock_gettime, clock_gettime, GLIBC_2_0);
2332 +#endif
2333 --- sysdeps/unix/clock_settime.c
2334 +++ sysdeps/unix/clock_settime.c
2335 @@ -21,6 +21,7 @@
2336 #include <sys/time.h>
2337 #include <libc-internal.h>
2338 #include <ldsodefs.h>
2339 +#include <shlib-compat.h>
2340
2341
2342 #if HP_TIMING_AVAIL
2343 @@ -38,7 +39,7 @@
2344
2345 /* Set CLOCK to value TP. */
2346 int
2347 -clock_settime (clockid_t clock_id, const struct timespec *tp)
2348 +__clock_settime (clockid_t clock_id, const struct timespec *tp)
2349 {
2350 int retval;
2351
2352 @@ -123,3 +124,9 @@
2353
2354 return retval;
2355 }
2356 +versioned_symbol (librt, __clock_settime, clock_settime, GLIBC_2_2);
2357 +
2358 +#if defined __mips__ && defined SHARED
2359 +strong_alias (__clock_settime, __mips_clock_settime)
2360 +compat_symbol (librt, __mips_clock_settime, clock_settime, GLIBC_2_0);
2361 +#endif
2362
2363
2364
2365 1.1 src/patchsets/glibc/2.7/6605_all_glibc-2.4-fpu-cw-mips.patch
2366
2367 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/6605_all_glibc-2.4-fpu-cw-mips.patch?rev=1.1&view=markup
2368 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/6605_all_glibc-2.4-fpu-cw-mips.patch?rev=1.1&content-type=text/plain
2369
2370 Index: 6605_all_glibc-2.4-fpu-cw-mips.patch
2371 ===================================================================
2372 http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html
2373
2374 --- ports/sysdeps/mips/fpu_control.h
2375 +++ ports/sysdeps/mips/fpu_control.h
2376 @@ -74,7 +74,7 @@
2377 #define _FPU_RC_UP 0x2
2378 #define _FPU_RC_DOWN 0x3
2379
2380 -#define _FPU_RESERVED 0xfe3c0000 /* Reserved bits in cw */
2381 +#define _FPU_RESERVED 0xfebc0000 /* Reserved bits in cw */
2382
2383
2384 /* The fdlibm code requires strict IEEE double precision arithmetic,
2385
2386
2387
2388 1.1 src/patchsets/glibc/2.7/6645_all_glibc-mips_shn_undef-hack.patch
2389
2390 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/6645_all_glibc-mips_shn_undef-hack.patch?rev=1.1&view=markup
2391 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/6645_all_glibc-mips_shn_undef-hack.patch?rev=1.1&content-type=text/plain
2392
2393 Index: 6645_all_glibc-mips_shn_undef-hack.patch
2394 ===================================================================
2395 Hack from Debian to hopefully get sandbox working on mips
2396
2397 <`Kumba> ths: given the SHN_UNDEF thing is a hack, what's the preferred solution?
2398 <ths> For fakeroot the simplest trigger is "fakeroot file /bin/ls".
2399 <ths> `Kumba: I haven't found a better one yet.
2400 <ths> Probably marker symbols around the stub section, and then exclude it from the link map.
2401 <ths> This needs a ld change.
2402
2403 --- libc/elf/do-lookup.h
2404 +++ libc/elf/do-lookup.h
2405 @@ -187,6 +187,12 @@ do_lookup_x (const char *undef_name, uns
2406 }
2407 /* FALLTHROUGH */
2408 case STB_GLOBAL:
2409 +#ifdef __mips__
2410 + /* HACK: MIPS marks its lazy evaluation stubs with SHN_UNDEF
2411 + symbols, we skip them. */
2412 + if (sym->st_shndx == SHN_UNDEF)
2413 + break;
2414 +#endif
2415 /* Global definition. Just what we need. */
2416 result->s = sym;
2417 result->m = map;
2418
2419
2420
2421 1.1 src/patchsets/glibc/2.7/6650_all_glibc-mips_gnu-hash_support.patch
2422
2423 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/6650_all_glibc-mips_gnu-hash_support.patch?rev=1.1&view=markup
2424 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/6650_all_glibc-mips_gnu-hash_support.patch?rev=1.1&content-type=text/plain
2425
2426 Index: 6650_all_glibc-mips_gnu-hash_support.patch
2427 ===================================================================
2428 Add support for GNU_HASH on mips
2429
2430 http://sourceware.org/ml/binutils/2007-08/msg00387.html
2431
2432 --- glibc-2.6.1/elf/elf.h
2433 +++ glibc-2.6.1/elf/elf.h
2434 @@ -1380,6 +1380,7 @@ typedef struct
2435 #define STO_MIPS_INTERNAL 0x1
2436 #define STO_MIPS_HIDDEN 0x2
2437 #define STO_MIPS_PROTECTED 0x3
2438 +#define STO_MIPS_GNUHASH (1 << 3)
2439 #define STO_MIPS_SC_ALIGN_UNUSED 0xff
2440
2441 /* MIPS specific values for `st_info'. */
2442 --- glibc-2.6.1/ports/sysdeps/mips/dl-machine.h
2443 +++ glibc-2.6.1/ports/sysdeps/mips/dl-machine.h
2444 @@ -536,6 +536,7 @@ elf_machine_got_rel (struct link_map *ma
2445 ElfW(Sym) *sym;
2446 const ElfW(Half) *vernum;
2447 int i, n, symidx;
2448 + int is_gnuhash;
2449
2450 #define RESOLVE_GOTSYM(sym,vernum,sym_index) \
2451 ({ \
2452 @@ -578,10 +579,18 @@ elf_machine_got_rel (struct link_map *ma
2453 sym = (ElfW(Sym) *) D_PTR (map, l_info[DT_SYMTAB]) + symidx;
2454 i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val
2455 - map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val);
2456 + /* check hash style */
2457 + is_gnuhash = map->l_info[DT_ADDRTAGIDX (DT_GNU_HASH) + DT_NUM
2458 + + DT_THISPROCNUM + DT_VERSIONTAGNUM
2459 + + DT_EXTRANUM + DT_VALNUM];
2460
2461 /* This loop doesn't handle Quickstart. */
2462 while (i--)
2463 {
2464 + /* in gnu hash, skip symbol that doesn't need GOT entries */
2465 + if (is_gnuhash && (sym->st_other & STO_MIPS_GNUHASH) != STO_MIPS_GNUHASH)
2466 + goto skip;
2467 +
2468 if (sym->st_shndx == SHN_UNDEF)
2469 {
2470 if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC
2471 @@ -604,6 +613,7 @@ elf_machine_got_rel (struct link_map *ma
2472 else
2473 *got = RESOLVE_GOTSYM (sym, vernum, symidx);
2474
2475 + skip:
2476 ++got;
2477 ++sym;
2478 ++symidx;
2479
2480
2481
2482 1.1 src/patchsets/glibc/2.7/README.history
2483
2484 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/README.history?rev=1.1&view=markup
2485 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/README.history?rev=1.1&content-type=text/plain
2486
2487 Index: README.history
2488 ===================================================================
2489 1.0 22.07.2007
2490 + 0010_all_glibc-2.7-ssp-compat.patch
2491 + 0030_all_glibc-respect-env-CPPFLAGS.patch
2492 + 1025_all_glibc-gcc-4.3-include-fixed.patch
2493 + 1030_all_glibc-manual-no-perl.patch
2494 + 1040_all_2.3.3-localedef-fix-trampoline.patch
2495 + 1045_all_glibc-handle-long-kernel-versions.patch
2496 + 1055_all_glibc-resolv-dynamic.patch
2497 + 1075_all_glibc-section-comments.patch
2498 + 1090_all_glibc-2.3.6-fix-pr631.patch
2499 + 1100_all_glibc-2.3.3-china.patch
2500 + 1103_all_glibc-new-valencian-locale.patch
2501 + 1120_all_glibc-2.5-strict-aliasing.patch
2502 + 1130_all_glibc-2.4-undefine-__i686.patch
2503 + 1530_all_glibc-m68k-sys-user.patch
2504 + 3000_all_2.3.6-dl_execstack-PaX-support.patch
2505 + 3010_all_2.3.3_pre20040117-pt_pax.patch
2506 + 3020_all_glibc-tests-sandbox-libdl-paths.patch
2507 + 5063_all_glibc-dont-build-timezone.patch
2508 + 5070_all_glibc-2.7-cross-compile-nptl.patch
2509 + 6001_all_alpha-glibc-2.4-xstat.patch
2510 + 6015_all_alpha-glibc-2.5-no-page-header.patch
2511 + 6016_all_alpha-glibc-2.5-no-asm-elf-header.patch
2512 + 6220_all_glibc-2.4-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
2513 + 6230_all_arm-glibc-2.5-no-page-header.patch
2514 + 6400_all_sh-glibc-2.3.2-fpscr_values.patch
2515 + 6415_all_sh-glibc-2.5-no-asm-user-header.patch
2516 + 6416_all_sh-glibc-2.5-no-asm-elf-header.patch
2517 + 6600_mips_librt-mips.patch
2518 + 6605_all_glibc-2.4-fpu-cw-mips.patch
2519 + 6645_all_glibc-mips_shn_undef-hack.patch
2520 + 6650_all_glibc-mips_gnu-hash_support.patch
2521
2522
2523
2524 --
2525 gentoo-commits@g.o mailing list