patches/glibc/2.7/210-alpha-ptr_mangle.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu Aug 07 14:05:47 2008 +0000 (2008-08-07)
changeset 766 717efd8b78b4
parent 744 4bf8448536d5
permissions -rw-r--r--
Update all samples to the latest set of options.
Update some samples to use newer features.
Add patches for the uClibc-20080801 snapshot to be able to build with gcc-4.3.
Add a patch against glibc-2.7 to allow building PPC with latest kernel headers.
Add a patch to gcc to use an alternate unwinding when built against uClibc (after a private explanation/request by Daniel Egger <daniel@eggers-club.de>)

/trunk/patches/glibc/2.7/230-powerpc-private_futex.patch | 15 15 0 0 +
/trunk/patches/uClibc/20080801/300-fix-asm.patch | 175 175 0 0 +++++++++
/trunk/patches/uClibc/20080801/100-ifaddrs.patch | 190 190 0 0 +++++++++
/trunk/patches/uClibc/20080801/200-mips-typeof.patch | 112 112 0 0 ++++++
/trunk/patches/gcc/4.3.1/330-unwind-for-uClibc.patch | 25 25 0 0 +
/trunk/samples/x86_64-unknown-linux-gnu/crosstool.config | 17 10 7 0 +
/trunk/samples/armeb-unknown-linux-uclibc/crosstool.config | 7 5 2 0 +
/trunk/samples/arm-unknown-linux-gnueabi/crosstool.config | 7 5 2 0 +
/trunk/samples/ia64-unknown-linux-gnu/crosstool.config | 14 11 3 0 +
/trunk/samples/x86_64-unknown-linux-uclibc/uClibc-20080801.config | 232 232 0 0 ++++++++++++
/trunk/samples/x86_64-unknown-linux-uclibc/crosstool.config | 34 21 13 0 +-
/trunk/samples/i686-nptl-linux-gnu/crosstool.config | 10 7 3 0 +
/trunk/samples/powerpc-unknown-linux-gnu/crosstool.config | 12 9 3 0 +
/trunk/samples/mips-unknown-linux-uclibc/uClibc-20080801.config | 249 249 0 0 ++++++++++++
/trunk/samples/mips-unknown-linux-uclibc/crosstool.config | 38 23 15 0 +-
/trunk/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config | 14 10 4 0 +
/trunk/samples/armeb-unknown-linux-gnu/crosstool.config | 7 5 2 0 +
/trunk/samples/powerpc-unknown_nofpu-linux-gnu/crosstool.config | 12 9 3 0 +
/trunk/samples/arm-unknown-linux-uclibc/crosstool.config | 7 5 2 0 +
/trunk/samples/i586-geode-linux-uclibc/uClibc-20080801.config | 261 261 0 0 +++++++++++++
/trunk/samples/i586-geode-linux-uclibc/crosstool.config | 32 20 12 0 ++
/trunk/samples/powerpc-unknown-linux-uclibc/crosstool.config | 12 9 3 0 +
/trunk/samples/mipsel-unknown-linux-gnu/crosstool.config | 7 5 2 0 +
/trunk/samples/armeb-unknown-linux-uclibcgnueabi/crosstool.config | 7 5 2 0 +
/trunk/samples/alphaev56-unknown-linux-gnu/crosstool.config | 16 10 6 0 +
25 files changed, 1428 insertions(+), 84 deletions(-)
yann@734
     1
--- glibc-2.7.orig/sysdeps/unix/alpha/sysdep.h
yann@734
     2
+++ glibc-2.7/sysdeps/unix/alpha/sysdep.h
yann@734
     3
@@ -397,42 +397,4 @@
yann@734
     4
 	_sc_ret = _sc_0, _sc_err = _sc_19;			\
yann@734
     5
 }
yann@734
     6
 
yann@734
     7
-/* Pointer mangling support.  Note that tls access is slow enough that
yann@734
     8
-   we don't deoptimize things by placing the pointer check value there.  */
yann@734
     9
-
yann@734
    10
-#include <stdint.h>
yann@734
    11
-
yann@734
    12
-#if defined NOT_IN_libc && defined IS_IN_rtld
yann@734
    13
-# ifdef __ASSEMBLER__
yann@734
    14
-#  define PTR_MANGLE(dst, src, tmp)				\
yann@734
    15
-	ldah	tmp, __pointer_chk_guard_local($29) !gprelhigh;	\
yann@734
    16
-	ldq	tmp, __pointer_chk_guard_local(tmp) !gprellow;	\
yann@734
    17
-	xor	src, tmp, dst
yann@734
    18
-#  define PTR_MANGLE2(dst, src, tmp)				\
yann@734
    19
-	xor	src, tmp, dst
yann@734
    20
-#  define PTR_DEMANGLE(dst, tmp)   PTR_MANGLE(dst, dst, tmp)
yann@734
    21
-#  define PTR_DEMANGLE2(dst, tmp)  PTR_MANGLE2(dst, dst, tmp)
yann@734
    22
