* [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
@ 2007-10-22 17:00 Mike Frysinger (vapier)
0 siblings, 0 replies; only message in thread
From: Mike Frysinger (vapier) @ 2007-10-22 17:00 UTC (permalink / raw
To: gentoo-commits
vapier 07/10/22 17:00:16
Added: 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-ep93xx-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
Log:
initial 2.7 patchset based on last 2.6.1 patchset
Revision Changes Path
1.1 src/patchsets/glibc/2.7/0010_all_glibc-2.7-ssp-compat.patch
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
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
Index: 0010_all_glibc-2.7-ssp-compat.patch
===================================================================
Add backwards compat support for gcc-3.x ssp ... older ssp versions
used __guard and __stack_smash_handler symbols while gcc-4.1 and newer
uses __stack_chk_guard and __stack_chk_fail.
--- glibc-2.7/config.h.in
+++ glibc-2.7/config.h.in
@@ -42,6 +42,9 @@
assembler instructions per line. Default is `;' */
#undef ASM_LINE_SEP
+/* Define if we want to enable support for old ssp symbols */
+#undef ENABLE_OLD_SSP_COMPAT
+
/* Define if not using ELF, but `.init' and `.fini' sections are available. */
#undef HAVE_INITFINI
--- glibc-2.7/configure
+++ glibc-2.7/configure
@@ -1378,6 +1378,9 @@ Optional Features:
--enable-kernel=VERSION compile for compatibility with kernel not older than
VERSION
--enable-all-warnings enable all useful warnings gcc can issue
+ --disable-old-ssp-compat
+ enable support for older ssp symbols
+ [default=no]
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -6462,6 +6465,20 @@ fi
echo "${ECHO_T}$libc_cv_ssp" >&6; }
+# Check whether --enable-old-ssp-compat or --disable-old-ssp-compat was given.
+if test "${enable_old_ssp_compat+set}" = set; then
+ enableval="$enable_old_ssp_compat"
+ enable_old_ssp_compat=$enableval
+else
+ enable_old_ssp_compat=no
+fi;
+if test "x$enable_old_ssp_compat" = "xyes"; then
+ cat >>confdefs.h <<\_ACEOF
+#define ENABLE_OLD_SSP_COMPAT 1
+_ACEOF
+
+fi
+
{ echo "$as_me:$LINENO: checking for -fgnu89-inline" >&5
echo $ECHO_N "checking for -fgnu89-inline... $ECHO_C" >&6; }
if test "${libc_cv_gnu89_inline+set}" = set; then
--- glibc-2.7/configure.in
+++ glibc-2.7/configure.in
@@ -1641,6 +1641,15 @@ fi
rm -f conftest*])
AC_SUBST(libc_cv_ssp)
+AC_ARG_ENABLE([old-ssp-compat],
+ AC_HELP_STRING([--enable-old-ssp-compat],
+ [enable support for older ssp symbols @<:@default=no@:>@]),
+ [enable_old_ssp_compat=$enableval],
+ [enable_old_ssp_compat=no])
+if test "x$enable_old_ssp_compat" = "xyes"; then
+ AC_DEFINE(ENABLE_OLD_SSP_COMPAT)
+fi
+
AC_CACHE_CHECK(for -fgnu89-inline, libc_cv_gnu89_inline, [dnl
cat > conftest.c <<EOF
int foo;
--- glibc-2.7/csu/libc-start.c
+++ glibc-2.7/csu/libc-start.c
@@ -37,6 +37,10 @@ extern void __pthread_initialize_minimal
uintptr_t __stack_chk_guard attribute_relro;
# endif
#endif
+#ifdef ENABLE_OLD_SSP_COMPAT
+uintptr_t __guard_local attribute_relro attribute_hidden __attribute__ ((nocommon,weak));
+weak_alias (__guard_local, __guard);
+#endif
#ifdef HAVE_PTR_NTHREADS
/* We need atomic operations. */
@@ -141,6 +145,9 @@ LIBC_START_MAIN (int (*main) (int, char
/* Set up the stack checker's canary. */
uintptr_t stack_chk_guard = _dl_setup_stack_chk_guard ();
+#ifdef ENABLE_OLD_SSP_COMPAT
+ __guard_local = stack_chk_guard;
+#endif
# ifdef THREAD_SET_STACK_GUARD
THREAD_SET_STACK_GUARD (stack_chk_guard);
# else
--- glibc-2.7/csu/Versions
+++ glibc-2.7/csu/Versions
@@ -17,6 +17,12 @@ libc {
# New special glibc functions.
gnu_get_libc_release; gnu_get_libc_version;
}
+ GLIBC_2.3.2 {
+%ifdef ENABLE_OLD_SSP_COMPAT
+ # global objects and functions for the old propolice patch in gcc
+ __guard;
+%endif
+ }
GLIBC_PRIVATE {
%if HAVE___THREAD
# This version is for the TLS symbol, GLIBC_2.0 is the old object symbol.
--- glibc-2.7/debug/stack_chk_fail.c
+++ glibc-2.7/debug/stack_chk_fail.c
@@ -28,3 +28,7 @@ __stack_chk_fail (void)
{
__fortify_fail ("stack smashing detected");
}
+
+#ifdef ENABLE_OLD_SSP_COMPAT
+strong_alias (__stack_chk_fail, __stack_smash_handler)
+#endif
--- glibc-2.7/debug/Versions
+++ glibc-2.7/debug/Versions
@@ -10,6 +10,12 @@ libc {
# These are to support some gcc features.
__cyg_profile_func_enter; __cyg_profile_func_exit;
}
+%ifdef ENABLE_OLD_SSP_COMPAT
+ GLIBC_2.3.2 {
+ # backwards ssp compat support; alias to __stack_chk_fail
+ __stack_smash_handler;
+ }
+%endif
GLIBC_2.3.4 {
__chk_fail;
__memcpy_chk; __memmove_chk; __mempcpy_chk; __memset_chk; __stpcpy_chk;
--- glibc-2.7/elf/rtld.c
+++ glibc-2.7/elf/rtld.c
@@ -89,6 +89,10 @@ INTDEF(_dl_argv)
in thread local area. */
uintptr_t __stack_chk_guard attribute_relro;
#endif
+#ifdef ENABLE_OLD_SSP_COMPAT
+uintptr_t __guard_local attribute_relro attribute_hidden __attribute__ ((nocommon));
+weak_alias (__guard_local, __guard);
+#endif
/* Only exported for architectures that don't store the pointer guard
value in thread local area. */
@@ -1817,6 +1821,9 @@ ERROR: ld.so: object '%s' cannot be load
/* Set up the stack checker's canary. */
uintptr_t stack_chk_guard = _dl_setup_stack_chk_guard ();
+#ifdef ENABLE_OLD_SSP_COMPAT
+ __guard_local = stack_chk_guard;
+#endif
#ifdef THREAD_SET_STACK_GUARD
THREAD_SET_STACK_GUARD (stack_chk_guard);
#else
--- glibc-2.7/elf/Versions
+++ glibc-2.7/elf/Versions
@@ -43,6 +43,12 @@ ld {
# runtime interface to TLS
__tls_get_addr;
}
+%ifdef ENABLE_OLD_SSP_COMPAT
+ GLIBC_2.3.2 {
+ # backwards ssp compat support
+ __guard;
+ }
+%endif
GLIBC_2.4 {
# stack canary
__stack_chk_guard;
--- glibc-2.7/Versions.def
+++ glibc-2.7/Versions.def
@@ -109,6 +109,9 @@ ld {
GLIBC_2.0
GLIBC_2.1
GLIBC_2.3
+%ifdef ENABLE_OLD_SSP_COMPAT
+ GLIBC_2.3.2
+%endif
GLIBC_2.4
GLIBC_PRIVATE
}
1.1 src/patchsets/glibc/2.7/0030_all_glibc-respect-env-CPPFLAGS.patch
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
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
Index: 0030_all_glibc-respect-env-CPPFLAGS.patch
===================================================================
Respect environment CPPFLAGS when we run ./configure so we can inject
random -D things without having to set CFLAGS/ASFLAGS
--- libc/Makeconfig
+++ libc/Makeconfig
@@ -672,6 +672,7 @@ CPPFLAGS = $($(subdir)-CPPFLAGS) $(+incl
$(foreach lib,$(libof-$(basename $(@F))) \
$(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \
$(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F)))
+CPPFLAGS += $(CPPFLAGS-config)
override CFLAGS = -std=gnu99 $(gnu89-inline-CFLAGS) \
$(filter-out %frame-pointer,$(+cflags)) $(+gccwarn-c) \
$(sysdep-CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) \
--- libc/config.make.in
+++ libc/config.make.in
@@ -95,6 +95,7 @@ CC = @CC@
CXX = @CXX@
BUILD_CC = @BUILD_CC@
CFLAGS = @CFLAGS@
+CPPFLAGS-config = @CPPFLAGS@
ASFLAGS-config = @ASFLAGS_config@
AR = @AR@
RANLIB = @RANLIB@
1.1 src/patchsets/glibc/2.7/1025_all_glibc-gcc-4.3-include-fixed.patch
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
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
Index: 1025_all_glibc-gcc-4.3-include-fixed.patch
===================================================================
http://bugs.gentoo.org/183358
http://sourceware.org/ml/libc-alpha/2007-03/msg00017.html
From: "Joseph S. Myers" <joseph at codesourcery dot com>
To: libc-alpha at sourceware dot org
Date: Sun, 18 Mar 2007 20:40:59 +0000 (UTC)
Subject: Support GCC 4.3's include-fixed directory
GCC trunk now has multiple internal headers directories, one
containing the self-contained GCC-provided headers and one containing
the <limits.h> (not self-contained but including libc's <limits.h> or
a fixed version thereof) and the fixed headers; more such directories
may be added in future.
When glibc uses -nostdinc, it needs to use -isystem options for all
these internal directories. This patch teaches it about the
include-fixed directory (and is harmless with old GCC versions without
that directory).
2007-03-18 Joseph Myers <joseph@codesourcery.com>
* configure.in: Also pass -isystem option for GCC's include-fixed
directory.
* configure: Regenerate.
Index: configure.in
===================================================================
RCS file: /cvs/glibc/libc/configure.in,v
retrieving revision 1.468
diff -u -r1.468 configure.in
--- configure.in 17 Mar 2007 17:01:46 -0000 1.468
+++ configure.in 18 Mar 2007 20:35:03 -0000
@@ -912,7 +912,7 @@
# thing on a system that doesn't need fixincludes. (Not presently a problem.)
if test -n "$sysheaders"; then
ccheaders=`$CC -print-file-name=include`
- SYSINCLUDES="-nostdinc -isystem $ccheaders \
+ SYSINCLUDES="-nostdinc -isystem $ccheaders -isystem $ccheaders-fixed \
-isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
if test -n "$CXX"; then
cxxversion=`$CXX -dumpversion 2>&AS_MESSAGE_LOG_FD` &&
--- configure 17 Mar 2007 17:01:46 -0000 1.468
+++ configure 18 Mar 2007 20:35:03 -0000
@@ -912,7 +912,7 @@
# thing on a system that doesn't need fixincludes. (Not presently a problem.)
if test -n "$sysheaders"; then
ccheaders=`$CC -print-file-name=include`
- SYSINCLUDES="-nostdinc -isystem $ccheaders \
+ SYSINCLUDES="-nostdinc -isystem $ccheaders -isystem $ccheaders-fixed \
-isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
if test -n "$CXX"; then
cxxversion=`$CXX -dumpversion 2>&AS_MESSAGE_LOG_FD` &&
--
Joseph S. Myers
joseph@codesourcery.com
1.1 src/patchsets/glibc/2.7/1030_all_glibc-manual-no-perl.patch
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
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
Index: 1030_all_glibc-manual-no-perl.patch
===================================================================
If we're using a cvs snapshot which updates the source files, and
perl isn't installed yet, then we can't regen the docs. Not a big
deal, so just whine a little and continue on our merry way.
http://bugs.gentoo.org/60132
--- libc/manual/Makefile
+++ libc/manual/Makefile
@@ -104,9 +104,14 @@
libm-err.texi: stamp-libm-err
stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\
$(dir)/libm-test-ulps))
+ifneq ($(PERL),no)
pwd=`pwd`; \
$(PERL) $< $$pwd/.. > libm-err-tmp
$(move-if-change) libm-err-tmp libm-err.texi
+else
+ echo "Unable to rebuild math docs, no perl installed"
+ touch libm-err.texi
+endif
touch $@
# Generate Texinfo files from the C source for the example programs.
1.1 src/patchsets/glibc/2.7/1040_all_2.3.3-localedef-fix-trampoline.patch
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
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
Index: 1040_all_2.3.3-localedef-fix-trampoline.patch
===================================================================
#! /bin/sh -e
# DP: Description: Fix localedef segfault when run under exec-shield,
# PaX or similar. (#231438, #198099)
# DP: Dpatch Author: James Troup <james@nocrew.org>
# DP: Patch Author: (probably) Jakub Jelinek <jakub@redhat.com>
# DP: Upstream status: Unknown
# DP: Status Details: Unknown
# DP: Date: 2004-03-16
if [ $# -ne 2 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch) patch -d "$2" -f --no-backup-if-mismatch -p1 < $0;;
-unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p1 < $0;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
--- glibc-2.3.3-net/locale/programs/3level.h 16 Jun 2003 07:19:09 -0000 1.1.1.5
+++ glibc-2.3.3-redhat/locale/programs/3level.h 16 Jun 2003 09:32:40 -0000 1.4
@@ -204,6 +204,42 @@ CONCAT(TABLE,_iterate) (struct TABLE *t,
}
}
}
+
+/* GCC ATM seems to do a poor job with pointers to nested functions passed
+ to inlined functions. Help it a little bit with this hack. */
+#define wchead_table_iterate(tp, fn) \
+do \
+ { \
+ struct wchead_table *t = (tp); \
+ uint32_t index1; \
+ for (index1 = 0; index1 < t->level1_size; index1++) \
+ { \
+ uint32_t lookup1 = t->level1[index1]; \
+ if (lookup1 != ((uint32_t) ~0)) \
+ { \
+ uint32_t lookup1_shifted = lookup1 << t->q; \
+ uint32_t index2; \
+ for (index2 = 0; index2 < (1 << t->q); index2++) \
+ { \
+ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \
+ if (lookup2 != ((uint32_t) ~0)) \
+ { \
+ uint32_t lookup2_shifted = lookup2 << t->p; \
+ uint32_t index3; \
+ for (index3 = 0; index3 < (1 << t->p); index3++) \
+ { \
+ struct element_t *lookup3 \
+ = t->level3[index3 + lookup2_shifted]; \
+ if (lookup3 != NULL) \
+ fn ((((index1 << t->q) + index2) << t->p) + index3, \
+ lookup3); \
+ } \
+ } \
+ } \
+ } \
+ } \
+ } while (0)
+
#endif
#ifndef NO_FINALIZE
1.1 src/patchsets/glibc/2.7/1045_all_glibc-handle-long-kernel-versions.patch
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
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
Index: 1045_all_glibc-handle-long-kernel-versions.patch
===================================================================
http://sourceware.org/ml/libc-alpha/2007-07/msg00023.html
2007-07-07 Mike Frysinger <vapier@gentoo.org>
* sysdeps/unix/sysv/linux/dl-osinfo.h (_dl_discover_osversion): Break
after reading the first 3 parts of the kernel version.
--- libc/sysdeps/unix/sysv/linux/dl-osinfo.h
+++ libc/sysdeps/unix/sysv/linux/dl-osinfo.h
@@ -112,7 +112,7 @@ _dl_discover_osversion (void)
version = 0;
parts = 0;
cp = buf;
- while ((*cp >= '0') && (*cp <= '9'))
+ while ((*cp >= '0') && (*cp <= '9') && parts < 3)
{
unsigned int here = *cp++ - '0';
1.1 src/patchsets/glibc/2.7/1055_all_glibc-resolv-dynamic.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1055_all_glibc-resolv-dynamic.patch?rev=1.1&view=markup
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
Index: 1055_all_glibc-resolv-dynamic.patch
===================================================================
ripped from SuSE
if /etc/resolv.conf is updated, then make sure applications
already running get the updated information.
http://bugs.gentoo.org/177416
--- libc/resolv/res_libc.c
+++ libc/resolv/res_libc.c
@@ -22,6 +22,7 @@
#include <arpa/nameser.h>
#include <resolv.h>
#include <bits/libc-lock.h>
+#include <sys/stat.h>
/* The following bit is copied from res_data.c (where it is #ifdef'ed
@@ -101,6 +102,20 @@
__res_maybe_init (res_state resp, int preinit)
{
if (resp->options & RES_INIT) {
+ static time_t last_mtime, last_check;
+ time_t now;
+ struct stat statbuf;
+
+ time (&now);
+ if (now != last_check) {
+ last_check = now;
+ if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) {
+ last_mtime = statbuf.st_mtime;
+ atomicinclock (lock);
+ atomicinc (__res_initstamp);
+ atomicincunlock (lock);
+ }
+ }
if (__res_initstamp != resp->_u._ext.initstamp) {
if (resp->nscount > 0) {
__res_nclose (resp);
1.1 src/patchsets/glibc/2.7/1075_all_glibc-section-comments.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/1075_all_glibc-section-comments.patch?rev=1.1&view=markup
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
Index: 1075_all_glibc-section-comments.patch
===================================================================
http://sources.redhat.com/ml/binutils/2004-04/msg00665.html
fixes building on some architectures (like m68k/arm/cris/etc...) because
it does the right thing
--- libc/include/libc-symbols.h
+++ libc/include/libc-symbols.h
@@ -232,12 +232,12 @@
# define __make_section_unallocated(section_string)
# endif
-/* Tacking on "\n\t#" to the section name makes gcc put it's bogus
+/* Tacking on "\n#APP\n\t#" to the section name makes gcc put it's bogus
section attributes on what looks like a comment to the assembler. */
# ifdef HAVE_SECTION_QUOTES
-# define __sec_comment "\"\n\t#\""
+# define __sec_comment "\"\n#APP\n\t#\""
# else
-# define __sec_comment "\n\t#"
+# define __sec_comment "\n#APP\n\t#"
# endif
# define link_warning(symbol, msg) \
__make_section_unallocated (".gnu.warning." #symbol) \
1.1 src/patchsets/glibc/2.7/1090_all_glibc-2.3.6-fix-pr631.patch
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
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
Index: 1090_all_glibc-2.3.6-fix-pr631.patch
===================================================================
>From dank@kegel.com
Wed Jun 15 09:12:43 PDT 2005
Fixes
build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
... 53 lines deleted ...
build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
collect2: ld returned 1 exit status
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
when building glibc with --enable-static-nss.
See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
--- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005
+++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005
@@ -487,7 +487,7 @@
# The static libraries.
ifeq (yes,$(build-static))
-link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
+link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
else
ifeq (yes,$(build-shared))
# We can try to link the programs with lib*_pic.a...
--- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005
+++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005
@@ -115,6 +115,13 @@
install-bin-script = ldd
endif
+ifeq (yes,$(build-static-nss))
+nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
+resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
+otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
+ $(resolvobjdir)/libresolv.a
+endif
+
others = sprof sln
install-bin = sprof
others-static = sln
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
1.1 src/patchsets/glibc/2.7/1100_all_glibc-2.3.3-china.patch
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
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
Index: 1100_all_glibc-2.3.3-china.patch
===================================================================
--- localedata/locales/zh_TW
+++ localedata/locales/zh_TW
@@ -1,7 +1,7 @@
comment_char %
escape_char /
%
-% Chinese language locale for Taiwan R.O.C.
+% Chinese language locale for Taiwan
% charmap: BIG5-CP950
%
% Original Author:
@@ -17,7 +17,7 @@
% Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf
LC_IDENTIFICATION
-title "Chinese locale for Taiwan R.O.C."
+title "Chinese locale for Taiwan"
source ""
address ""
contact ""
@@ -25,7 +25,7 @@
tel ""
fax ""
language "Chinese"
-territory "Taiwan R.O.C."
+territory "Taiwan"
revision "0.2"
date "2000-08-02"
%
1.1 src/patchsets/glibc/2.7/1103_all_glibc-new-valencian-locale.patch
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
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
Index: 1103_all_glibc-new-valencian-locale.patch
===================================================================
http://bugs.gentoo.org/show_bug.cgi?id=131815
http://sourceware.org/bugzilla/show_bug.cgi?id=2522
--- localedata/SUPPORTED
+++ localedata/SUPPORTED
@@ -68,6 +68,8 @@
ca_ES.UTF-8/UTF-8 \
ca_ES/ISO-8859-1 \
ca_ES@euro/ISO-8859-15 \
+ca_ES.UTF-8@valencia/UTF-8 \
+ca_ES@valencia/ISO-8859-15 \
ca_FR.UTF-8/UTF-8 \
ca_FR/ISO-8859-15 \
ca_IT.UTF-8/UTF-8 \
--- localedata/locales/ca_ES@valencia
+++ localedata/locales/ca_ES@valencia
@@ -0,0 +1,96 @@
+comment_char %
+escape_char /
+%
+% Valencian (southern Catalan) locale for Spain with Euro
+%
+% Note that this locale is almost the same as ca_ES@euro. The point of having
+% a separate locale is only for PO translations, which have a lot of social
+% support and are very appreciated by the Valencian-speaking community.
+%
+% Contact: Jordi Mallach
+% Email: jordi@gnu.org
+% Tel:
+% Fax:
+% Language: ca
+% Territory: ES
+% Option: euro
+% Revision: 1.0
+% Date: 2006-04-06
+% Application: general
+% Users: general
+% Repertoiremap: mnemonic,ds
+% Charset: ISO-8859-15
+% Distribution and use is free, also
+% for commercial purposes.
+
+LC_IDENTIFICATION
+title "Valencian (southern Catalan) locale for Spain with Euro"
+source ""
+address ""
+contact "Jordi Mallach"
+email "jordi@gnu.org"
+tel ""
+fax ""
+language "Catalan"
+territory "Spain"
+revision "1.0"
+date "2006-04-06"
+%
+category "ca_ES@valencia:2006";LC_IDENTIFICATION
+category "ca_ES@valencia:2006";LC_CTYPE
+category "ca_ES@valencia:2006";LC_COLLATE
+category "ca_ES@valencia:2006";LC_MONETARY
+category "ca_ES@valencia:2006";LC_NUMERIC
+category "ca_ES@valencia:2006";LC_TIME
+category "ca_ES@valencia:2006";LC_MESSAGES
+category "ca_ES@valencia:2006";LC_PAPER
+category "ca_ES@valencia:2006";LC_NAME
+category "ca_ES@valencia:2006";LC_ADDRESS
+category "ca_ES@valencia:2006";LC_TELEPHONE
+category "ca_ES@valencia:2006";LC_MEASUREMENT
+
+END LC_IDENTIFICATION
+
+LC_CTYPE
+copy "i18n"
+END LC_CTYPE
+
+LC_COLLATE
+copy "ca_ES"
+END LC_COLLATE
+
+LC_MONETARY
+copy "ca_ES"
+END LC_MONETARY
+
+LC_NUMERIC
+copy "ca_ES"
+END LC_NUMERIC
+
+LC_TIME
+copy "ca_ES"
+END LC_TIME
+
+LC_MESSAGES
+copy "ca_ES"
+END LC_MESSAGES
+
+LC_PAPER
+copy "ca_ES"
+END LC_PAPER
+
+LC_NAME
+copy "ca_ES"
+END LC_NAME
+
+LC_ADDRESS
+copy "ca_ES"
+END LC_ADDRESS
+
+LC_TELEPHONE
+copy "ca_ES"
+END LC_TELEPHONE
+
+LC_MEASUREMENT
+copy "ca_ES"
+END LC_MEASUREMENT
1.1 src/patchsets/glibc/2.7/1120_all_glibc-2.5-strict-aliasing.patch
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
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
Index: 1120_all_glibc-2.5-strict-aliasing.patch
===================================================================
workaround strict aliasing warnings on individual files rather than
forcing the whole build with -fno-strict-aliasing
http://bugs.gentoo.org/155906
note that we leave the logout.c and logwtmp.c warnings alone as the
code path that invokes the warning should not be executed when the
warning is applicable.
--- libio/Makefile
+++ libio/Makefile
@@ -90,7 +90,7 @@ CFLAGS-fseeko.c = $(exceptions)
CFLAGS-ftello64.c = $(exceptions)
CFLAGS-ftello.c = $(exceptions)
CFLAGS-fwide.c = $(exceptions)
-CFLAGS-genops.c = $(exceptions)
+CFLAGS-genops.c = $(exceptions) -fno-strict-aliasing
CFLAGS-getc.c = $(exceptions)
CFLAGS-getchar.c = $(exceptions)
CFLAGS-getwc.c = $(exceptions)
@@ -132,7 +132,7 @@ CFLAGS-putwc.c = $(exceptions)
CFLAGS-putwchar.c = $(exceptions)
CFLAGS-rewind.c = $(exceptions)
CFLAGS-wfileops.c = $(exceptions)
-CFLAGS-wgenops.c = $(exceptions)
+CFLAGS-wgenops.c = $(exceptions) -fno-strict-aliasing
CFLAGS-oldiofopen.c = $(exceptions)
CFLAGS-iofopen.c = $(exceptions)
CFLAGS-iofopen64.c = $(exceptions)
--- sunrpc/Makefile
+++ sunrpc/Makefile
@@ -127,6 +127,6 @@ CFLAGS-pmap_rmt.c = -fexceptions
CFLAGS-clnt_perr.c = -fexceptions
CFLAGS-openchild.c = -fexceptions
-CPPFLAGS += -D_RPC_THREAD_SAFE_
+CPPFLAGS += -D_RPC_THREAD_SAFE_ -fno-strict-aliasing
include ../Rules
--- nis/Makefile
+++ nis/Makefile
@@ -67,6 +67,9 @@ libnss_nisplus-routines := $(addprefix n
nss-nisplus nisplus-initgroups
libnss_nisplus-inhibit-o = $(filter-out .os,$(object-suffixes))
+CFLAGS-nis_xdr.c += -fno-strict-aliasing
+CFLAGS-yp_xdr.c += -fno-strict-aliasing
+
include ../Rules
--- nss/Makefile
+++ nss/Makefile
@@ -71,6 +71,8 @@ ifneq ($(build-static-nss),yes)
libnss_files-inhibit-o = $(filter-out .os,$(object-suffixes))
endif
+CFLAGS-nsswitch.c += -fno-strict-aliasing
+
include ../Rules
--- nptl/Makefile
+++ nptl/Makefile
@@ -192,6 +192,8 @@
CFLAGS-pt-system.c = -fexceptions
+CFLAGS-unwind-dw2.c += -fno-strict-aliasing
+
# Don't generate deps for calls with no sources. See sysdeps/unix/Makefile.
omit-deps = $(unix-syscalls:%=ptw-%)
1.1 src/patchsets/glibc/2.7/1130_all_glibc-2.4-undefine-__i686.patch
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
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
Index: 1130_all_glibc-2.4-undefine-__i686.patch
===================================================================
If gcc is configured to generate i686 code or better by default (like
when using the --with-arch=pentium3 configure option), then the __i686
macro will always be defined automatically and thus screw up the
compilation of some .S files.
http://bugs.gentoo.org/131108
http://sourceware.org/ml/libc-alpha/2006-04/msg00090.html
2006-04-25 Mike Frysinger <vapier@gentoo.org>
* sysdeps/i386/sysdep.h (__i686): Undefine.
--- sysdeps/i386/sysdep.h
+++ sysdeps/i386/sysdep.h
@@ -17,6 +17,14 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+/*
+ * When building for i686 targets or better, gcc automatically defines
+ * '__i686' to '1' for us which causes trouble when using section names
+ * like '__i686.get_pc_thunk.reg'. Since we check for __i686__ in the
+ * code, killing '__i686' shouldn't be a problem.
+ */
+#undef __i686
+
#include <sysdeps/generic/sysdep.h>
#ifdef __ASSEMBLER__
Note: this breaks mips so we wrap it in a hackish __i686__ for now ...
2006-04-25 Mike Frysinger <vapier@gentoo.org>
* sysdeps/pthread/pt-initfini.c: Include sysdep.h.
--- nptl/sysdeps/pthread/pt-initfini.c
+++ nptl/sysdeps/pthread/pt-initfini.c
@@ -45,6 +45,9 @@
/* Embed an #include to pull in the alignment and .end directives. */
asm ("\n#include \"defs.h\"");
+/* Embed an #include to pull in asm settings. */
+asm ("\n#ifdef __i686__\n#include <sysdep.h>\n#endif");
+
/* The initial common code ends here. */
asm ("\n/*@HEADER_ENDS*/");
1.1 src/patchsets/glibc/2.7/1530_all_glibc-m68k-sys-user.patch
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
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
Index: 1530_all_glibc-m68k-sys-user.patch
===================================================================
copied from kernel as it is sanitized now
--- libc/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h
+++ libc/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h
@@ -0,0 +1,87 @@
+#ifndef _SYS_USER_H
+#define _SYS_USER_H
+
+/* Core file format: The core file is written in such a way that gdb
+ can understand it and provide useful information to the user (under
+ linux we use the 'trad-core' bfd). There are quite a number of
+ obstacles to being able to view the contents of the floating point
+ registers, and until these are solved you will not be able to view the
+ contents of them. Actually, you can read in the core file and look at
+ the contents of the user struct to find out what the floating point
+ registers contain.
+ The actual file contents are as follows:
+ UPAGE: 1 page consisting of a user struct that tells gdb what is present
+ in the file. Directly after this is a copy of the task_struct, which
+ is currently not used by gdb, but it may come in useful at some point.
+ All of the registers are stored as part of the upage. The upage should
+ always be only one page.
+ DATA: The data area is stored. We use current->end_text to
+ current->brk to pick up all of the user variables, plus any memory
+ that may have been malloced. No attempt is made to determine if a page
+ is demand-zero or if a page is totally unused, we just cover the entire
+ range. All of the addresses are rounded in such a way that an integral
+ number of pages is written.
+ STACK: We need the stack information in order to get a meaningful
+ backtrace. We need to write the data from (esp) to
+ current->start_stack, so we round each of these off in order to be able
+ to write an integer number of pages.
+ The minimum core file size is 3 pages, or 12288 bytes.
+*/
+
+struct user_m68kfp_struct {
+ unsigned long fpregs[8*3]; /* fp0-fp7 registers */
+ unsigned long fpcntl[3]; /* fp control regs */
+};
+
+/* This is the old layout of "struct pt_regs" as of Linux 1.x, and
+ is still the layout used by user (the new pt_regs doesn't have
+ all registers). */
+struct user_regs_struct {
+ long d1,d2,d3,d4,d5,d6,d7;
+ long a0,a1,a2,a3,a4,a5,a6;
+ long d0;
+ long usp;
+ long orig_d0;
+ short stkadj;
+ short sr;
+ long pc;
+ short fmtvec;
+ short __fill;
+};
+
+
+/* When the kernel dumps core, it starts by dumping the user struct -
+ this will be used by gdb to figure out where the data and stack segments
+ are within the file, and what virtual addresses to use. */
+struct user{
+/* We start with the registers, to mimic the way that "memory" is returned
+ from the ptrace(3,...) function. */
+ struct user_regs_struct regs; /* Where the registers are actually stored */
+/* ptrace does not yet supply these. Someday.... */
+ int u_fpvalid; /* True if math co-processor being used. */
+ /* for this mess. Not yet used. */
+ struct user_m68kfp_struct m68kfp; /* Math Co-processor registers. */
+/* The rest of this junk is to help gdb figure out what goes where */
+ unsigned long int u_tsize; /* Text segment size (pages). */
+ unsigned long int u_dsize; /* Data segment size (pages). */
+ unsigned long int u_ssize; /* Stack segment size (pages). */
+ unsigned long start_code; /* Starting virtual address of text. */
+ unsigned long start_stack; /* Starting virtual address of stack area.
+ This is actually the bottom of the stack,
+ the top of the stack is always found in the
+ esp register. */
+ long int signal; /* Signal that caused the core dump. */
+ int reserved; /* No longer used */
+ struct user_regs_struct *u_ar0;
+ /* Used by gdb to help find the values for */
+ /* the registers. */
+ struct user_m68kfp_struct* u_fpstate; /* Math Co-processor pointer. */
+ unsigned long magic; /* To uniquely identify a core file */
+ char u_comm[32]; /* User command that was responsible */
+};
+#define NBPG 4096
+#define UPAGES 1
+#define HOST_TEXT_START_ADDR (u.start_code)
+#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
+
+#endif
1.1 src/patchsets/glibc/2.7/3000_all_2.3.6-dl_execstack-PaX-support.patch
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
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
Index: 3000_all_2.3.6-dl_execstack-PaX-support.patch
===================================================================
With latest versions of glibc, a lot of apps failed on a PaX enabled
system with:
cannot enable executable stack as shared object requires: Permission denied
This is due to PaX 'exec-protecting' the stack, and ld.so then trying
to make the stack executable due to some libraries not containing the
PT_GNU_STACK section. Bug #32960. <azarah@gentoo.org> (12 Nov 2003).
Patch also NPTL. Bug #116086. <kevquinn@gentoo.org> (20 Dec 2005).
--- sysdeps/unix/sysv/linux/dl-execstack.c
+++ sysdeps/unix/sysv/linux/dl-execstack.c
@@ -63,7 +63,10 @@
else
# endif
{
- result = errno;
+ if (errno == EACCES) /* PAX is enabled */
+ result = 0;
+ else
+ result = errno;
goto out;
}
}
@@ -89,7 +92,12 @@
page -= size;
else
{
- if (errno != ENOMEM) /* Unexpected failure mode. */
+ if (errno == EACCES) /* PAX is enabled */
+ {
+ result = 0;
+ goto out;
+ }
+ else if (errno != ENOMEM) /* Unexpected failure mode. */
{
result = errno;
goto out;
@@ -115,7 +123,12 @@
page += size;
else
{
- if (errno != ENOMEM) /* Unexpected failure mode. */
+ if (errno == EACCES) /* PAX is enabled */
+ {
+ result = 0;
+ goto out;
+ }
+ else if (errno != ENOMEM) /* Unexpected failure mode. */
{
result = errno;
goto out;
--- nptl/allocatestack.c
+++ nptl/allocatestack.c
@@ -279,7 +279,8 @@
size_t len = pd->stackblock_size - pd->guardsize;
#endif
if (mprotect (stack, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0)
- return errno;
+ if (errno != EACCES) /* PAX is enabled */
+ return errno;
return 0;
}
1.1 src/patchsets/glibc/2.7/3010_all_2.3.3_pre20040117-pt_pax.patch
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
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
Index: 3010_all_2.3.3_pre20040117-pt_pax.patch
===================================================================
--- elf/elf.h
+++ elf/elf.h
@@ -568,6 +568,7 @@
#define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */
#define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */
#define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */
+#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */
#define PT_LOSUNW 0x6ffffffa
#define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */
#define PT_SUNWSTACK 0x6ffffffb /* Stack segment */
@@ -581,6 +582,18 @@
#define PF_X (1 << 0) /* Segment is executable */
#define PF_W (1 << 1) /* Segment is writable */
#define PF_R (1 << 2) /* Segment is readable */
+#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */
+#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */
+#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */
+#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */
+#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */
+#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */
+#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */
+#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */
+#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */
+#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */
+#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */
+#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */
#define PF_MASKOS 0x0ff00000 /* OS-specific */
#define PF_MASKPROC 0xf0000000 /* Processor-specific */
1.1 src/patchsets/glibc/2.7/3020_all_glibc-tests-sandbox-libdl-paths.patch
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
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
Index: 3020_all_glibc-tests-sandbox-libdl-paths.patch
===================================================================
when glibc runs its tests, it does so by invoking the local library loader.
in Gentoo, we build/run inside of our "sandbox" which itself is linked against
libdl (so that it can load libraries and pull out symbols). the trouble
is that when you upgrade from an older glibc to the new one, often times
internal symbols change name or abi. this is normally OK as you cannot use
libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so
we always say "keep all of the glibc libraries from the same build". but
when glibc runs its tests, it uses dynamic paths to point to its new local
copies of libraries. if the test doesnt use libdl, then glibc doesnt add
its path, and when sandbox triggers the loading of libdl, glibc does so
from the host system system. this gets us into the case of all libraries
are from the locally compiled version of glibc except for libdl.so.
Fix by Wormo
http://bugs.gentoo.org/56898
--- libc/grp/tst_fgetgrent.sh
+++ libc/grp/tst_fgetgrent.sh
@@ -24,7 +24,8 @@
rtld_installed_name=$1; shift
testout=${common_objpfx}/grp/tst_fgetgrent.out
-library_path=${common_objpfx}
+# make sure libdl is also in path in case sandbox is in use
+library_path=${common_objpfx}:${common_objpfx}/dlfcn
result=0
--- libc/iconvdata/run-iconv-test.sh
+++ libc/iconvdata/run-iconv-test.sh
@@ -34,7 +34,7 @@
export GCONV_PATH
# We have to have some directories in the library path.
-LIBPATH=$codir:$codir/iconvdata
+LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn
# How the start the iconv(1) program.
ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \
--- libc/iconvdata/tst-table.sh
+++ libc/iconvdata/tst-table.sh
@@ -59,8 +59,11 @@
irreversible=${charset}.irreversible
fi
+# make sure libdl is also in path in case sandbox is in use
+library_path=${common_objpfx}:${common_objpfx}/dlfcn
+
# iconv in one direction.
-${common_objpfx}elf/ld.so --library-path $common_objpfx \
+${common_objpfx}elf/ld.so --library-path $library_path \
${objpfx}tst-table-from ${charset} \
> ${objpfx}tst-${charset}.table
--- libc/intl/tst-codeset.sh
+++ libc/intl/tst-codeset.sh
@@ -37,6 +37,9 @@
LOCPATH=${common_objpfx}localedata
export LOCPATH
+# make sure libdl is also in path in case sandbox is in use
+library_path=${common_objpfx}:${common_objpfx}/dlfcn
+
${common_objpfx}elf/ld.so --library-path $common_objpfx \
${objpfx}tst-codeset > ${objpfx}tst-codeset.out
--- libc/intl/tst-gettext.sh
+++ libc/intl/tst-gettext.sh
@@ -51,9 +51,12 @@
LOCPATH=${common_objpfx}localedata
export LOCPATH
+# make sure libdl is also in path in case sandbox is in use
+library_path=${common_objpfx}:${common_objpfx}/dlfcn
+
# Now run the test.
MALLOC_TRACE=$malloc_trace LOCPATH=${objpfx}localedir:$LOCPATH \
-${common_objpfx}elf/ld.so --library-path $common_objpfx \
+${common_objpfx}elf/ld.so --library-path $library_path \
${objpfx}tst-gettext > ${objpfx}tst-gettext.out ${objpfx}domaindir
exit $?
--- libc/intl/tst-gettext2.sh
+++ libc/intl/tst-gettext2.sh
@@ -65,8 +65,11 @@
LOCPATH=${objpfx}domaindir
export LOCPATH
+# make sure libdl is also in path in case sandbox is in use
+library_path=${common_objpfx}:${common_objpfx}/dlfcn
+
# Now run the test.
-${common_objpfx}elf/ld.so --library-path $common_objpfx \
+${common_objpfx}elf/ld.so --library-path $library_path \
${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir &&
cmp ${objpfx}tst-gettext2.out - <<EOF
String1 - Lang1: 1st string
--- libc/intl/tst-translit.sh
+++ libc/intl/tst-translit.sh
@@ -36,7 +36,10 @@
LOCPATH=${common_objpfx}localedata
export LOCPATH
-${common_objpfx}elf/ld.so --library-path $common_objpfx \
+# make sure libdl is also in path in case sandbox is in use
+library_path=${common_objpfx}:${common_objpfx}/dlfcn
+
+${common_objpfx}elf/ld.so --library-path $library_path \
${objpfx}tst-translit > ${objpfx}tst-translit.out ${objpfx}domaindir
exit $?
--- libc/malloc/tst-mtrace.sh
+++ libc/malloc/tst-mtrace.sh
@@ -24,9 +24,12 @@
status=0
trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15
+# make sure libdl is also in path in case sandbox is in use
+library_path=${common_objpfx}:${common_objpfx}/dlfcn
+
MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \
LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \
-${common_objpfx}elf/ld.so --library-path $common_objpfx \
+${common_objpfx}elf/ld.so --library-path $library_path \
${common_objpfx}malloc/tst-mtrace || status=1
if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then
--- libc/nptl/tst-tls6.sh
+++ libc/nptl/tst-tls6.sh
@@ -5,8 +5,8 @@
rtld_installed_name=$1; shift
logfile=$common_objpfx/nptl/tst-tls6.out
-# We have to find libc and nptl
-library_path=${common_objpfx}:${common_objpfx}nptl
+# We have to find libc and nptl (also libdl in case sandbox is in use)
+library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn
tst_tls5="${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
${common_objpfx}/nptl/tst-tls5"
--- libc/posix/globtest.sh
+++ libc/posix/globtest.sh
@@ -18,7 +18,7 @@
esac
# We have to find the libc and the NSS modules.
-library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod
+library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod:${common_objpfx}/dlfcn
# Since we use `sort' we must make sure to use the same locale everywhere.
LC_ALL=C
--- libc/posix/tst-getconf.sh
+++ libc/posix/tst-getconf.sh
@@ -10,7 +10,10 @@
else
rtld_installed_name=$1; shift
runit() {
- ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} "$@"
+
+ # make sure libdl is also in path in case sandbox is in use
+ library_path=${common_objpfx}:${common_objpfx}/dlfcn
+ ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} "$@"
}
fi
--- libc/posix/wordexp-tst.sh
+++ libc/posix/wordexp-tst.sh
@@ -19,8 +19,11 @@
"
export IFS
+# make sure libdl is also in path in case sandbox is in use
+library_path=${common_objpfx}:${common_objpfx}/dlfcn
+
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \
+${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
${common_objpfx}posix/wordexp-test '$*' > ${testout}1
cat <<"EOF" | cmp - ${testout}1 >> $logfile || failed=1
wordexp returned 0
1.1 src/patchsets/glibc/2.7/5063_all_glibc-dont-build-timezone.patch
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
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
Index: 5063_all_glibc-dont-build-timezone.patch
===================================================================
timezone data has been split into the package sys-libs/timezone-data
--- glibc-2.4/Makeconfig
+++ glibc-2.4/Makeconfig
@@ -906,7 +906,7 @@
stdlib stdio-common libio malloc string wcsmbs time dirent \
grp pwd posix io termios resource misc socket sysvipc gmon \
gnulib iconv iconvdata wctype manual shadow po argp \
- crypt nss localedata timezone rt conform debug \
+ crypt nss localedata rt conform debug \
$(add-on-subdirs) $(dlfcn) $(binfmt-subdir)
ifndef avoid-generated
1.1 src/patchsets/glibc/2.7/5070_all_glibc-2.7-cross-compile-nptl.patch
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
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
Index: 5070_all_glibc-2.7-cross-compile-nptl.patch
===================================================================
A little hack for cross-compiling NPTL
http://sourceware.org/ml/libc-alpha/2005-02/msg00043.html
--- libc/nptl/sysdeps/pthread/configure.in
+++ libc/nptl/sysdeps/pthread/configure.in
@@ -28,6 +28,9 @@
struct _Unwind_Context *context;
_Unwind_GetCFA (context)],
libc_cv_forced_unwind=yes, libc_cv_forced_unwind=no)])
+if test $libc_cv_forced_unwind = no -a $build_cpu != $host_cpu; then
+ libc_cv_forced_unwind=yes
+fi
if test $libc_cv_forced_unwind = yes; then
AC_DEFINE(HAVE_FORCED_UNWIND)
dnl Check for C cleanup handling.
@@ -41,6 +44,9 @@
puts ("test")],
libc_cv_c_cleanup=yes, libc_cv_c_cleanup=no)])
CFLAGS="$old_CFLAGS"
+ if test $libc_cv_c_cleanup = no -a $build_cpu != $host_cpu; then
+ libc_cv_c_cleanup=yes
+ fi
if test $libc_cv_c_cleanup = no; then
AC_MSG_ERROR([the compiler must support C cleanup handling])
fi
--- libc/nptl/sysdeps/pthread/configure
+++ libc/nptl/sysdeps/pthread/configure
@@ -78,6 +78,10 @@
fi
{ echo "$as_me:$LINENO: result: $libc_cv_forced_unwind" >&5
echo "${ECHO_T}$libc_cv_forced_unwind" >&6; }
+if test $libc_cv_forced_unwind = no -a $build_cpu != $host_cpu; then
+ echo "$as_me:$LINENO: forcing libc_cv_forced_unwind = yes for cross-compile"
+ libc_cv_forced_unwind=yes
+fi
if test $libc_cv_forced_unwind = yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_FORCED_UNWIND 1
@@ -147,6 +151,10 @@
{ echo "$as_me:$LINENO: result: $libc_cv_c_cleanup" >&5
echo "${ECHO_T}$libc_cv_c_cleanup" >&6; }
CFLAGS="$old_CFLAGS"
+ if test $libc_cv_c_cleanup = no -a $build_cpu != $host_cpu; then
+ echo "$as_me:$LINENO: result: forcing libc_cv_c_cleanup = yes for cross-compile"
+ libc_cv_c_cleanup=yes
+ fi
if test $libc_cv_c_cleanup = no; then
{ { echo "$as_me:$LINENO: error: the compiler must support C cleanup handling" >&5
echo "$as_me: error: the compiler must support C cleanup handling" >&2;}
1.1 src/patchsets/glibc/2.7/6001_all_alpha-glibc-2.4-xstat.patch
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
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
Index: 6001_all_alpha-glibc-2.4-xstat.patch
===================================================================
http://sources.redhat.com/bugzilla/show_bug.cgi?id=1026
http://sourceware.org/ml/libc-alpha/2005-02/msg00122.html
2005-02-26 GOTO Masanori <gotom@debian.or.jp>
* sysdeps/unix/sysv/linux/kernel-features.h: Define
__ASSUME_STAT64_SYSCALL.
* sysdeps/unix/sysv/linux/alpha/fxstat.c: Check
__ASSUME_STAT64_SYSCALL.
* sysdeps/unix/sysv/linux/alpha/fxstatat.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/lxstat.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/xstat.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/xstatconv.c: Don't define
__libc_missing_axp_stat64 when it's not needed.
* sysdeps/unix/sysv/linux/alpha/xstatconv.h: Likewise.
--- sysdeps/unix/sysv/linux/kernel-features.h
+++ sysdeps/unix/sysv/linux/kernel-features.h
@@ -412,6 +412,11 @@
# define __ASSUME_GETDENTS32_D_TYPE 1
#endif
+/* Starting with version 2.6.4, alpha stat64 syscalls are available. */
+#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__
+# define __ASSUME_STAT64_SYSCALL 1
+#endif
+
/* Starting with version 2.5.3, the initial location returned by `brk'
after exec is always rounded up to the next page. */
#if __LINUX_KERNEL_VERSION >= 132355
--- sysdeps/unix/sysv/linux/alpha/fxstat.c
+++ sysdeps/unix/sysv/linux/alpha/fxstat.c
@@ -35,27 +35,39 @@ int
__fxstat (int vers, int fd, struct stat *buf)
{
INTERNAL_SYSCALL_DECL (err);
- int result, errno_out;
+ int result;
struct kernel_stat kbuf;
+#if __ASSUME_STAT64_SYSCALL > 0
+ if (vers == _STAT_VER_KERNEL64)
+ {
+ result = INTERNAL_SYSCALL (fstat64, err, 2, fd, buf);
+ if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+ return result;
+ __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
+ return -1;
+ }
+#elif defined __NR_fstat64
if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
{
+ int errno_out;
result = INTERNAL_SYSCALL (fstat64, err, 2, fd, buf);
if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
return result;
errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
if (errno_out != ENOSYS)
- goto fail;
+ {
+ __set_errno (errno_out);
+ return -1;
+ }
__libc_missing_axp_stat64 = 1;
}
+#endif
result = INTERNAL_SYSCALL (fstat, err, 2, fd, &kbuf);
if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
return __xstat_conv (vers, &kbuf, buf);
- errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
-
- fail:
- __set_errno (errno_out);
+ __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
return -1;
}
hidden_def (__fxstat)
--- sysdeps/unix/sysv/linux/alpha/fxstatat.c
+++ sysdeps/unix/sysv/linux/alpha/fxstatat.c
@@ -65,6 +65,20 @@ __fxstatat (int vers, int fd, const char
int result, errno_out;
struct kernel_stat kst;
+#if __ASSUME_STAT64_SYSCALL > 0
+ if (vers == _STAT_VER_KERNEL64)
+ {
+ if (flag & AT_SYMLINK_NOFOLLOW)
+ result = INTERNAL_SYSCALL (lstat64, err, 2, file, st);
+ else
+ result = INTERNAL_SYSCALL (stat64, err, 2, file, st);
+
+ if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+ return result;
+ errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
+ goto fail;
+ }
+#elif defined __NR_stat64
if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
{
if (flag & AT_SYMLINK_NOFOLLOW)
@@ -79,6 +93,7 @@ __fxstatat (int vers, int fd, const char
goto fail;
__libc_missing_axp_stat64 = 1;
}
+#endif
if (flag & AT_SYMLINK_NOFOLLOW)
result = INTERNAL_SYSCALL (lstat, err, 2, file, &kst);
--- sysdeps/unix/sysv/linux/alpha/lxstat.c
+++ sysdeps/unix/sysv/linux/alpha/lxstat.c
@@ -35,27 +35,39 @@ int
__lxstat (int vers, const char *name, struct stat *buf)
{
INTERNAL_SYSCALL_DECL (err);
- int result, errno_out;
+ int result;
struct kernel_stat kbuf;
+#if __ASSUME_STAT64_SYSCALL > 0
+ if (vers == _STAT_VER_KERNEL64)
+ {
+ result = INTERNAL_SYSCALL (lstat64, err, 2, name, buf);
+ if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+ return result;
+ __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
+ return -1;
+ }
+#elif defined __NR_lstat64
if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
{
+ int errno_out;
result = INTERNAL_SYSCALL (lstat64, err, 2, name, buf);
if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
return result;
errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
if (errno_out != ENOSYS)
- goto fail;
+ {
+ __set_errno (errno_out);
+ return -1;
+ }
__libc_missing_axp_stat64 = 1;
}
+#endif
result = INTERNAL_SYSCALL (lstat, err, 2, name, &kbuf);
if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
return __xstat_conv (vers, &kbuf, buf);
- errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
-
- fail:
- __set_errno (errno_out);
+ __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
return -1;
}
hidden_def (__lxstat)
--- sysdeps/unix/sysv/linux/alpha/xstat.c
+++ sysdeps/unix/sysv/linux/alpha/xstat.c
@@ -35,27 +35,39 @@ int
__xstat (int vers, const char *name, struct stat *buf)
{
INTERNAL_SYSCALL_DECL (err);
- int result, errno_out;
+ int result;
struct kernel_stat kbuf;
+#if __ASSUME_STAT64_SYSCALL > 0
+ if (vers == _STAT_VER_KERNEL64)
+ {
+ result = INTERNAL_SYSCALL (stat64, err, 2, name, buf);
+ if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+ return result;
+ __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
+ return -1;
+ }
+#elif defined __NR_stat64
if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
{
+ int errno_out;
result = INTERNAL_SYSCALL (stat64, err, 2, name, buf);
if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
return result;
errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
if (errno_out != ENOSYS)
- goto fail;
+ {
+ __set_errno (errno_out);
+ return -1;
+ }
__libc_missing_axp_stat64 = 1;
}
+#endif
result = INTERNAL_SYSCALL (stat, err, 2, name, &kbuf);
if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
return __xstat_conv (vers, &kbuf, buf);
- errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
-
- fail:
- __set_errno (errno_out);
+ __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
return -1;
}
hidden_def (__xstat)
--- sysdeps/unix/sysv/linux/alpha/xstatconv.c
+++ sysdeps/unix/sysv/linux/alpha/xstatconv.c
@@ -22,9 +22,14 @@
#include <sys/stat.h>
#include <kernel_stat.h>
#include <xstatconv.h>
+#include <sys/syscall.h>
+#ifdef __NR_stat64
+# if __ASSUME_STAT64_SYSCALL == 0
int __libc_missing_axp_stat64;
+# endif
+#endif
int
__xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
--- sysdeps/unix/sysv/linux/alpha/xstatconv.h
+++ sysdeps/unix/sysv/linux/alpha/xstatconv.h
@@ -18,7 +18,12 @@
02111-1307 USA. */
#include <kernel-features.h>
+#include <sys/syscall.h>
+#ifdef __NR_stat64
+# if __ASSUME_STAT64_SYSCALL == 0
extern int __libc_missing_axp_stat64 attribute_hidden;
+# endif
+#endif
extern int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
attribute_hidden;
1.1 src/patchsets/glibc/2.7/6015_all_alpha-glibc-2.5-no-page-header.patch
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
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
Index: 6015_all_alpha-glibc-2.5-no-page-header.patch
===================================================================
2007-03-13 Mike Frysinger <vapier@gentoo.org>
* sysdeps/unix/sysv/linux/alpha/sys/user.h: Include unistd.h rather
than asm/page.h.
(NBPG): Define to getpagesize().
--- sysdeps/unix/sysv/linux/alpha/sys/user.h
+++ sysdeps/unix/sysv/linux/alpha/sys/user.h
@@ -23,7 +23,7 @@
only. Don't read too much into it. Don't use it for anything other
than gdb/strace unless you know what you are doing. */
-#include <asm/page.h>
+#include <unistd.h>
#include <asm/reg.h>
struct user
@@ -41,7 +41,7 @@ struct user
char u_comm[32]; /* user command name */
};
-#define NBPG PAGE_SIZE
+#define NBPG getpagesize()
#define UPAGES 1
#define HOST_TEXT_START_ADDR (u.start_code)
#define HOST_DATA_START_ADDR (u.start_data)
1.1 src/patchsets/glibc/2.7/6016_all_alpha-glibc-2.5-no-asm-elf-header.patch
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
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
Index: 6016_all_alpha-glibc-2.5-no-asm-elf-header.patch
===================================================================
2007-03-13 Mike Frysinger <vapier@gentoo.org>
* sysdeps/unix/sysv/linux/alpha/sys/procfs.h: Copy some defines
from alpha's asm/elf.h
--- libc/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
+++ libc/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
@@ -29,10 +29,23 @@
#include <sys/types.h>
#include <sys/ucontext.h>
#include <sys/user.h>
-#include <asm/elf.h>
__BEGIN_DECLS
+/*
+ * The OSF/1 version of <sys/procfs.h> makes gregset_t 46 entries long.
+ * I have no idea why that is so. For now, we just leave it at 33
+ * (32 general regs + processor status word).
+ */
+#define ELF_NGREG 33
+#define ELF_NFPREG 32
+
+typedef unsigned long elf_greg_t;
+typedef elf_greg_t elf_gregset_t[ELF_NGREG];
+
+typedef double elf_fpreg_t;
+typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
+
struct elf_siginfo
{
int si_signo; /* Signal number. */
1.1 src/patchsets/glibc/2.7/6220_all_glibc-2.4-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
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
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
Index: 6220_all_glibc-2.4-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
===================================================================
http://yann.poupet.free.fr/ep93xx/
Add support for the Maverick Crunch FPU on Cirrus EP93XX processor series
--- ports/sysdeps/arm/bits/endian.h
+++ ports/sysdeps/arm/bits/endian.h
@@ -12,7 +12,7 @@
/* FPA floating point units are always big-endian, irrespective of the
CPU endianness. VFP floating point units use the same endianness
as the rest of the system. */
-#ifdef __VFP_FP__
+#if defined __VFP_FP__ || defined __MAVERICK__
#define __FLOAT_WORD_ORDER __BYTE_ORDER
#else
#define __FLOAT_WORD_ORDER __BIG_ENDIAN
--- ports/sysdeps/arm/fpu/bits/fenv.h
+++ ports/sysdeps/arm/fpu/bits/fenv.h
@@ -20,6 +20,45 @@
# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
#endif
+#if defined(__MAVERICK__)
+
+/* Define bits representing exceptions in the FPU status word. */
+enum
+ {
+ FE_INVALID = 1,
+#define FE_INVALID FE_INVALID
+ FE_OVERFLOW = 4,
+#define FE_OVERFLOW FE_OVERFLOW
+ FE_UNDERFLOW = 8,
+#define FE_UNDERFLOW FE_UNDERFLOW
+ FE_INEXACT = 16,
+#define FE_INEXACT FE_INEXACT
+ };
+
+/* Amount to shift by to convert an exception to a mask bit. */
+#define FE_EXCEPT_SHIFT 5
+
+/* All supported exceptions. */
+#define FE_ALL_EXCEPT \
+ (FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
+
+/* IEEE rounding modes. */
+enum
+ {
+ FE_TONEAREST = 0,
+#define FE_TONEAREST FE_TONEAREST
+ FE_TOWARDZERO = 0x400,
+#define FE_TOWARDZERO FE_TOWARDZERO
+ FE_DOWNWARD = 0x800,
+#define FE_DOWNWARD FE_DOWNWARD
+ FE_UPWARD = 0xc00,
+#define FE_UPWARD FE_UPWARD
+ };
+
+#define FE_ROUND_MASK (FE_UPWARD)
+
+#else /* FPA */
+
/* Define bits representing exceptions in the FPU status word. */
enum
{
@@ -44,6 +83,8 @@
modes exist, but you have to encode them in the actual instruction. */
#define FE_TONEAREST 0
+#endif
+
/* Type representing exception flags. */
typedef unsigned long int fexcept_t;
--- ports/sysdeps/arm/fpu/bits/setjmp.h
+++ ports/sysdeps/arm/fpu/bits/setjmp.h
@@ -28,7 +28,11 @@
#ifndef _ASM
/* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not
saved. */
+#ifdef __MAVERICK__
+typedef int __jmp_buf[34];
+#else
typedef int __jmp_buf[22];
#endif
+#endif
#endif
--- ports/sysdeps/arm/fpu/jmpbuf-offsets.h
+++ ports/sysdeps/arm/fpu/jmpbuf-offsets.h
@@ -17,4 +17,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#ifdef __MAVERICK__
+#define __JMP_BUF_SP 32
+#else
#define __JMP_BUF_SP 20
+#endif
--- ports/sysdeps/arm/fpu/fegetround.c
+++ ports/sysdeps/arm/fpu/fegetround.c
@@ -18,9 +18,21 @@
02111-1307 USA. */
#include <fenv.h>
+#include <fpu_control.h>
int
fegetround (void)
{
+#if defined(__MAVERICK__)
+
+ unsigned long temp;
+
+ _FPU_GETCW (temp);
+ return temp & FE_ROUND_MASK;
+
+#else /* FPA */
+
return FE_TONEAREST; /* Easy. :-) */
+
+#endif
}
--- ports/sysdeps/arm/fpu/fesetround.c
+++ ports/sysdeps/arm/fpu/fesetround.c
@@ -18,12 +18,28 @@
02111-1307 USA. */
#include <fenv.h>
+#include <fpu_control.h>
int
fesetround (int round)
{
+#if defined(__MAVERICK__)
+ unsigned long temp;
+
+ if (round & ~FE_ROUND_MASK)
+ return 1;
+
+ _FPU_GETCW (temp);
+ temp = (temp & ~FE_ROUND_MASK) | round;
+ _FPU_SETCW (temp);
+ return 0;
+
+#else /* FPA */
+
/* We only support FE_TONEAREST, so there is no need for any work. */
return (round == FE_TONEAREST)?0:1;
+
+#endif
}
libm_hidden_def (fesetround)
--- ports/sysdeps/arm/fpu/fpu_control.h
+++ ports/sysdeps/arm/fpu/fpu_control.h
@@ -1,5 +1,6 @@
/* FPU control word definitions. ARM version.
- Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 2000, 2005
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,6 +21,79 @@
#ifndef _FPU_CONTROL_H
#define _FPU_CONTROL_H
+#if defined(__MAVERICK__)
+
+/* DSPSC register: (from EP9312 User's Guide)
+ *
+ * bits 31..29 - DAID
+ * bits 28..26 - HVID
+ * bits 25..24 - RSVD
+ * bit 23 - ISAT
+ * bit 22 - UI
+ * bit 21 - INT
+ * bit 20 - AEXC
+ * bits 19..18 - SAT
+ * bits 17..16 - FCC
+ * bit 15 - V
+ * bit 14 - FWDEN
+ * bit 13 - Invalid
+ * bit 12 - Denorm
+ * bits 11..10 - RM
+ * bits 9..5 - IXE, UFE, OFE, RSVD, IOE
+ * bits 4..0 - IX, UF, OF, RSVD, IO
+ */
+
+/* masking of interrupts */
+#define _FPU_MASK_IM (1 << 5) /* invalid operation */
+#define _FPU_MASK_ZM 0 /* divide by zero */
+#define _FPU_MASK_OM (1 << 7) /* overflow */
+#define _FPU_MASK_UM (1 << 8) /* underflow */
+#define _FPU_MASK_PM (1 << 9) /* inexact */
+#define _FPU_MASK_DM 0 /* denormalized operation */
+
+#define _FPU_RESERVED 0xfffff000 /* These bits are reserved. */
+
+#define _FPU_DEFAULT 0x00b00000 /* Default value. */
+#define _FPU_IEEE 0x00b003a0 /* Default + exceptions enabled. */
+
+/* Type of the control word. */
+typedef unsigned int fpu_control_t;
+
+/* Macros for accessing the hardware control word. */
+#define _FPU_GETCW(cw) ({ \
+ register int __t1, __t2; \
+ \
+ __asm__ volatile ( \
+ "cfmvr64l %1, mvdx0\n\t" \
+ "cfmvr64h %2, mvdx0\n\t" \
+ "cfmv32sc mvdx0, dspsc\n\t" \
+ "cfmvr64l %0, mvdx0\n\t" \
+ "cfmv64lr mvdx0, %1\n\t" \
+ "cfmv64hr mvdx0, %2" \
+ : "=r" (cw), "=r" (__t1), "=r" (__t2) \
+ ); \
+})
+
+#define _FPU_SETCW(cw) ({ \
+ register int __t0, __t1, __t2; \
+ \
+ __asm__ volatile ( \
+ "cfmvr64l %1, mvdx0\n\t" \
+ "cfmvr64h %2, mvdx0\n\t" \
+ "cfmv64lr mvdx0, %0\n\t" \
+ "cfmvsc32 dspsc, mvdx0\n\t" \
+ "cfmv64lr mvdx0, %1\n\t" \
+ "cfmv64hr mvdx0, %2" \
+ : "=r" (__t0), "=r" (__t1), "=r" (__t2) \
+ : "0" (cw) \
+ ); \
+})
+
+/* Default control word set at startup. */
+extern fpu_control_t __fpu_control;
+
+#else /* FPA */
+
/* We have a slight terminology confusion here. On the ARM, the register
* we're interested in is actually the FPU status word - the FPU control
* word is something different (which is implementation-defined and only
@@ -99,4 +173,6 @@
/* Default control word set at startup. */
extern fpu_control_t __fpu_control;
+#endif
+
#endif /* _FPU_CONTROL_H */
--- ports/sysdeps/arm/fpu/__longjmp.S
+++ ports/sysdeps/arm/fpu/__longjmp.S
@@ -30,7 +30,33 @@
movs r0, r1 /* get the return value in place */
moveq r0, #1 /* can't let setjmp() return zero! */
+#ifdef __MAVERICK__
+ cfldrd mvd4, [ip], #8
+ nop
+ cfldrd mvd5, [ip], #8
+ nop
+ cfldrd mvd6, [ip], #8
+ nop
+ cfldrd mvd7, [ip], #8
+ nop
+ cfldrd mvd8, [ip], #8
+ nop
+ cfldrd mvd9, [ip], #8
+ nop
+ cfldrd mvd10, [ip], #8
+ nop
+ cfldrd mvd11, [ip], #8
+ nop
+ cfldrd mvd12, [ip], #8
+ nop
+ cfldrd mvd13, [ip], #8
+ nop
+ cfldrd mvd14, [ip], #8
+ nop
+ cfldrd mvd15, [ip], #8
+#else
lfmfd f4, 4, [ip] ! /* load the floating point regs */
+#endif
LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc})
END (__longjmp)
--- ports/sysdeps/arm/fpu/setjmp.S
+++ ports/sysdeps/arm/fpu/setjmp.S
@@ -24,11 +24,41 @@
ENTRY (__sigsetjmp)
/* Save registers */
+#ifdef __MAVERICK__
+ cfstrd mvd4, [r0], #8
+ nop
+ cfstrd mvd5, [r0], #8
+ nop
+ cfstrd mvd6, [r0], #8
+ nop
+ cfstrd mvd7, [r0], #8
+ nop
+ cfstrd mvd8, [r0], #8
+ nop
+ cfstrd mvd9, [r0], #8
+ nop
+ cfstrd mvd10, [r0], #8
+ nop
+ cfstrd mvd11, [r0], #8
+ nop
+ cfstrd mvd12, [r0], #8
+ nop
+ cfstrd mvd13, [r0], #8
+ nop
+ cfstrd mvd14, [r0], #8
+ nop
+ cfstrd mvd15, [r0], #8
+#else
sfmea f4, 4, [r0]!
+#endif
stmia r0, {v1-v6, sl, fp, sp, lr}
/* Restore pointer to jmp_buf */
+#ifdef __MAVERICK__
+ sub r0, r0, #96
+#else
sub r0, r0, #48
+#endif
/* Make a tail call to __sigjmp_save; it takes the same args. */
B PLTJMP(C_SYMBOL_NAME(__sigjmp_save))
--- ports/sysdeps/arm/gccframe.h
+++ ports/sysdeps/arm/gccframe.h
@@ -17,6 +17,10 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#ifdef __MAVERICK__
+#define FIRST_PSEUDO_REGISTER 43
+#else
#define FIRST_PSEUDO_REGISTER 27
+#endif
#include <sysdeps/generic/gccframe.h>
--- ports/sysdeps/arm/gmp-mparam.h
+++ ports/sysdeps/arm/gmp-mparam.h
@@ -29,7 +29,7 @@
#if defined(__ARMEB__)
# define IEEE_DOUBLE_MIXED_ENDIAN 0
# define IEEE_DOUBLE_BIG_ENDIAN 1
-#elif defined(__VFP_FP__)
+#elif defined(__VFP_FP__) || defined(__MAVERICK__)
# define IEEE_DOUBLE_MIXED_ENDIAN 0
# define IEEE_DOUBLE_BIG_ENDIAN 0
#else
1.1 src/patchsets/glibc/2.7/6230_all_arm-glibc-2.5-no-page-header.patch
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
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
Index: 6230_all_arm-glibc-2.5-no-page-header.patch
===================================================================
2007-03-13 Mike Frysinger <vapier@gentoo.org>
* sysdeps/unix/sysv/linux/arm/ioperm.c: Don't include asm/page.h.
--- ports/sysdeps/unix/sysv/linux/arm/ioperm.c
+++ ports/sysdeps/unix/sysv/linux/arm/ioperm.c
@@ -45,7 +45,6 @@
#include <sys/mman.h>
#include <linux/version.h>
-#include <asm/page.h>
#include <sys/sysctl.h>
#define PATH_ARM_SYSTYPE "/etc/arm_systype"
1.1 src/patchsets/glibc/2.7/6400_all_sh-glibc-2.3.2-fpscr_values.patch
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
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
Index: 6400_all_sh-glibc-2.3.2-fpscr_values.patch
===================================================================
http://sources.redhat.com/ml/libc-alpha/2003-06/msg00027.html
http://www.m17n.org/linux-sh/ml/linux-sh/2003-05/msg00010.html
http://rpm.sh-linux.org/rpm-2004/target/SRPMS/glibc-2.3.3-27.12.src.rpm
http://bugs.gentoo.org/100696
--- sysdeps/unix/sysv/linux/sh/sysdep.S
+++ sysdeps/unix/sysv/linux/sh/sysdep.S
@@ -30,3 +30,13 @@
#define __syscall_error __syscall_error_1
#include <sysdeps/unix/sh/sysdep.S>
+
+ .data
+ .align 3
+ .globl ___fpscr_values
+ .type ___fpscr_values, @object
+ .size ___fpscr_values, 8
+___fpscr_values:
+ .long 0
+ .long 0x80000
+weak_alias (___fpscr_values, __fpscr_values)
--- sysdeps/unix/sysv/linux/sh/Versions
+++ sysdeps/unix/sysv/linux/sh/Versions
@@ -2,6 +2,7 @@
GLIBC_2.2 {
# functions used in other libraries
__xstat64; __fxstat64; __lxstat64;
+ __fpscr_values;
# a*
alphasort64;
1.1 src/patchsets/glibc/2.7/6415_all_sh-glibc-2.5-no-asm-user-header.patch
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
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
Index: 6415_all_sh-glibc-2.5-no-asm-user-header.patch
===================================================================
2007-03-13 Mike Frysinger <vapier@gentoo.org>
* sysdeps/unix/sysv/linux/sh/sys/user.h: Copy Linux's asm-sh/user.h.
--- sysdeps/unix/sysv/linux/sh/sys/user.h
+++ sysdeps/unix/sysv/linux/sh/sys/user.h
@@ -19,10 +19,60 @@
#ifndef _SYS_USER_H
#define _SYS_USER_H 1
-#include <features.h>
+#include <unistd.h>
+#include <asm/ptrace.h>
-#include <asm/user.h>
+/*
+ * Core file format: The core file is written in such a way that gdb
+ * can understand it and provide useful information to the user (under
+ * linux we use the `trad-core' bfd). The file contents are as follows:
+ *
+ * upage: 1 page consisting of a user struct that tells gdb
+ * what is present in the file. Directly after this is a
+ * copy of the task_struct, which is currently not used by gdb,
+ * but it may come in handy at some point. All of the registers
+ * are stored as part of the upage. The upage should always be
+ * only one page long.
+ * data: The data segment follows next. We use current->end_text to
+ * current->brk to pick up all of the user variables, plus any memory
+ * that may have been sbrk'ed. No attempt is made to determine if a
+ * page is demand-zero or if a page is totally unused, we just cover
+ * the entire range. All of the addresses are rounded in such a way
+ * that an integral number of pages is written.
+ * stack: We need the stack information in order to get a meaningful
+ * backtrace. We need to write the data from usp to
+ * current->start_stack, so we round each of these in order to be able
+ * to write an integer number of pages.
+ */
-#undef start_thread
+struct user_fpu_struct {
+ unsigned long fp_regs[16];
+ unsigned long xfp_regs[16];
+ unsigned long fpscr;
+ unsigned long fpul;
+};
+
+struct user {
+ struct pt_regs regs; /* entire machine state */
+ struct user_fpu_struct fpu; /* Math Co-processor registers */
+ int u_fpvalid; /* True if math co-processor being used */
+ size_t u_tsize; /* text size (pages) */
+ size_t u_dsize; /* data size (pages) */
+ size_t u_ssize; /* stack size (pages) */
+ unsigned long start_code; /* text starting address */
+ unsigned long start_data; /* data starting address */
+ unsigned long start_stack; /* stack starting address */
+ long int signal; /* signal causing core dump */
+ struct regs * u_ar0; /* help gdb find registers */
+ struct user_fpu_struct* u_fpstate; /* Math Co-processor pointer */
+ unsigned long magic; /* identifies a core file */
+ char u_comm[32]; /* user command name */
+};
+
+#define NBPG getpagesize()
+#define UPAGES 1
+#define HOST_TEXT_START_ADDR (u.start_code)
+#define HOST_DATA_START_ADDR (u.start_data)
+#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
#endif /* sys/user.h */
1.1 src/patchsets/glibc/2.7/6416_all_sh-glibc-2.5-no-asm-elf-header.patch
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
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
Index: 6416_all_sh-glibc-2.5-no-asm-elf-header.patch
===================================================================
2007-03-13 Mike Frysinger <vapier@gentoo.org>
* sysdeps/unix/sysv/linux/sh/sys/procfs.h: Copy Linux's asm-sh/elf.h types.
--- sysdeps/unix/sysv/linux/sh/sys/procfs.h
+++ sysdeps/unix/sysv/linux/sh/sys/procfs.h
@@ -29,10 +29,19 @@
#include <sys/types.h>
#include <sys/ucontext.h>
#include <sys/user.h>
-#include <asm/elf.h>
__BEGIN_DECLS
+/*
+ * ELF register definitions...
+ */
+typedef unsigned long elf_greg_t;
+
+#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t))
+typedef elf_greg_t elf_gregset_t[ELF_NGREG];
+
+typedef struct user_fpu_struct elf_fpregset_t;
+
struct elf_siginfo
{
int si_signo; /* Signal number. */
1.1 src/patchsets/glibc/2.7/6600_mips_librt-mips.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/6600_mips_librt-mips.patch?rev=1.1&view=markup
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
Index: 6600_mips_librt-mips.patch
===================================================================
we kind of screwed ourselves into a corner by having the clock symbols
exported only with the glibc-2.0 version ... this patch fixes the
export so all new binaries built against librt will use the correct
glibc-2.2 symbol version
one day, we'll just drop this on the floor (maybe after 2006.1)
--- ports/sysdeps/unix/sysv/linux/mips/Versions
+++ ports/sysdeps/unix/sysv/linux/mips/Versions
@@ -34,3 +34,9 @@
_test_and_set;
}
}
+librt {
+ GLIBC_2.0 {
+ # c*
+ clock_gettime; clock_settime;
+ }
+}
--- Versions.def
+++ Versions.def
@@ -90,6 +90,7 @@
GLIBC_PRIVATE
}
librt {
+ GLIBC_2.0
GLIBC_2.1
GLIBC_2.2
GLIBC_2.3
--- sysdeps/unix/clock_gettime.c
+++ sysdeps/unix/clock_gettime.c
@@ -23,6 +23,7 @@
#include <sys/time.h>
#include <libc-internal.h>
#include <ldsodefs.h>
+#include <shlib-compat.h>
#if HP_TIMING_AVAIL
@@ -90,7 +91,7 @@
/* Get current value of CLOCK and store it in TP. */
int
-clock_gettime (clockid_t clock_id, struct timespec *tp)
+__clock_gettime (clockid_t clock_id, struct timespec *tp)
{
int retval = -1;
struct timeval tv;
@@ -131,4 +132,10 @@
return retval;
}
-librt_hidden_def (clock_gettime)
+versioned_symbol (librt, __clock_gettime, clock_gettime, GLIBC_2_2);
+librt_hidden_ver (__clock_gettime, clock_gettime)
+
+#if defined __mips__ && defined SHARED
+strong_alias (__clock_gettime, __mips_clock_gettime)
+compat_symbol (librt, __mips_clock_gettime, clock_gettime, GLIBC_2_0);
+#endif
--- sysdeps/unix/clock_settime.c
+++ sysdeps/unix/clock_settime.c
@@ -21,6 +21,7 @@
#include <sys/time.h>
#include <libc-internal.h>
#include <ldsodefs.h>
+#include <shlib-compat.h>
#if HP_TIMING_AVAIL
@@ -38,7 +39,7 @@
/* Set CLOCK to value TP. */
int
-clock_settime (clockid_t clock_id, const struct timespec *tp)
+__clock_settime (clockid_t clock_id, const struct timespec *tp)
{
int retval;
@@ -123,3 +124,9 @@
return retval;
}
+versioned_symbol (librt, __clock_settime, clock_settime, GLIBC_2_2);
+
+#if defined __mips__ && defined SHARED
+strong_alias (__clock_settime, __mips_clock_settime)
+compat_symbol (librt, __mips_clock_settime, clock_settime, GLIBC_2_0);
+#endif
1.1 src/patchsets/glibc/2.7/6605_all_glibc-2.4-fpu-cw-mips.patch
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
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
Index: 6605_all_glibc-2.4-fpu-cw-mips.patch
===================================================================
http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html
--- ports/sysdeps/mips/fpu_control.h
+++ ports/sysdeps/mips/fpu_control.h
@@ -74,7 +74,7 @@
#define _FPU_RC_UP 0x2
#define _FPU_RC_DOWN 0x3
-#define _FPU_RESERVED 0xfe3c0000 /* Reserved bits in cw */
+#define _FPU_RESERVED 0xfebc0000 /* Reserved bits in cw */
/* The fdlibm code requires strict IEEE double precision arithmetic,
1.1 src/patchsets/glibc/2.7/6645_all_glibc-mips_shn_undef-hack.patch
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
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
Index: 6645_all_glibc-mips_shn_undef-hack.patch
===================================================================
Hack from Debian to hopefully get sandbox working on mips
<`Kumba> ths: given the SHN_UNDEF thing is a hack, what's the preferred solution?
<ths> For fakeroot the simplest trigger is "fakeroot file /bin/ls".
<ths> `Kumba: I haven't found a better one yet.
<ths> Probably marker symbols around the stub section, and then exclude it from the link map.
<ths> This needs a ld change.
--- libc/elf/do-lookup.h
+++ libc/elf/do-lookup.h
@@ -187,6 +187,12 @@ do_lookup_x (const char *undef_name, uns
}
/* FALLTHROUGH */
case STB_GLOBAL:
+#ifdef __mips__
+ /* HACK: MIPS marks its lazy evaluation stubs with SHN_UNDEF
+ symbols, we skip them. */
+ if (sym->st_shndx == SHN_UNDEF)
+ break;
+#endif
/* Global definition. Just what we need. */
result->s = sym;
result->m = map;
1.1 src/patchsets/glibc/2.7/6650_all_glibc-mips_gnu-hash_support.patch
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
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
Index: 6650_all_glibc-mips_gnu-hash_support.patch
===================================================================
Add support for GNU_HASH on mips
http://sourceware.org/ml/binutils/2007-08/msg00387.html
--- glibc-2.6.1/elf/elf.h
+++ glibc-2.6.1/elf/elf.h
@@ -1380,6 +1380,7 @@ typedef struct
#define STO_MIPS_INTERNAL 0x1
#define STO_MIPS_HIDDEN 0x2
#define STO_MIPS_PROTECTED 0x3
+#define STO_MIPS_GNUHASH (1 << 3)
#define STO_MIPS_SC_ALIGN_UNUSED 0xff
/* MIPS specific values for `st_info'. */
--- glibc-2.6.1/ports/sysdeps/mips/dl-machine.h
+++ glibc-2.6.1/ports/sysdeps/mips/dl-machine.h
@@ -536,6 +536,7 @@ elf_machine_got_rel (struct link_map *ma
ElfW(Sym) *sym;
const ElfW(Half) *vernum;
int i, n, symidx;
+ int is_gnuhash;
#define RESOLVE_GOTSYM(sym,vernum,sym_index) \
({ \
@@ -578,10 +579,18 @@ elf_machine_got_rel (struct link_map *ma
sym = (ElfW(Sym) *) D_PTR (map, l_info[DT_SYMTAB]) + symidx;
i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val
- map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val);
+ /* check hash style */
+ is_gnuhash = map->l_info[DT_ADDRTAGIDX (DT_GNU_HASH) + DT_NUM
+ + DT_THISPROCNUM + DT_VERSIONTAGNUM
+ + DT_EXTRANUM + DT_VALNUM];
/* This loop doesn't handle Quickstart. */
while (i--)
{
+ /* in gnu hash, skip symbol that doesn't need GOT entries */
+ if (is_gnuhash && (sym->st_other & STO_MIPS_GNUHASH) != STO_MIPS_GNUHASH)
+ goto skip;
+
if (sym->st_shndx == SHN_UNDEF)
{
if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC
@@ -604,6 +613,7 @@ elf_machine_got_rel (struct link_map *ma
else
*got = RESOLVE_GOTSYM (sym, vernum, symidx);
+ skip:
++got;
++sym;
++symidx;
1.1 src/patchsets/glibc/2.7/README.history
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/README.history?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.7/README.history?rev=1.1&content-type=text/plain
Index: README.history
===================================================================
1.0 22.07.2007
+ 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-ep93xx-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
--
gentoo-commits@gentoo.org mailing list
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-10-22 17:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-22 17:00 [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 Mike Frysinger (vapier)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox