diff options
Diffstat (limited to 'multilib/lib32-glibc')
-rw-r--r-- | multilib/lib32-glibc/glibc-2.15-lddebug-scopes.patch | 27 | ||||
-rw-r--r-- | multilib/lib32-glibc/glibc-2.15-math64crash.patch | 184 | ||||
-rw-r--r-- | multilib/lib32-glibc/glibc-2.15-revert-c5a0802a.patch | 229 |
3 files changed, 440 insertions, 0 deletions
diff --git a/multilib/lib32-glibc/glibc-2.15-lddebug-scopes.patch b/multilib/lib32-glibc/glibc-2.15-lddebug-scopes.patch new file mode 100644 index 000000000..808cf8d7c --- /dev/null +++ b/multilib/lib32-glibc/glibc-2.15-lddebug-scopes.patch @@ -0,0 +1,27 @@ +From 0c95ab64cb4ec0d22bb222647d9d20c7b4903e38 Mon Sep 17 00:00:00 2001 +From: Andreas Schwab <schwab@redhat.com> +Date: Fri, 7 Oct 2011 09:31:27 +0200 +Subject: [PATCH] Horrible workaround for horribly broken software + +--- + elf/rtld.c | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/elf/rtld.c b/elf/rtld.c +index 978c609..8422b9f 100644 +--- a/elf/rtld.c ++++ b/elf/rtld.c +@@ -1393,7 +1393,9 @@ of this helper program; chances are you did not intend to run this program.\n\ + char *copy = malloc (len); + if (copy == NULL) + _dl_fatal_printf ("out of memory\n"); +- l->l_libname->name = l->l_name = memcpy (copy, dsoname, len); ++ l->l_libname->name = memcpy (copy, dsoname, len); ++ if (GLRO(dl_debug_mask)) ++ l->l_name = copy; + } + + /* Add the vDSO to the object list. */ +-- +1.7.3.4 + diff --git a/multilib/lib32-glibc/glibc-2.15-math64crash.patch b/multilib/lib32-glibc/glibc-2.15-math64crash.patch new file mode 100644 index 000000000..d315bf266 --- /dev/null +++ b/multilib/lib32-glibc/glibc-2.15-math64crash.patch @@ -0,0 +1,184 @@ +diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile +index be68903..a032da8 100644 +--- a/sysdeps/x86_64/fpu/multiarch/Makefile ++++ b/sysdeps/x86_64/fpu/multiarch/Makefile +@@ -1,5 +1,5 @@ + ifeq ($(subdir),math) +-libm-sysdep_routines += s_floor-c s_ceil-c s_floorf-c s_ceilf-c \ ++libm-sysdep_routines += s_floorf-c s_ceilf-c \ + s_rint-c s_rintf-c s_nearbyint-c s_nearbyintf-c + + ifeq ($(have-mfma4),yes) +diff --git a/sysdeps/x86_64/fpu/multiarch/s_ceil-c.c b/sysdeps/x86_64/fpu/multiarch/s_ceil-c.c +deleted file mode 100644 +index 6a5ea3f..0000000 +--- a/sysdeps/x86_64/fpu/multiarch/s_ceil-c.c ++++ /dev/null +@@ -1,2 +0,0 @@ +-#define __ceil __ceil_c +-#include <sysdeps/ieee754/dbl-64/wordsize-64/s_ceil.c> +diff --git a/sysdeps/x86_64/fpu/multiarch/s_ceil.S b/sysdeps/x86_64/fpu/multiarch/s_ceil.S +deleted file mode 100644 +index d0f8da3..0000000 +--- a/sysdeps/x86_64/fpu/multiarch/s_ceil.S ++++ /dev/null +@@ -1,40 +0,0 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- Contributed by Ulrich Drepper <drepper@gmail.come>, 2011. +- +- The GNU C Library is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. +- +- The GNU C Library is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with the GNU C Library; if not, write to the Free +- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +- 02111-1307 USA. */ +- +-#include <machine/asm.h> +-#include <init-arch.h> +- +- +-ENTRY(__ceil) +- .type __ceil, @gnu_indirect_function +- call __get_cpu_features@plt +- movq %rax, %rdx +- leaq __ceil_sse41(%rip), %rax +- testl $bit_SSE4_1, CPUID_OFFSET+index_SSE4_1(%rdx) +- jnz 2f +- leaq __ceil_c(%rip), %rax +-2: ret +-END(__ceil) +-weak_alias (__ceil, ceil) +- +- +-ENTRY(__ceil_sse41) +- roundsd $2, %xmm0, %xmm0 +- ret +-END(__ceil_sse41) +diff --git a/sysdeps/x86_64/fpu/multiarch/s_floor-c.c b/sysdeps/x86_64/fpu/multiarch/s_floor-c.c +deleted file mode 100644 +index 68733b6..0000000 +--- a/sysdeps/x86_64/fpu/multiarch/s_floor-c.c ++++ /dev/null +@@ -1,3 +0,0 @@ +-#undef __floor +-#define __floor __floor_c +-#include <sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c> +diff --git a/sysdeps/x86_64/fpu/multiarch/s_floor.S b/sysdeps/x86_64/fpu/multiarch/s_floor.S +deleted file mode 100644 +index 514ea95..0000000 +--- a/sysdeps/x86_64/fpu/multiarch/s_floor.S ++++ /dev/null +@@ -1,40 +0,0 @@ +-/* Copyright (C) 2011 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- Contributed by Ulrich Drepper <drepper@gmail.come>, 2011. +- +- The GNU C Library is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. +- +- The GNU C Library is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with the GNU C Library; if not, write to the Free +- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +- 02111-1307 USA. */ +- +-#include <machine/asm.h> +-#include <init-arch.h> +- +- +-ENTRY(__floor) +- .type __floor, @gnu_indirect_function +- call __get_cpu_features@plt +- movq %rax, %rdx +- leaq __floor_sse41(%rip), %rax +- testl $bit_SSE4_1, CPUID_OFFSET+index_SSE4_1(%rdx) +- jnz 2f +- leaq __floor_c(%rip), %rax +-2: ret +-END(__floor) +-weak_alias (__floor, floor) +- +- +-ENTRY(__floor_sse41) +- roundsd $1, %xmm0, %xmm0 +- ret +-END(__floor_sse41) +diff --git a/sysdeps/x86_64/fpu/multiarch/s_sin.c b/sysdeps/x86_64/fpu/multiarch/s_sin.c +deleted file mode 100644 +index 1ba9dbc..0000000 +--- a/sysdeps/x86_64/fpu/multiarch/s_sin.c ++++ /dev/null +@@ -1,31 +0,0 @@ +-#if defined HAVE_FMA4_SUPPORT || defined HAVE_AVX_SUPPORT +-# include <init-arch.h> +-# include <math.h> +-# undef NAN +- +-extern double __cos_sse2 (double); +-extern double __sin_sse2 (double); +-extern double __cos_avx (double); +-extern double __sin_avx (double); +-# ifdef HAVE_FMA4_SUPPORT +-extern double __cos_fma4 (double); +-extern double __sin_fma4 (double); +-# else +-# undef HAS_FMA4 +-# define HAS_FMA4 0 +-# define __cos_fma4 ((void *) 0) +-# define __sin_fma4 ((void *) 0) +-# endif +- +-libm_ifunc (__cos, HAS_FMA4 ? __cos_fma4 : HAS_AVX ? __cos_avx : __cos_sse2); +-weak_alias (__cos, cos) +- +-libm_ifunc (__sin, HAS_FMA4 ? __sin_fma4 : HAS_AVX ? __sin_avx : __sin_sse2); +-weak_alias (__sin, sin) +- +-# define __cos __cos_sse2 +-# define __sin __sin_sse2 +-#endif +- +- +-#include <sysdeps/ieee754/dbl-64/s_sin.c> +diff --git a/sysdeps/x86_64/fpu/multiarch/s_tan.c b/sysdeps/x86_64/fpu/multiarch/s_tan.c +deleted file mode 100644 +index 8f6601e..0000000 +--- a/sysdeps/x86_64/fpu/multiarch/s_tan.c ++++ /dev/null +@@ -1,21 +0,0 @@ +-#if defined HAVE_FMA4_SUPPORT || defined HAVE_AVX_SUPPORT +-# include <init-arch.h> +-# include <math.h> +- +-extern double __tan_sse2 (double); +-extern double __tan_avx (double); +-# ifdef HAVE_FMA4_SUPPORT +-extern double __tan_fma4 (double); +-# else +-# undef HAS_FMA4 +-# define HAS_FMA4 0 +-# define __tan_fma4 ((void *) 0) +-# endif +- +-libm_ifunc (tan, HAS_FMA4 ? __tan_fma4 : HAS_AVX ? __tan_avx : __tan_sse2); +- +-# define tan __tan_sse2 +-#endif +- +- +-#include <sysdeps/ieee754/dbl-64/s_tan.c> diff --git a/multilib/lib32-glibc/glibc-2.15-revert-c5a0802a.patch b/multilib/lib32-glibc/glibc-2.15-revert-c5a0802a.patch new file mode 100644 index 000000000..f532b95e8 --- /dev/null +++ b/multilib/lib32-glibc/glibc-2.15-revert-c5a0802a.patch @@ -0,0 +1,229 @@ +diff -rup a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S +--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2011-12-22 18:04:12.937212834 +0000 ++++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2011-12-22 18:04:42.104222278 +0000 +@@ -137,7 +137,6 @@ __pthread_cond_wait: + cmpl $PI_BIT, %eax + jne 18f + +-90: + movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %ecx + movl %ebp, %edx + xorl %esi, %esi +@@ -151,9 +150,6 @@ __pthread_cond_wait: + sete 16(%esp) + je 19f + +- cmpl $-EAGAIN, %eax +- je 91f +- + /* Normal and PI futexes dont mix. Use normal futex functions only + if the kernel does not support the PI futex functions. */ + cmpl $-ENOSYS, %eax +@@ -398,78 +394,6 @@ __pthread_cond_wait: + #endif + call __lll_unlock_wake + jmp 11b +- +-91: +-.LcleanupSTART2: +- /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to +- call it again. */ +- +- /* Get internal lock. */ +- movl $1, %edx +- xorl %eax, %eax +- LOCK +-#if cond_lock == 0 +- cmpxchgl %edx, (%ebx) +-#else +- cmpxchgl %edx, cond_lock(%ebx) +-#endif +- jz 92f +- +-#if cond_lock == 0 +- movl %ebx, %edx +-#else +- leal cond_lock(%ebx), %edx +-#endif +-#if (LLL_SHARED-LLL_PRIVATE) > 255 +- xorl %ecx, %ecx +-#endif +- cmpl $-1, dep_mutex(%ebx) +- setne %cl +- subl $1, %ecx +- andl $(LLL_SHARED-LLL_PRIVATE), %ecx +-#if LLL_PRIVATE != 0 +- addl $LLL_PRIVATE, %ecx +-#endif +- call __lll_lock_wait +- +-92: +- /* Increment the cond_futex value again, so it can be used as a new +- expected value. */ +- addl $1, cond_futex(%ebx) +- movl cond_futex(%ebx), %ebp +- +- /* Unlock. */ +- LOCK +-#if cond_lock == 0 +- subl $1, (%ebx) +-#else +- subl $1, cond_lock(%ebx) +-#endif +- je 93f +-#if cond_lock == 0 +- movl %ebx, %eax +-#else +- leal cond_lock(%ebx), %eax +-#endif +-#if (LLL_SHARED-LLL_PRIVATE) > 255 +- xorl %ecx, %ecx +-#endif +- cmpl $-1, dep_mutex(%ebx) +- setne %cl +- subl $1, %ecx +- andl $(LLL_SHARED-LLL_PRIVATE), %ecx +-#if LLL_PRIVATE != 0 +- addl $LLL_PRIVATE, %ecx +-#endif +- call __lll_unlock_wake +- +-93: +- /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */ +- xorl %ecx, %ecx +- movl dep_mutex(%ebx), %edi +- jmp 90b +-.LcleanupEND2: +- + .size __pthread_cond_wait, .-__pthread_cond_wait + versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait, + GLIBC_2_3_2) +@@ -642,10 +566,6 @@ __condvar_w_cleanup: + .long .LcleanupEND-.Lsub_cond_futex + .long __condvar_w_cleanup-.LSTARTCODE + .uleb128 0 +- .long .LcleanupSTART2-.LSTARTCODE +- .long .LcleanupEND2-.LcleanupSTART2 +- .long __condvar_w_cleanup-.LSTARTCODE +- .uleb128 0 + .long .LcallUR-.LSTARTCODE + .long .LENDCODE-.LcallUR + .long 0 +Only in b/nptl/sysdeps/unix/sysv/linux/i386/i486: pthread_cond_wait.S.orig +diff -rup a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S +--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2011-12-22 18:04:12.941212837 +0000 ++++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2011-12-22 18:05:05.155229737 +0000 +@@ -23,7 +23,6 @@ + #include <lowlevelcond.h> + #include <tcb-offsets.h> + #include <pthread-pi-defines.h> +-#include <pthread-errnos.h> + + #include <kernel-features.h> + +@@ -137,14 +136,11 @@ __pthread_cond_wait: + cmpl $PI_BIT, %eax + jne 61f + +-90: + movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %esi + movl $SYS_futex, %eax + syscall + + movl $1, %r8d +- cmpq $-EAGAIN, %rax +- je 91f + #ifdef __ASSUME_REQUEUE_PI + jmp 62f + #else +@@ -331,70 +327,6 @@ __pthread_cond_wait: + + 13: movq %r10, %rax + jmp 14b +- +-91: +-.LcleanupSTART2: +- /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to +- call it again. */ +- movq 8(%rsp), %rdi +- +- /* Get internal lock. */ +- movl $1, %esi +- xorl %eax, %eax +- LOCK +-#if cond_lock == 0 +- cmpxchgl %esi, (%rdi) +-#else +- cmpxchgl %esi, cond_lock(%rdi) +-#endif +- jz 92f +- +-#if cond_lock != 0 +- addq $cond_lock, %rdi +-#endif +- cmpq $-1, dep_mutex-cond_lock(%rdi) +- movl $LLL_PRIVATE, %eax +- movl $LLL_SHARED, %esi +- cmovne %eax, %esi +- callq __lll_lock_wait +-#if cond_lock != 0 +- subq $cond_lock, %rdi +-#endif +-92: +- /* Increment the cond_futex value again, so it can be used as a new +- expected value. */ +- incl cond_futex(%rdi) +- movl cond_futex(%rdi), %edx +- +- /* Release internal lock. */ +- LOCK +-#if cond_lock == 0 +- decl (%rdi) +-#else +- decl cond_lock(%rdi) +-#endif +- jz 93f +- +-#if cond_lock != 0 +- addq $cond_lock, %rdi +-#endif +- cmpq $-1, dep_mutex-cond_lock(%rdi) +- movl $LLL_PRIVATE, %eax +- movl $LLL_SHARED, %esi +- cmovne %eax, %esi +- /* The call preserves %rdx. */ +- callq __lll_unlock_wake +-#if cond_lock != 0 +- subq $cond_lock, %rdi +-#endif +-93: +- /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */ +- xorq %r10, %r10 +- movq dep_mutex(%rdi), %r8 +- leaq cond_futex(%rdi), %rdi +- jmp 90b +-.LcleanupEND2: +- + .size __pthread_cond_wait, .-__pthread_cond_wait + versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait, + GLIBC_2_3_2) +@@ -547,15 +479,11 @@ __condvar_cleanup1: + .uleb128 .LcleanupSTART-.LSTARTCODE + .uleb128 .LcleanupEND-.LcleanupSTART + .uleb128 __condvar_cleanup1-.LSTARTCODE +- .uleb128 0 +- .uleb128 .LcleanupSTART2-.LSTARTCODE +- .uleb128 .LcleanupEND2-.LcleanupSTART2 +- .uleb128 __condvar_cleanup1-.LSTARTCODE +- .uleb128 0 ++ .uleb128 0 + .uleb128 .LcallUR-.LSTARTCODE + .uleb128 .LENDCODE-.LcallUR + .uleb128 0 +- .uleb128 0 ++ .uleb128 0 + .Lcstend: + + +Only in b/nptl/sysdeps/unix/sysv/linux/x86_64: pthread_cond_wait.S.orig +Only in b/nptl/sysdeps/unix/sysv/linux/x86_64: pthread_cond_wait.S.rej |