-# else
yann@734
    23
-extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden;
yann@734
    24
-#  define PTR_MANGLE(var)	\
yann@734
    25
-  (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local)
yann@734
    26
-#  define PTR_DEMANGLE(var)  PTR_MANGLE(var)
yann@734
    27
-# endif
yann@734
    28
-#elif defined PIC
yann@734
    29
-# ifdef __ASSEMBLER__
yann@734
    30
-#  define PTR_MANGLE(dst, src, tmp)		\
yann@734
    31
-	ldq	tmp, __pointer_chk_guard;	\
yann@734
    32
-	xor	src, tmp, dst
yann@734
    33
-#  define PTR_MANGLE2(dst, src, tmp)		\
yann@734
    34
-	xor	src, tmp, dst
yann@734
    35
-#  define PTR_DEMANGLE(dst, tmp)   PTR_MANGLE(dst, dst, tmp)
yann@734
    36
-#  define PTR_DEMANGLE2(dst, tmp)  PTR_MANGLE2(dst, dst, tmp)
yann@734
    37
-# else
yann@734
    38
-extern uintptr_t __pointer_chk_guard attribute_relro;
yann@734
    39
-#  define PTR_MANGLE(var)	\
yann@734
    40
-	(var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard)
yann@734
    41
-#  define PTR_DEMANGLE(var)  PTR_MANGLE(var)
yann@734
    42
-# endif
yann@734
    43
-#endif
yann@734
    44
-
yann@734
    45
 #endif /* ASSEMBLER */
yann@734
    46
--- glibc-2.7.orig/sysdeps/unix/sysv/linux/alpha/sysdep.h
yann@734
    47
+++ glibc-2.7/sysdeps/unix/sysv/linux/alpha/sysdep.h
yann@734
    48
@@ -98,4 +98,46 @@
yann@734
    49
 	INTERNAL_SYSCALL1(name, err_out, nr, args);			\
yann@734
    50
 })
yann@734
    51
 
yann@734
    52
+/* Pointer mangling support.  Note that tls access is slow enough that
yann@734
    53
+   we don't deoptimize things by placing the pointer check value there.  */
yann@734
    54
+
yann@734
    55
+#if defined NOT_IN_libc && defined IS_IN_rtld
yann@734
    56
+# ifdef __ASSEMBLER__
yann@734
    57
+#  define PTR_MANGLE(dst, src, tmp)				\
yann@734
    58
+	ldah	tmp, __pointer_chk_guard_local($29) !gprelhigh;	\
yann@734
    59
+	ldq	tmp, __pointer_chk_guard_local(tmp) !gprellow;	\
yann@734
    60
+	xor	src, tmp, dst
yann@734
    61
+#  define PTR_MANGLE2(dst, src, tmp)				\
yann@734
    62
+	xor	src, tmp, dst
yann@734
    63
+#  define PTR_DEMANGLE(dst, tmp)   PTR_MANGLE(dst, dst, tmp)
yann@734
    64
+#  define PTR_DEMANGLE2(dst, tmp)  PTR_MANGLE2(dst, dst, tmp)
yann@734
    65
+# else
yann@734
    66
+extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden;
yann@734
    67
+#  define PTR_MANGLE(var)	\
yann@734
    68
+  (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local)
yann@734
    69
+#  define PTR_DEMANGLE(var)  PTR_MANGLE(var)
yann@734
    70
+# endif
yann@734
    71
+#elif defined PIC
yann@734
    72
+# ifdef __ASSEMBLER__
yann@734
    73
+#  define PTR_MANGLE(dst, src, tmp)		\
yann@734
    74
+	ldq	tmp, __pointer_chk_guard;	\
yann@734
    75
+	xor	src, tmp, dst
yann@734
    76
+#  define PTR_MANGLE2(dst, src, tmp)		\
yann@734
    77
+	xor	src, tmp, dst
yann@734
    78
+#  define PTR_DEMANGLE(dst, tmp)   PTR_MANGLE(dst, dst, tmp)
yann@734
    79
+#  define PTR_DEMANGLE2(dst, tmp)  PTR_MANGLE2(dst, dst, tmp)
yann@734
    80
+# else
yann@734
    81
+extern uintptr_t __pointer_chk_guard attribute_relro;
yann@734
    82
+#  define PTR_MANGLE(var)	\
yann@734
    83
+	(var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard)
yann@734
    84
+#  define PTR_DEMANGLE(var)  PTR_MANGLE(var)
yann@734
    85
+# endif
yann@734
    86
+#else
yann@734
    87
+/* Pointer mangling is not yet supported for static libc on alpha.  */
yann@734
    88
+# ifndef __ASSEMBLER__
yann@734
    89
+#  define PTR_MANGLE(var)   (void) (var)
yann@734
    90
+#  define PTR_DEMANGLE(var) (void) (var)
yann@734
    91
+# endif
yann@734
    92
+#endif
yann@734
    93
+
yann@734
    94
 #endif /* _LINUX_ALPHA_SYSDEP_H */