# HG changeset patch # User "Yann E. MORIN" # Date 1217282380 0 # Node ID 61cd4eb6034d22306d1d914c314ce756566b6ff9 # Parent d3e603e7c17ca0207a27ea145e48cc55dad10132 New patches to make glibc 2.6 and 2.6.1 build for Alpha. Forwarded by Ioannis E. VENETIS. /trunk/patches/glibc/2.6.1/200-alpha-ptr_mangle.patch | 103 103 0 0 ++++++++ /trunk/patches/glibc/2.6.1/190-alpha-atfcts.patch | 11 11 0 0 + /trunk/patches/glibc/2.6.1/180-gcc-4.3-sysinclude-path.patch | 50 50 0 0 ++++ /trunk/patches/glibc/2.6.1/210-lll_lock_t.patch | 237 237 0 0 ++++++++++++++++++ /trunk/patches/glibc/2.6/200-alpha-ptr_mangle.patch | 103 103 0 0 ++++++++ /trunk/patches/glibc/2.6/190-alpha-atfcts.patch | 11 11 0 0 + /trunk/patches/glibc/2.6/180-gcc-4.3-sysinclude-path.patch | 50 50 0 0 ++++ /trunk/patches/glibc/2.6/210-lll_lock_t.patch | 237 237 0 0 ++++++++++++++++++ /trunk/patches/glibc/ports-2.6.1/120-lll_lock_t.patch | 156 156 0 0 ++++++++++++ 9 files changed, 958 insertions(+) diff -r d3e603e7c17c -r 61cd4eb6034d patches/glibc/2.6.1/180-gcc-4.3-sysinclude-path.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/glibc/2.6.1/180-gcc-4.3-sysinclude-path.patch Mon Jul 28 21:59:40 2008 +0000 @@ -0,0 +1,50 @@ +Patch pointed to by Ryan ARNOLD on the libc-help ML. +See: http://sourceware.org/ml/libc-help/2008-06/msg00063.html + +Forwarded to crosstool-NG by Ioannis E. VENETIS: +See: http://sourceware.org/ml/libc-help/2008-06/msg00063.html + +GCC 4.3 changed the location of some of the header files. I don't +understand why you'd be getting these errors while building GCC since +it provides them. + +With regard to GLIBC, Roland checked in some changes so that the GLIBC +build system could find the new locations of the GCC provided header +files. + +diff -durN glibc-2.6.1.orig/configure.in glibc-2.6.1/configure.in +--- glibc-2.6.1.orig/configure.in 2007-06-08 05:16:36.000000000 +0200 ++++ glibc-2.6.1/configure.in 2008-06-24 18:38:46.000000000 +0200 +@@ -911,8 +911,12 @@ + # header directory and add that to the list. NOTE: Only does the right + # 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 ++ for d in include include-fixed; do ++ i=`$CC -print-file-name="$d"` && test "x$i" != x && test "x$i" != "x$d" && ++ SYSINCLUDES="$SYSINCLUDES -isystem $i" ++ done ++ SYSINCLUDES="$SYSINCLUDES \ + -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`" + if test -n "$CXX"; then + cxxversion=`$CXX -dumpversion 2>&AS_MESSAGE_LOG_FD` && +diff -durN glibc-2.6.1.orig/configure glibc-2.6.1/configure +--- glibc-2.6.1.orig/configure 2008-06-24 18:35:34.000000000 +0200 ++++ glibc-2.6.1/configure 2008-06-24 18:38:46.000000000 +0200 +@@ -4562,8 +4562,12 @@ + # header directory and add that to the list. NOTE: Only does the right + # 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 ++ for d in include include-fixed; do ++ i=`$CC -print-file-name="$d"` && test "x$i" != "x$d" && ++ SYSINCLUDES="$SYSINCLUDES -isystem $i" ++ done ++ SYSINCLUDES="$SYSINCLUDES \ + -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`" + if test -n "$CXX"; then + cxxversion=`$CXX -dumpversion 2>&5` && diff -r d3e603e7c17c -r 61cd4eb6034d patches/glibc/2.6.1/190-alpha-atfcts.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/glibc/2.6.1/190-alpha-atfcts.patch Mon Jul 28 21:59:40 2008 +0000 @@ -0,0 +1,11 @@ +--- glibc-2.6.1/sysdeps/unix/sysv/linux/kernel-features.h 2006-07-29 07:43:27.000000000 +0300 ++++ glibc-2.6.1/sysdeps/unix/sysv/linux/kernel-features.h.new 2008-07-26 08:45:06.000000000 +0300 +@@ -445,7 +445,7 @@ + /* The *at syscalls were introduced just after 2.6.16-rc1. Due to the way the + kernel versions are advertised we can only rely on 2.6.17 to have + the code. */ +-#if __LINUX_KERNEL_VERSION >= 0x020611 ++#if __LINUX_KERNEL_VERSION >= 0x020611 && !defined __alpha__ + # define __ASSUME_ATFCTS 1 + #endif + diff -r d3e603e7c17c -r 61cd4eb6034d patches/glibc/2.6.1/200-alpha-ptr_mangle.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/glibc/2.6.1/200-alpha-ptr_mangle.patch Mon Jul 28 21:59:40 2008 +0000 @@ -0,0 +1,103 @@ +--- glibc-2.6.1.orig/sysdeps/unix/alpha/sysdep.h ++++ glibc-2.6.1/sysdeps/unix/alpha/sysdep.h +@@ -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 +- +-#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 */ +--- glibc-2.6.1.orig/sysdeps/unix/sysv/linux/alpha/sysdep.h ++++ glibc-2.6.1/sysdeps/unix/sysv/linux/alpha/sysdep.h +@@ -29,6 +29,8 @@ + /* There is some commonality. */ + #include + ++#include ++ + /* For Linux we can use the system call table in the header file + /usr/include/asm/unistd.h + of the kernel. But these symbols do not follow the SYS_* syntax +@@ -96,4 +96,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 -r d3e603e7c17c -r 61cd4eb6034d patches/glibc/2.6.1/210-lll_lock_t.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/glibc/2.6.1/210-lll_lock_t.patch Mon Jul 28 21:59:40 2008 +0000 @@ -0,0 +1,237 @@ +Patch provided bu Ioannis E. VENETIS + +Using: + +typedef int lll_lock_t; + +creates problems during compilation. Since glibc 2.7 got rid of the 'typedef' and +uses directly 'int', we do the same here. + +diff -Naur glibc-2.6.1/nptl/allocatestack.c glibc-2.6.1.new/nptl/allocatestack.c +--- glibc-2.6.1/nptl/allocatestack.c 2006-08-23 20:39:47.000000000 +0300 ++++ glibc-2.6.1.new/nptl/allocatestack.c 2008-07-27 20:56:19.000000000 +0300 +@@ -103,7 +103,7 @@ + static size_t stack_cache_actsize; + + /* Mutex protecting this variable. */ +-static lll_lock_t stack_cache_lock = LLL_LOCK_INITIALIZER; ++static int stack_cache_lock = LLL_LOCK_INITIALIZER; + + /* List of queued stack frames. */ + static LIST_HEAD (stack_cache); +diff -Naur glibc-2.6.1/nptl/descr.h glibc-2.6.1.new/nptl/descr.h +--- glibc-2.6.1/nptl/descr.h 2006-09-24 20:10:55.000000000 +0300 ++++ glibc-2.6.1.new/nptl/descr.h 2008-07-27 20:54:41.000000000 +0300 +@@ -305,10 +305,10 @@ + int parent_cancelhandling; + + /* Lock to synchronize access to the descriptor. */ +- lll_lock_t lock; ++ int lock; + + /* Lock for synchronizing setxid calls. */ +- lll_lock_t setxid_futex; ++ int setxid_futex; + + #if HP_TIMING_AVAIL + /* Offset of the CPU clock at start thread start time. */ +diff -Naur glibc-2.6.1/nptl/pthread_attr_init.c glibc-2.6.1.new/nptl/pthread_attr_init.c +--- glibc-2.6.1/nptl/pthread_attr_init.c 2004-03-19 01:56:31.000000000 +0200 ++++ glibc-2.6.1.new/nptl/pthread_attr_init.c 2008-07-27 20:55:03.000000000 +0300 +@@ -27,7 +27,7 @@ + + + struct pthread_attr *__attr_list; +-lll_lock_t __attr_list_lock = LLL_LOCK_INITIALIZER; ++int __attr_list_lock = LLL_LOCK_INITIALIZER; + + + int +diff -Naur glibc-2.6.1/nptl/pthreadP.h glibc-2.6.1.new/nptl/pthreadP.h +--- glibc-2.6.1/nptl/pthreadP.h 2006-08-23 20:42:52.000000000 +0300 ++++ glibc-2.6.1.new/nptl/pthreadP.h 2008-07-27 20:56:40.000000000 +0300 +@@ -143,7 +143,7 @@ + + /* Attribute handling. */ + extern struct pthread_attr *__attr_list attribute_hidden; +-extern lll_lock_t __attr_list_lock attribute_hidden; ++extern int __attr_list_lock attribute_hidden; + + /* First available RT signal. */ + extern int __current_sigrtmin attribute_hidden; +diff -Naur glibc-2.6.1/nptl/semaphoreP.h glibc-2.6.1.new/nptl/semaphoreP.h +--- glibc-2.6.1/nptl/semaphoreP.h 2006-05-11 20:08:37.000000000 +0300 ++++ glibc-2.6.1.new/nptl/semaphoreP.h 2008-07-27 20:55:42.000000000 +0300 +@@ -48,7 +48,7 @@ + extern void *__sem_mappings attribute_hidden; + + /* Lock to protect the search tree. */ +-extern lll_lock_t __sem_mappings_lock attribute_hidden; ++extern int __sem_mappings_lock attribute_hidden; + + + /* Initializer for mountpoint. */ +diff -Naur glibc-2.6.1/nptl/sem_open.c glibc-2.6.1.new/nptl/sem_open.c +--- glibc-2.6.1/nptl/sem_open.c 2006-05-11 20:09:43.000000000 +0300 ++++ glibc-2.6.1.new/nptl/sem_open.c 2008-07-27 20:55:22.000000000 +0300 +@@ -147,7 +147,7 @@ + void *__sem_mappings attribute_hidden; + + /* Lock to protect the search tree. */ +-lll_lock_t __sem_mappings_lock attribute_hidden = LLL_LOCK_INITIALIZER; ++int __sem_mappings_lock attribute_hidden = LLL_LOCK_INITIALIZER; + + + /* Search for existing mapping and if possible add the one provided. */ +diff -Naur glibc-2.6.1/nptl/pthread_once.c glibc-2.6.1.new/nptl/pthread_once.c +--- glibc-2.6.1/nptl/pthread_once.c 2002-11-27 00:50:31.000000000 +0200 ++++ glibc-2.6.1.new/nptl/pthread_once.c 2008-07-27 20:57:12.000000000 +0300 +@@ -22,7 +22,7 @@ + + + +-static lll_lock_t once_lock = LLL_LOCK_INITIALIZER; ++static int once_lock = LLL_LOCK_INITIALIZER; + + + int +diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h +--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h 2006-07-29 08:06:07.000000000 +0300 ++++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h 2008-07-27 20:59:15.000000000 +0300 +@@ -230,9 +230,6 @@ + /* Our internal lock implementation is identical to the binary-compatible + mutex implementation. */ + +-/* Type for lock object. */ +-typedef int lll_lock_t; +- + /* Initializers for lock. */ + #define LLL_LOCK_INITIALIZER (0) + #define LLL_LOCK_INITIALIZER_LOCKED (1) +diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/fork.c glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/fork.c +--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/fork.c 2003-12-21 01:37:13.000000000 +0200 ++++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/fork.c 2008-07-27 21:00:01.000000000 +0300 +@@ -183,7 +183,7 @@ + } + + /* Initialize the fork lock. */ +- __fork_lock = (lll_lock_t) LLL_LOCK_INITIALIZER; ++ __fork_lock = (int) LLL_LOCK_INITIALIZER; + } + else + { +diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/fork.h glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/fork.h +--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/fork.h 2006-05-15 23:19:43.000000000 +0300 ++++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/fork.h 2008-07-27 20:58:49.000000000 +0300 +@@ -26,7 +26,7 @@ + extern unsigned long int *__fork_generation_pointer attribute_hidden; + + /* Lock to protect allocation and deallocation of fork handlers. */ +-extern lll_lock_t __fork_lock attribute_hidden; ++extern int __fork_lock attribute_hidden; + + /* Elements of the fork handler lists. */ + struct fork_handler +diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h +--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h 2006-09-05 17:44:25.000000000 +0300 ++++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h 2008-07-27 21:00:19.000000000 +0300 +@@ -436,9 +436,6 @@ + /* We have a separate internal lock implementation which is not tied + to binary compatibility. */ + +-/* Type for lock object. */ +-typedef int lll_lock_t; +- + /* Initializers for lock. */ + #define LLL_LOCK_INITIALIZER (0) + #define LLL_LOCK_INITIALIZER_LOCKED (1) +diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h +--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h 2006-07-29 08:06:07.000000000 +0300 ++++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h 2008-07-27 20:58:16.000000000 +0300 +@@ -223,9 +223,6 @@ + /* We have a separate internal lock implementation which is not tied + to binary compatibility. We can use the lll_mutex_*. */ + +-/* Type for lock object. */ +-typedef int lll_lock_t; +- + extern int lll_unlock_wake_cb (int *__futex) attribute_hidden; + + /* Initializers for lock. */ +diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h +--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h 2006-07-29 08:06:07.000000000 +0300 ++++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h 2008-07-27 21:00:36.000000000 +0300 +@@ -254,9 +254,6 @@ + /* Our internal lock implementation is identical to the binary-compatible + mutex implementation. */ + +-/* Type for lock object. */ +-typedef int lll_lock_t; +- + /* Initializers for lock. */ + #define LLL_LOCK_INITIALIZER (0) + #define LLL_LOCK_INITIALIZER_LOCKED (1) +diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/register-atfork.c glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/register-atfork.c +--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/register-atfork.c 2005-12-22 00:17:21.000000000 +0200 ++++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/register-atfork.c 2008-07-27 21:00:55.000000000 +0300 +@@ -24,7 +24,7 @@ + + + /* Lock to protect allocation and deallocation of fork handlers. */ +-lll_lock_t __fork_lock = LLL_LOCK_INITIALIZER; ++int __fork_lock = LLL_LOCK_INITIALIZER; + + + /* Number of pre-allocated handler entries. */ +diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h +--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h 2006-07-29 08:06:07.000000000 +0300 ++++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h 2008-07-27 21:01:14.000000000 +0300 +@@ -309,9 +309,6 @@ + /* We have a separate internal lock implementation which is not tied + to binary compatibility. We can use the lll_mutex_*. */ + +-/* Type for lock object. */ +-typedef int lll_lock_t; +- + /* Initializers for lock. */ + #define LLL_LOCK_INITIALIZER (0) + #define LLL_LOCK_INITIALIZER_LOCKED (1) +diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h +--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h 2006-07-29 08:06:06.000000000 +0300 ++++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h 2008-07-27 20:58:00.000000000 +0300 +@@ -278,9 +278,6 @@ + /* We have a separate internal lock implementation which is not tied + to binary compatibility. */ + +-/* Type for lock object. */ +-typedef int lll_lock_t; +- + /* Initializers for lock. */ + #define LLL_LOCK_INITIALIZER (0) + #define LLL_LOCK_INITIALIZER_LOCKED (1) +diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h +--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h 2006-07-29 08:06:06.000000000 +0300 ++++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h 2008-07-27 20:59:39.000000000 +0300 +@@ -237,9 +237,6 @@ + /* We have a separate internal lock implementation which is not tied + to binary compatibility. We can use the lll_mutex_*. */ + +-/* Type for lock object. */ +-typedef int lll_lock_t; +- + extern int lll_unlock_wake_cb (int *__futex) attribute_hidden; + + /* Initializers for lock. */ +diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h +--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h 2006-09-05 17:45:34.000000000 +0300 ++++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h 2008-07-27 20:58:33.000000000 +0300 +@@ -446,9 +446,6 @@ + /* We have a separate internal lock implementation which is not tied + to binary compatibility. */ + +-/* Type for lock object. */ +-typedef int lll_lock_t; +- + /* Initializers for lock. */ + #define LLL_LOCK_INITIALIZER (0) + #define LLL_LOCK_INITIALIZER_LOCKED (1) diff -r d3e603e7c17c -r 61cd4eb6034d patches/glibc/2.6/180-gcc-4.3-sysinclude-path.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/glibc/2.6/180-gcc-4.3-sysinclude-path.patch Mon Jul 28 21:59:40 2008 +0000 @@ -0,0 +1,50 @@ +Patch pointed to by Ryan ARNOLD on the libc-help ML. +See: http://sourceware.org/ml/libc-help/2008-06/msg00063.html + +Forwarded to crosstool-NG by Ioannis E. VENETIS: +See: http://sourceware.org/ml/libc-help/2008-06/msg00063.html + +GCC 4.3 changed the location of some of the header files. I don't +understand why you'd be getting these errors while building GCC since +it provides them. + +With regard to GLIBC, Roland checked in some changes so that the GLIBC +build system could find the new locations of the GCC provided header +files. + +diff -durN glibc-2.6.orig/configure.in glibc-2.6/configure.in +--- glibc-2.6.orig/configure.in 2007-06-08 05:16:36.000000000 +0200 ++++ glibc-2.6/configure.in 2008-06-24 18:38:46.000000000 +0200 +@@ -911,8 +911,12 @@ + # header directory and add that to the list. NOTE: Only does the right + # 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 ++ for d in include include-fixed; do ++ i=`$CC -print-file-name="$d"` && test "x$i" != x && test "x$i" != "x$d" && ++ SYSINCLUDES="$SYSINCLUDES -isystem $i" ++ done ++ SYSINCLUDES="$SYSINCLUDES \ + -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`" + if test -n "$CXX"; then + cxxversion=`$CXX -dumpversion 2>&AS_MESSAGE_LOG_FD` && +diff -durN glibc-2.6.orig/configure glibc-2.6/configure +--- glibc-2.6.orig/configure 2008-06-24 18:35:34.000000000 +0200 ++++ glibc-2.6/configure 2008-06-24 18:38:46.000000000 +0200 +@@ -4562,8 +4562,12 @@ + # header directory and add that to the list. NOTE: Only does the right + # 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 ++ for d in include include-fixed; do ++ i=`$CC -print-file-name="$d"` && test "x$i" != "x$d" && ++ SYSINCLUDES="$SYSINCLUDES -isystem $i" ++ done ++ SYSINCLUDES="$SYSINCLUDES \ + -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`" + if test -n "$CXX"; then + cxxversion=`$CXX -dumpversion 2>&5` && diff -r d3e603e7c17c -r 61cd4eb6034d patches/glibc/2.6/190-alpha-atfcts.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/glibc/2.6/190-alpha-atfcts.patch Mon Jul 28 21:59:40 2008 +0000 @@ -0,0 +1,11 @@ +--- glibc-2.6/sysdeps/unix/sysv/linux/kernel-features.h 2006-07-29 07:43:27.000000000 +0300 ++++ glibc-2.6/sysdeps/unix/sysv/linux/kernel-features.h.new 2008-07-26 08:45:06.000000000 +0300 +@@ -445,7 +445,7 @@ + /* The *at syscalls were introduced just after 2.6.16-rc1. Due to the way the + kernel versions are advertised we can only rely on 2.6.17 to have + the code. */ +-#if __LINUX_KERNEL_VERSION >= 0x020611 ++#if __LINUX_KERNEL_VERSION >= 0x020611 && !defined __alpha__ + # define __ASSUME_ATFCTS 1 + #endif + diff -r d3e603e7c17c -r 61cd4eb6034d patches/glibc/2.6/200-alpha-ptr_mangle.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/glibc/2.6/200-alpha-ptr_mangle.patch Mon Jul 28 21:59:40 2008 +0000 @@ -0,0 +1,103 @@ +--- glibc-2.6.orig/sysdeps/unix/alpha/sysdep.h ++++ glibc-2.6/sysdeps/unix/alpha/sysdep.h +@@ -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 +- +-#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 */ +--- glibc-2.6.orig/sysdeps/unix/sysv/linux/alpha/sysdep.h ++++ glibc-2.6/sysdeps/unix/sysv/linux/alpha/sysdep.h +@@ -29,6 +29,8 @@ + /* There is some commonality. */ + #include + ++#include ++ + /* For Linux we can use the system call table in the header file + /usr/include/asm/unistd.h + of the kernel. But these symbols do not follow the SYS_* syntax +@@ -96,4 +96,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 -r d3e603e7c17c -r 61cd4eb6034d patches/glibc/2.6/210-lll_lock_t.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/glibc/2.6/210-lll_lock_t.patch Mon Jul 28 21:59:40 2008 +0000 @@ -0,0 +1,237 @@ +Patch provided bu Ioannis E. VENETIS + +Using: + +typedef int lll_lock_t; + +creates problems during compilation. Since glibc 2.7 got rid of the 'typedef' and +uses directly 'int', we do the same here. + +diff -Naur glibc-2.6/nptl/allocatestack.c glibc-2.6.new/nptl/allocatestack.c +--- glibc-2.6/nptl/allocatestack.c 2006-08-23 20:39:47.000000000 +0300 ++++ glibc-2.6.new/nptl/allocatestack.c 2008-07-27 20:56:19.000000000 +0300 +@@ -103,7 +103,7 @@ + static size_t stack_cache_actsize; + + /* Mutex protecting this variable. */ +-static lll_lock_t stack_cache_lock = LLL_LOCK_INITIALIZER; ++static int stack_cache_lock = LLL_LOCK_INITIALIZER; + + /* List of queued stack frames. */ + static LIST_HEAD (stack_cache); +diff -Naur glibc-2.6/nptl/descr.h glibc-2.6.new/nptl/descr.h +--- glibc-2.6/nptl/descr.h 2006-09-24 20:10:55.000000000 +0300 ++++ glibc-2.6.new/nptl/descr.h 2008-07-27 20:54:41.000000000 +0300 +@@ -304,10 +304,10 @@ + int parent_cancelhandling; + + /* Lock to synchronize access to the descriptor. */ +- lll_lock_t lock; ++ int lock; + + /* Lock for synchronizing setxid calls. */ +- lll_lock_t setxid_futex; ++ int setxid_futex; + + #if HP_TIMING_AVAIL + /* Offset of the CPU clock at start thread start time. */ +diff -Naur glibc-2.6/nptl/pthread_attr_init.c glibc-2.6.new/nptl/pthread_attr_init.c +--- glibc-2.6/nptl/pthread_attr_init.c 2004-03-19 01:56:31.000000000 +0200 ++++ glibc-2.6.new/nptl/pthread_attr_init.c 2008-07-27 20:55:03.000000000 +0300 +@@ -27,7 +27,7 @@ + + + struct pthread_attr *__attr_list; +-lll_lock_t __attr_list_lock = LLL_LOCK_INITIALIZER; ++int __attr_list_lock = LLL_LOCK_INITIALIZER; + + + int +diff -Naur glibc-2.6/nptl/pthreadP.h glibc-2.6.new/nptl/pthreadP.h +--- glibc-2.6/nptl/pthreadP.h 2006-08-23 20:42:52.000000000 +0300 ++++ glibc-2.6.new/nptl/pthreadP.h 2008-07-27 20:56:40.000000000 +0300 +@@ -143,7 +143,7 @@ + + /* Attribute handling. */ + extern struct pthread_attr *__attr_list attribute_hidden; +-extern lll_lock_t __attr_list_lock attribute_hidden; ++extern int __attr_list_lock attribute_hidden; + + /* First available RT signal. */ + extern int __current_sigrtmin attribute_hidden; +diff -Naur glibc-2.6/nptl/semaphoreP.h glibc-2.6.new/nptl/semaphoreP.h +--- glibc-2.6/nptl/semaphoreP.h 2006-05-11 20:08:37.000000000 +0300 ++++ glibc-2.6.new/nptl/semaphoreP.h 2008-07-27 20:55:42.000000000 +0300 +@@ -48,7 +48,7 @@ + extern void *__sem_mappings attribute_hidden; + + /* Lock to protect the search tree. */ +-extern lll_lock_t __sem_mappings_lock attribute_hidden; ++extern int __sem_mappings_lock attribute_hidden; + + + /* Initializer for mountpoint. */ +diff -Naur glibc-2.6/nptl/sem_open.c glibc-2.6.new/nptl/sem_open.c +--- glibc-2.6/nptl/sem_open.c 2006-05-11 20:09:43.000000000 +0300 ++++ glibc-2.6.new/nptl/sem_open.c 2008-07-27 20:55:22.000000000 +0300 +@@ -147,7 +147,7 @@ + void *__sem_mappings attribute_hidden; + + /* Lock to protect the search tree. */ +-lll_lock_t __sem_mappings_lock attribute_hidden = LLL_LOCK_INITIALIZER; ++int __sem_mappings_lock attribute_hidden = LLL_LOCK_INITIALIZER; + + + /* Search for existing mapping and if possible add the one provided. */ +diff -Naur glibc-2.6/nptl/pthread_once.c glibc-2.6.new/nptl/pthread_once.c +--- glibc-2.6/nptl/pthread_once.c 2002-11-27 00:50:31.000000000 +0200 ++++ glibc-2.6.new/nptl/pthread_once.c 2008-07-27 20:57:12.000000000 +0300 +@@ -22,7 +22,7 @@ + + + +-static lll_lock_t once_lock = LLL_LOCK_INITIALIZER; ++static int once_lock = LLL_LOCK_INITIALIZER; + + + int +diff -Naur glibc-2.6/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h +--- glibc-2.6/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h 2006-07-29 08:06:07.000000000 +0300 ++++ glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h 2008-07-27 20:59:15.000000000 +0300 +@@ -230,9 +230,6 @@ + /* Our internal lock implementation is identical to the binary-compatible + mutex implementation. */ + +-/* Type for lock object. */ +-typedef int lll_lock_t; +- + /* Initializers for lock. */ + #define LLL_LOCK_INITIALIZER (0) + #define LLL_LOCK_INITIALIZER_LOCKED (1) +diff -Naur glibc-2.6/nptl/sysdeps/unix/sysv/linux/fork.c glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/fork.c +--- glibc-2.6/nptl/sysdeps/unix/sysv/linux/fork.c 2003-12-21 01:37:13.000000000 +0200 ++++ glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/fork.c 2008-07-27 21:00:01.000000000 +0300 +@@ -183,7 +183,7 @@ + } + + /* Initialize the fork lock. */ +- __fork_lock = (lll_lock_t) LLL_LOCK_INITIALIZER; ++ __fork_lock = (int) LLL_LOCK_INITIALIZER; + } + else + { +diff -Naur glibc-2.6/nptl/sysdeps/unix/sysv/linux/fork.h glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/fork.h +--- glibc-2.6/nptl/sysdeps/unix/sysv/linux/fork.h 2006-05-15 23:19:43.000000000 +0300 ++++ glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/fork.h 2008-07-27 20:58:49.000000000 +0300 +@@ -26,7 +26,7 @@ + extern unsigned long int *__fork_generation_pointer attribute_hidden; + + /* Lock to protect allocation and deallocation of fork handlers. */ +-extern lll_lock_t __fork_lock attribute_hidden; ++extern int __fork_lock attribute_hidden; + + /* Elements of the fork handler lists. */ + struct fork_handler +diff -Naur glibc-2.6/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h +--- glibc-2.6/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h 2006-09-05 17:44:25.000000000 +0300 ++++ glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h 2008-07-27 21:00:19.000000000 +0300 +@@ -436,9 +436,6 @@ + /* We have a separate internal lock implementation which is not tied + to binary compatibility. */ + +-/* Type for lock object. */ +-typedef int lll_lock_t; +- + /* Initializers for lock. */ + #define LLL_LOCK_INITIALIZER (0) + #define LLL_LOCK_INITIALIZER_LOCKED (1) +diff -Naur glibc-2.6/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h +--- glibc-2.6/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h 2006-07-29 08:06:07.000000000 +0300 ++++ glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h 2008-07-27 20:58:16.000000000 +0300 +@@ -223,9 +223,6 @@ + /* We have a separate internal lock implementation which is not tied + to binary compatibility. We can use the lll_mutex_*. */ + +-/* Type for lock object. */ +-typedef int lll_lock_t; +- + extern int lll_unlock_wake_cb (int *__futex) attribute_hidden; + + /* Initializers for lock. */ +diff -Naur glibc-2.6/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h +--- glibc-2.6/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h 2006-07-29 08:06:07.000000000 +0300 ++++ glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h 2008-07-27 21:00:36.000000000 +0300 +@@ -254,9 +254,6 @@ + /* Our internal lock implementation is identical to the binary-compatible + mutex implementation. */ + +-/* Type for lock object. */ +-typedef int lll_lock_t; +- + /* Initializers for lock. */ + #define LLL_LOCK_INITIALIZER (0) + #define LLL_LOCK_INITIALIZER_LOCKED (1) +diff -Naur glibc-2.6/nptl/sysdeps/unix/sysv/linux/register-atfork.c glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/register-atfork.c +--- glibc-2.6/nptl/sysdeps/unix/sysv/linux/register-atfork.c 2005-12-22 00:17:21.000000000 +0200 ++++ glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/register-atfork.c 2008-07-27 21:00:55.000000000 +0300 +@@ -24,7 +24,7 @@ + + + /* Lock to protect allocation and deallocation of fork handlers. */ +-lll_lock_t __fork_lock = LLL_LOCK_INITIALIZER; ++int __fork_lock = LLL_LOCK_INITIALIZER; + + + /* Number of pre-allocated handler entries. */ +diff -Naur glibc-2.6/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h +--- glibc-2.6/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h 2006-07-29 08:06:07.000000000 +0300 ++++ glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h 2008-07-27 21:01:14.000000000 +0300 +@@ -309,9 +309,6 @@ + /* We have a separate internal lock implementation which is not tied + to binary compatibility. We can use the lll_mutex_*. */ + +-/* Type for lock object. */ +-typedef int lll_lock_t; +- + /* Initializers for lock. */ + #define LLL_LOCK_INITIALIZER (0) + #define LLL_LOCK_INITIALIZER_LOCKED (1) +diff -Naur glibc-2.6/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h +--- glibc-2.6/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h 2006-07-29 08:06:06.000000000 +0300 ++++ glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h 2008-07-27 20:58:00.000000000 +0300 +@@ -278,9 +278,6 @@ + /* We have a separate internal lock implementation which is not tied + to binary compatibility. */ + +-/* Type for lock object. */ +-typedef int lll_lock_t; +- + /* Initializers for lock. */ + #define LLL_LOCK_INITIALIZER (0) + #define LLL_LOCK_INITIALIZER_LOCKED (1) +diff -Naur glibc-2.6/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h +--- glibc-2.6/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h 2006-07-29 08:06:06.000000000 +0300 ++++ glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h 2008-07-27 20:59:39.000000000 +0300 +@@ -237,9 +237,6 @@ + /* We have a separate internal lock implementation which is not tied + to binary compatibility. We can use the lll_mutex_*. */ + +-/* Type for lock object. */ +-typedef int lll_lock_t; +- + extern int lll_unlock_wake_cb (int *__futex) attribute_hidden; + + /* Initializers for lock. */ +diff -Naur glibc-2.6/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h +--- glibc-2.6/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h 2006-09-05 17:45:34.000000000 +0300 ++++ glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h 2008-07-27 20:58:33.000000000 +0300 +@@ -446,9 +446,6 @@ + /* We have a separate internal lock implementation which is not tied + to binary compatibility. */ + +-/* Type for lock object. */ +-typedef int lll_lock_t; +- + /* Initializers for lock. */ + #define LLL_LOCK_INITIALIZER (0) + #define LLL_LOCK_INITIALIZER_LOCKED (1) diff -r d3e603e7c17c -r 61cd4eb6034d patches/glibc/2.7/180-gcc-4.3-sysinclude-path.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/glibc/2.7/180-gcc-4.3-sysinclude-path.patch Mon Jul 28 21:59:40 2008 +0000 @@ -0,0 +1,50 @@ +Patch pointed to by Ryan ARNOLD on the libc-help ML. +See: http://sourceware.org/ml/libc-help/2008-06/msg00063.html + +Forwarded to crosstool-NG by Ioannis E. VENETIS: +See: http://sourceware.org/ml/libc-help/2008-06/msg00063.html + +GCC 4.3 changed the location of some of the header files. I don't +understand why you'd be getting these errors while building GCC since +it provides them. + +With regard to GLIBC, Roland checked in some changes so that the GLIBC +build system could find the new locations of the GCC provided header +files. + +diff -durN glibc-2.7.orig/configure.in glibc-2.7/configure.in +--- glibc-2.7.orig/configure.in 2007-06-08 05:16:36.000000000 +0200 ++++ glibc-2.7/configure.in 2008-06-24 18:38:46.000000000 +0200 +@@ -911,8 +911,12 @@ + # header directory and add that to the list. NOTE: Only does the right + # 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 ++ for d in include include-fixed; do ++ i=`$CC -print-file-name="$d"` && test "x$i" != x && test "x$i" != "x$d" && ++ SYSINCLUDES="$SYSINCLUDES -isystem $i" ++ done ++ SYSINCLUDES="$SYSINCLUDES \ + -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`" + if test -n "$CXX"; then + cxxversion=`$CXX -dumpversion 2>&AS_MESSAGE_LOG_FD` && +diff -durN glibc-2.7.orig/configure glibc-2.7/configure +--- glibc-2.7.orig/configure 2008-06-24 18:35:34.000000000 +0200 ++++ glibc-2.7/configure 2008-06-24 18:38:46.000000000 +0200 +@@ -5062,8 +5062,12 @@ + # header directory and add that to the list. NOTE: Only does the right + # 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 ++ for d in include include-fixed; do ++ i=`$CC -print-file-name="$d"` && test "x$i" != "x$d" && ++ SYSINCLUDES="$SYSINCLUDES -isystem $i" ++ done ++ SYSINCLUDES="$SYSINCLUDES \ + -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`" + if test -n "$CXX"; then + cxxversion=`$CXX -dumpversion 2>&5` && diff -r d3e603e7c17c -r 61cd4eb6034d patches/glibc/2.7/180-gcc-4.3_sysinclude_path.patch --- a/patches/glibc/2.7/180-gcc-4.3_sysinclude_path.patch Mon Jul 28 21:32:33 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -Patch pointed to by Ryan ARNOLD on the libc-help ML. -See: http://sourceware.org/ml/libc-help/2008-06/msg00063.html - -Forwarded to crosstool-NG by Ioannis E. VENETIS: -See: http://sourceware.org/ml/libc-help/2008-06/msg00063.html - -GCC 4.3 changed the location of some of the header files. I don't -understand why you'd be getting these errors while building GCC since -it provides them. - -With regard to GLIBC, Roland checked in some changes so that the GLIBC -build system could find the new locations of the GCC provided header -files. - -diff -durN glibc-2.7.orig/configure.in glibc-2.7/configure.in ---- glibc-2.7.orig/configure.in 2007-06-08 05:16:36.000000000 +0200 -+++ glibc-2.7/configure.in 2008-06-24 18:38:46.000000000 +0200 -@@ -911,8 +911,12 @@ - # header directory and add that to the list. NOTE: Only does the right - # 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 -+ for d in include include-fixed; do -+ i=`$CC -print-file-name="$d"` && test "x$i" != x && test "x$i" != "x$d" && -+ SYSINCLUDES="$SYSINCLUDES -isystem $i" -+ done -+ SYSINCLUDES="$SYSINCLUDES \ - -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`" - if test -n "$CXX"; then - cxxversion=`$CXX -dumpversion 2>&AS_MESSAGE_LOG_FD` && -diff -durN glibc-2.7.orig/configure glibc-2.7/configure ---- glibc-2.7.orig/configure 2008-06-24 18:35:34.000000000 +0200 -+++ glibc-2.7/configure 2008-06-24 18:38:46.000000000 +0200 -@@ -5062,8 +5062,12 @@ - # header directory and add that to the list. NOTE: Only does the right - # 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 -+ for d in include include-fixed; do -+ i=`$CC -print-file-name="$d"` && test "x$i" != "x$d" && -+ SYSINCLUDES="$SYSINCLUDES -isystem $i" -+ done -+ SYSINCLUDES="$SYSINCLUDES \ - -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`" - if test -n "$CXX"; then - cxxversion=`$CXX -dumpversion 2>&5` && diff -r d3e603e7c17c -r 61cd4eb6034d patches/glibc/ports-2.6.1/120-lll_lock_t.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/glibc/ports-2.6.1/120-lll_lock_t.patch Mon Jul 28 21:59:40 2008 +0000 @@ -0,0 +1,156 @@ +Propagate the patch from base glibc that changes lll_lock_t into a plain int, +without using a typedef, as glibc-2.7 now does. + +diff -durN glibc-ports-2.6.1.orig/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-ports-2.6.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h +--- glibc-ports-2.6.1.orig/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2006-08-04 20:56:15.000000000 +0200 ++++ glibc-ports-2.6.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2008-07-28 23:49:29.000000000 +0200 +@@ -260,9 +260,6 @@ + /* Our internal lock implementation is identical to the binary-compatible + mutex implementation. */ + +-/* Type for lock object. */ +-typedef int lll_lock_t; +- + /* Initializers for lock. */ + #define LLL_LOCK_INITIALIZER (0) + #define LLL_LOCK_INITIALIZER_LOCKED (1) +diff -durN glibc-ports-2.6.1.orig/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c glibc-ports-2.6.1/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c +--- glibc-ports-2.6.1.orig/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c 2006-07-14 15:51:24.000000000 +0200 ++++ glibc-ports-2.6.1/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c 2008-07-28 23:49:56.000000000 +0200 +@@ -25,7 +25,7 @@ + + + void +-__lll_lock_wait (lll_lock_t *futex) ++__lll_lock_wait (int *futex) + { + do + { +@@ -38,7 +38,7 @@ + + + int +-__lll_timedlock_wait (lll_lock_t *futex, const struct timespec *abstime) ++__lll_timedlock_wait (int *futex, const struct timespec *abstime) + { + /* Reject invalid timeouts. */ + if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000) +@@ -78,7 +78,7 @@ + /* These don't get included in libc.so */ + #ifdef IS_IN_libpthread + int +-lll_unlock_wake_cb (lll_lock_t *futex) ++lll_unlock_wake_cb (int *futex) + { + int val = atomic_exchange_rel (futex, 0); + +diff -durN glibc-ports-2.6.1.orig/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h glibc-ports-2.6.1/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h +--- glibc-ports-2.6.1.orig/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h 2006-09-07 18:34:43.000000000 +0200 ++++ glibc-ports-2.6.1/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h 2008-07-28 23:50:54.000000000 +0200 +@@ -43,11 +43,6 @@ + /* Initialize locks to zero. */ + #define LLL_MUTEX_LOCK_INITIALIZER (0) + +- +-/* Type for lock object. */ +-typedef int lll_lock_t; +- +- + #define lll_futex_wait(futexp, val) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ +@@ -108,7 +103,7 @@ + }) + + static inline int __attribute__((always_inline)) +-__lll_mutex_trylock(lll_lock_t *futex) ++__lll_mutex_trylock(int *futex) + { + return atomic_compare_and_exchange_val_acq (futex, 1, 0) != 0; + } +@@ -124,17 +119,17 @@ + + + static inline int __attribute__((always_inline)) +-__lll_mutex_cond_trylock(lll_lock_t *futex) ++__lll_mutex_cond_trylock(int *futex) + { + return atomic_compare_and_exchange_val_acq (futex, 2, 0) != 0; + } + #define lll_mutex_cond_trylock(lock) __lll_mutex_cond_trylock (&(lock)) + + +-extern void __lll_lock_wait (lll_lock_t *futex) attribute_hidden; ++extern void __lll_lock_wait (int *futex) attribute_hidden; + + static inline void __attribute__((always_inline)) +-__lll_mutex_lock(lll_lock_t *futex) ++__lll_mutex_lock(int *futex) + { + if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0) + __lll_lock_wait (futex); +@@ -155,7 +150,7 @@ + __lll_robust_mutex_lock (&(futex), id) + + static inline void __attribute__ ((always_inline)) +-__lll_mutex_cond_lock (lll_lock_t *futex) ++__lll_mutex_cond_lock (int *futex) + { + if (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0) + __lll_lock_wait (futex); +@@ -167,13 +162,13 @@ + __lll_robust_mutex_lock (&(futex), (id) | FUTEX_WAITERS) + + +-extern int __lll_timedlock_wait (lll_lock_t *futex, const struct timespec *) ++extern int __lll_timedlock_wait (int *futex, const struct timespec *) + attribute_hidden; + extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *) + attribute_hidden; + + static inline int __attribute__ ((always_inline)) +-__lll_mutex_timedlock (lll_lock_t *futex, const struct timespec *abstime) ++__lll_mutex_timedlock (int *futex, const struct timespec *abstime) + { + int result = 0; + if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0) +@@ -197,7 +192,7 @@ + + + static inline void __attribute__ ((always_inline)) +-__lll_mutex_unlock (lll_lock_t *futex) ++__lll_mutex_unlock (int *futex) + { + int val = atomic_exchange_rel (futex, 0); + if (__builtin_expect (val > 1, 0)) +@@ -218,7 +213,7 @@ + + + static inline void __attribute__ ((always_inline)) +-__lll_mutex_unlock_force (lll_lock_t *futex) ++__lll_mutex_unlock_force (int *futex) + { + (void) atomic_exchange_rel (futex, 0); + lll_futex_wake (futex, 1); +@@ -239,7 +234,7 @@ + #define THREAD_INIT_LOCK(PD, LOCK) \ + (PD)->LOCK = LLL_LOCK_INITIALIZER + +-extern int lll_unlock_wake_cb (lll_lock_t *__futex) attribute_hidden; ++extern int lll_unlock_wake_cb (int *__futex) attribute_hidden; + + /* The states of a lock are: + 0 - untaken +diff -durN glibc-ports-2.6.1.orig/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h glibc-ports-2.6.1/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h +--- glibc-ports-2.6.1.orig/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h 2006-08-04 20:54:56.000000000 +0200 ++++ glibc-ports-2.6.1/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h 2008-07-28 23:51:14.000000000 +0200 +@@ -227,9 +227,6 @@ + /* Our internal lock implementation is identical to the binary-compatible + mutex implementation. */ + +-/* Type for lock object. */ +-typedef int lll_lock_t; +- + /* Initializers for lock. */ + #define LLL_LOCK_INITIALIZER (0) + #define LLL_LOCK_INITIALIZER_LOCKED (1)