Index: tches/glibc-2.9-alpha_fixes-1.patch
===================================================================
--- patches/glibc-2.9-alpha_fixes-1.patch	(revision 093b0e8b160919f5e1cf7aac272d710a68302a3c)
+++ 	(revision )
@@ -1,171 +1,0 @@
-Submitted By: Joe Ciccone <jciccone@gmail.com>
-Date: 2008-10-12
-Initial Package Version: 2.8
-Upstream Status: Reported & No Status
-Origin: http://sources.redhat.com/bugzilla/show_bug.cgi?id=5216
-        http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.8/6015_all_alpha-glibc-2.5-no-page-header.patch?rev=1.1&view=log
-        http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.8/6016_all_alpha-glibc-2.5-no-asm-elf-header.patch?rev=1.1&view=log
-        http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.8/6017_all_alpha-glibc-2.8-creat.patch?rev=1.1&view=log
-        Joe Ciccone & http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.8/6018_all_alpha-glibc-2.8-cache-shape.patch?rev=1.1&view=log
-Description: Fixes various problems on alpha.
-
-diff -Naur glibc-2.8.orig/sysdeps/unix/alpha/sysdep.h glibc-2.8/sysdeps/unix/alpha/sysdep.h
---- glibc-2.8.orig/sysdeps/unix/alpha/sysdep.h	2006-03-03 06:21:28.000000000 -0500
-+++ glibc-2.8/sysdeps/unix/alpha/sysdep.h	2008-10-12 12:31:17.000000000 -0400
-@@ -397,42 +397,4 @@
- 	_sc_ret = _sc_0, _sc_err = _sc_19;			\
- }
- 
--/* Pointer mangling support.  Note that tls access is slow enough that
--   we don't deoptimize things by placing the pointer check value there.  */
--
--#include <stdint.h>
--
--#if defined NOT_IN_libc && defined IS_IN_rtld
--# ifdef __ASSEMBLER__
--#  define PTR_MANGLE(dst, src, tmp)				\
--	ldah	tmp, __pointer_chk_guard_local($29) !gprelhigh;	\
--	ldq	tmp, __pointer_chk_guard_local(tmp) !gprellow;	\
--	xor	src, tmp, dst
--#  define PTR_MANGLE2(dst, src, tmp)				\
--	xor	src, tmp, dst
--#  define PTR_DEMANGLE(dst, tmp)   PTR_MANGLE(dst, dst, tmp)
--#  define PTR_DEMANGLE2(dst, tmp)  PTR_MANGLE2(dst, dst, tmp)
--# else
--extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden;
--#  define PTR_MANGLE(var)	\
--  (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local)
--#  define PTR_DEMANGLE(var)  PTR_MANGLE(var)
--# endif
--#elif defined PIC
--# ifdef __ASSEMBLER__
--#  define PTR_MANGLE(dst, src, tmp)		\
--	ldq	tmp, __pointer_chk_guard;	\
--	xor	src, tmp, dst
--#  define PTR_MANGLE2(dst, src, tmp)		\
--	xor	src, tmp, dst
--#  define PTR_DEMANGLE(dst, tmp)   PTR_MANGLE(dst, dst, tmp)
--#  define PTR_DEMANGLE2(dst, tmp)  PTR_MANGLE2(dst, dst, tmp)
--# else
--extern uintptr_t __pointer_chk_guard attribute_relro;
--#  define PTR_MANGLE(var)	\
--	(var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard)
--#  define PTR_DEMANGLE(var)  PTR_MANGLE(var)
--# endif
--#endif
--
- #endif /* ASSEMBLER */
-diff -Naur glibc-2.8.orig/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-2.8/sysdeps/unix/sysv/linux/alpha/dl-support.c
---- glibc-2.8.orig/sysdeps/unix/sysv/linux/alpha/dl-support.c	2007-03-13 17:25:16.000000000 -0400
-+++ glibc-2.8/sysdeps/unix/sysv/linux/alpha/dl-support.c	2008-10-12 12:31:30.000000000 -0400
-@@ -1,2 +1 @@
--#include "dl-auxv.h"
- #include <elf/dl-support.c>
-diff -Naur glibc-2.8.orig/sysdeps/unix/sysv/linux/alpha/sys/procfs.h glibc-2.8/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
---- glibc-2.8.orig/sysdeps/unix/sysv/linux/alpha/sys/procfs.h	2001-07-06 00:56:13.000000000 -0400
-+++ glibc-2.8/sysdeps/unix/sysv/linux/alpha/sys/procfs.h	2008-10-12 12:31:17.000000000 -0400
-@@ -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.  */
-diff -Naur glibc-2.8.orig/sysdeps/unix/sysv/linux/alpha/sys/user.h glibc-2.8/sysdeps/unix/sysv/linux/alpha/sys/user.h
---- glibc-2.8.orig/sysdeps/unix/sysv/linux/alpha/sys/user.h	2001-07-06 00:56:13.000000000 -0400
-+++ glibc-2.8/sysdeps/unix/sysv/linux/alpha/sys/user.h	2008-10-12 12:31:17.000000000 -0400
-@@ -23,7 +23,6 @@
-    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 <asm/reg.h>
- 
- struct user
-@@ -41,6 +40,9 @@
-   char u_comm[32];				/* user command name */
- };
- 
-+#define PAGE_SHIFT		13
-+#define PAGE_SIZE		(1 << PAGE_SHIFT)
-+#define PAGE_MASK		(~(PAGE_SIZE-1))
- #define NBPG			PAGE_SIZE
- #define UPAGES			1
- #define HOST_TEXT_START_ADDR	(u.start_code)
-diff -Naur glibc-2.8.orig/sysdeps/unix/sysv/linux/alpha/sysdep.h glibc-2.8/sysdeps/unix/sysv/linux/alpha/sysdep.h
---- glibc-2.8.orig/sysdeps/unix/sysv/linux/alpha/sysdep.h	2007-08-21 04:07:28.000000000 -0400
-+++ glibc-2.8/sysdeps/unix/sysv/linux/alpha/sysdep.h	2008-10-12 12:31:17.000000000 -0400
-@@ -98,4 +98,46 @@
- 	INTERNAL_SYSCALL1(name, err_out, nr, args);			\
- })
- 
-+/* Pointer mangling support.  Note that tls access is slow enough that
-+   we don't deoptimize things by placing the pointer check value there.  */
-+
-+#if defined NOT_IN_libc && defined IS_IN_rtld
-+# ifdef __ASSEMBLER__
-+#  define PTR_MANGLE(dst, src, tmp)                            \
-+       ldah    tmp, __pointer_chk_guard_local($29) !gprelhigh; \
-+       ldq     tmp, __pointer_chk_guard_local(tmp) !gprellow;  \
-+       xor     src, tmp, dst
-+#  define PTR_MANGLE2(dst, src, tmp)                           \
-+       xor     src, tmp, dst
-+#  define PTR_DEMANGLE(dst, tmp)   PTR_MANGLE(dst, dst, tmp)
-+#  define PTR_DEMANGLE2(dst, tmp)  PTR_MANGLE2(dst, dst, tmp)
-+# else
-+extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden;
-+#  define PTR_MANGLE(var)      \
-+  (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local)
-+#  define PTR_DEMANGLE(var)  PTR_MANGLE(var)
-+# endif
-+#elif defined PIC
-+# ifdef __ASSEMBLER__
-+#  define PTR_MANGLE(dst, src, tmp)            \
-+       ldq     tmp, __pointer_chk_guard;       \
-+       xor     src, tmp, dst
-+#  define PTR_MANGLE2(dst, src, tmp)           \
-+       xor     src, tmp, dst
-+#  define PTR_DEMANGLE(dst, tmp)   PTR_MANGLE(dst, dst, tmp)
-+#  define PTR_DEMANGLE2(dst, tmp)  PTR_MANGLE2(dst, dst, tmp)
-+# else
-+extern uintptr_t __pointer_chk_guard attribute_relro;
-+#  define PTR_MANGLE(var)      \
-+       (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard)
-+#  define PTR_DEMANGLE(var)  PTR_MANGLE(var)
-+# endif
-+#else
-+/* Pointer mangling is not yet supported for static libc on alpha.  */
-+# ifndef __ASSEMBLER__
-+#  define PTR_MANGLE(var)   (void) (var)
-+#  define PTR_DEMANGLE(var) (void) (var)
-+# endif
-+#endif
-+
- #endif /* _LINUX_ALPHA_SYSDEP_H */
-diff -Naur glibc-2.8.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c glibc-2.8/sysdeps/unix/sysv/linux/wordsize-64/creat64.c
---- glibc-2.8.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c	2007-11-10 14:34:26.000000000 -0500
-+++ glibc-2.8/sysdeps/unix/sysv/linux/wordsize-64/creat64.c	2008-10-12 12:31:17.000000000 -0400
-@@ -1 +1,5 @@
- /* Defined as alias for the syscall.  */
-+#include <sysdep.h>
-+#ifndef __NR_creat
-+#include "../../../../../io/creat64.c"
-+#endif
Index: tches/glibc-2.9-libgcc_eh-1.patch
===================================================================
--- patches/glibc-2.9-libgcc_eh-1.patch	(revision 093b0e8b160919f5e1cf7aac272d710a68302a3c)
+++ 	(revision )
@@ -1,138 +1,0 @@
-Submitted By: Joe Ciccone <jciccone@gmail.com>
-Date: 2006-11-09
-Initial Package Version: 2.5
-Origin: Joe Ciccone
-Upstream Status: Unknown
-Description: Checks to see if libgcc_eh has been provided by gcc. If it has
-             the glibc will attempt to link to it.
-
-             Rediffed for 2.7 by Jim Gifford
-             Rediffed for 2.8 by Joe Ciccone
-             Rediffed for 2.9 by Joe Ciccone
-
-diff -Naur glibc-2.9.orig/config.make.in glibc-2.9/config.make.in
---- glibc-2.9.orig/config.make.in	2008-08-18 05:42:17.000000000 -0400
-+++ glibc-2.9/config.make.in	2008-12-17 08:23:59.000000000 -0500
-@@ -60,6 +60,7 @@
- have-libaudit = @have_libaudit@
- have-libcap = @have_libcap@
- have-cc-with-libunwind = @libc_cv_cc_with_libunwind@
-+have-cc-with-libgcc_eh = @libc_cv_cc_with_libgcc_eh@
- fno-unit-at-a-time = @fno_unit_at_a_time@
- bind-now = @bindnow@
- have-hash-style = @libc_cv_hashstyle@
-diff -Naur glibc-2.9.orig/configure.in glibc-2.9/configure.in
---- glibc-2.9.orig/configure.in	2008-11-27 19:05:05.000000000 -0500
-+++ glibc-2.9/configure.in	2008-12-17 08:21:56.000000000 -0500
-@@ -1394,6 +1394,23 @@
-     AC_DEFINE(HAVE_CC_WITH_LIBUNWIND)
-   fi
- 
-+  AC_CACHE_CHECK(whether to link against libgcc_eh,
-+                 libc_cv_cc_with_libgcc_eh, [
-+    cat > conftest.c <<EOF
-+int main (void) { return 0; }
-+EOF
-+    if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -static -o conftest \
-+       conftest.c -v 2>&1 >/dev/null | grep -q " -lgcc_eh "; then
-+      libc_cv_cc_with_libgcc_eh=yes
-+    else
-+      libc_cv_cc_with_libgcc_eh=no
-+    fi
-+    rm -f conftest*])
-+  AC_SUBST(libc_cv_cc_with_libgcc_eh)
-+  if test $libc_cv_cc_with_libgcc_eh = yes; then
-+    AC_DEFINE(HAVE_CC_WITH_LIBGCC_EH)
-+  fi
-+
-   AC_CACHE_CHECK(for -z nodelete option,
- 		 libc_cv_z_nodelete, [dnl
-   cat > conftest.c <<EOF
-diff -Naur glibc-2.9.orig/configure glibc-2.9/configure
---- glibc-2.9.orig/configure	2008-11-27 19:05:36.000000000 -0500
-+++ glibc-2.9/configure	2008-12-17 08:24:21.000000000 -0500
-@@ -716,6 +716,7 @@
- BISON
- VERSIONING
- libc_cv_cc_with_libunwind
-+libc_cv_cc_with_libgcc_eh
- libc_cv_Bgroup
- libc_cv_libgcc_s_suffix
- libc_cv_as_needed
-@@ -6053,6 +6054,33 @@
- 
-   fi
- 
-+  { echo "$as_me:$LINENO: checking whether to link against libgcc_eh" >&5
-+echo $ECHO_N "checking whether to link against libgcc_eh... $ECHO_C" >&6; }
-+if test "${libc_cv_cc_with_libgcc_eh+set}" = set; then
-+  echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+
-+    cat > conftest.c <<EOF
-+int main (void) { return 0; }
-+EOF
-+    if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -static -o conftest \
-+       conftest.c -v 2>&1 >/dev/null | grep -q " -lgcc_eh "; then
-+      libc_cv_cc_with_libgcc_eh=yes
-+    else
-+      libc_cv_cc_with_libgcc_eh=no
-+    fi
-+    rm -f conftest*
-+fi
-+{ echo "$as_me:$LINENO: result: $libc_cv_cc_with_libgcc_eh" >&5
-+echo "${ECHO_T}$libc_cv_cc_with_libgcc_eh" >&6; }
-+
-+  if test $libc_cv_cc_with_libgcc_eh = yes; then
-+    cat >>confdefs.h <<\_ACEOF
-+#define HAVE_CC_WITH_LIBGCC_EH 1
-+_ACEOF
-+
-+  fi
-+
-   { echo "$as_me:$LINENO: checking for -z nodelete option" >&5
- echo $ECHO_N "checking for -z nodelete option... $ECHO_C" >&6; }
- if test "${libc_cv_z_nodelete+set}" = set; then
-@@ -9282,6 +9310,7 @@
- BISON!$BISON$ac_delim
- VERSIONING!$VERSIONING$ac_delim
- libc_cv_cc_with_libunwind!$libc_cv_cc_with_libunwind$ac_delim
-+libc_cv_cc_with_libgcc_eh!$libc_cv_cc_with_libgcc_eh$ac_delim
- libc_cv_Bgroup!$libc_cv_Bgroup$ac_delim
- libc_cv_libgcc_s_suffix!$libc_cv_libgcc_s_suffix$ac_delim
- libc_cv_as_needed!$libc_cv_as_needed$ac_delim
-@@ -9335,7 +9364,7 @@
- LTLIBOBJS!$LTLIBOBJS$ac_delim
- _ACEOF
- 
--  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 54; then
-+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 55; then
-     break
-   elif $ac_last_try; then
-     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-diff -Naur glibc-2.9.orig/Makeconfig glibc-2.9/Makeconfig
---- glibc-2.9.orig/Makeconfig	2008-08-18 05:42:17.000000000 -0400
-+++ glibc-2.9/Makeconfig	2008-12-17 08:23:42.000000000 -0500
-@@ -525,12 +525,20 @@
-   libunwind = -lunwind
- endif
- ifneq ($(have-as-needed),yes)
-- libgcc_eh := -lgcc_eh $(libunwind)
-+ ifneq ($(have-cc-with-libgcc_eh),yes)
-+  libgcc_eh := $(libunwind)
-+ else
-+  libgcc_eh := -lgcc_eh $(libunwind)
-+ endif
- else
-  libgcc_eh := -Wl,--as-needed -lgcc_s$(libgcc_s_suffix) $(libunwind) -Wl,--no-as-needed
- endif
- gnulib := -lgcc $(libgcc_eh)
--static-gnulib := -lgcc -lgcc_eh $(libunwind)
-+ifneq ($(have-cc-with-libgcc_eh),yes)
-+ static-gnulib := -lgcc $(libunwind)
-+else
-+ static-gnulib := -lgcc -lgcc_eh $(libunwind)
-+endif
- libc.so-gnulib := -lgcc
- endif
- ifeq ($(elf),yes)
Index: tches/glibc-2.9-localedef_segfault-1.patch
===================================================================
--- patches/glibc-2.9-localedef_segfault-1.patch	(revision 093b0e8b160919f5e1cf7aac272d710a68302a3c)
+++ 	(revision )
@@ -1,59 +1,0 @@
-Submitted By: Jim Gifford (patches at jg555 dot com)
-Date: 2007-05-19
-Initial Package Version: 2.6
-Origin: Debian
-Upstream Status: Unknown
-Description: Fixes Segfault when using localdef.
-             This problem is only noticed when using PaX
-             and some architectures besides x86.
-             See debian bug # 231438
-
-             Rediffed for 2.8 by Joe Ciccone
-             Rediffed for 2.9 by Joe Ciccone
-
-diff -Naur glibc-2.8.orig/locale/programs/3level.h glibc-2.8/locale/programs/3level.h
---- glibc-2.8.orig/locale/programs/3level.h	2007-07-15 20:54:59.000000000 -0400
-+++ glibc-2.8/locale/programs/3level.h	2008-09-20 12:09:34.000000000 -0400
-@@ -203,6 +203,42 @@
- 	}
-     }
- }
-+
-+/* 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
