summaryrefslogtreecommitdiff
path: root/multilib-testing/lib32-glibc
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2011-12-29 23:14:54 +0000
committerroot <root@rshg054.dnsready.net>2011-12-29 23:14:54 +0000
commit8a823402bd45dc875237a20f174ecbe64e1bae4d (patch)
treef520fcd3f38fc11c721bd183e92d1b65c37ca1a9 /multilib-testing/lib32-glibc
parent5cd3c62bce23c2b25c28b22da71f664b48703ad2 (diff)
Thu Dec 29 23:14:54 UTC 2011
Diffstat (limited to 'multilib-testing/lib32-glibc')
-rw-r--r--multilib-testing/lib32-glibc/PKGBUILD16
-rw-r--r--multilib-testing/lib32-glibc/glibc-2.15-lddebug-scopes.patch27
-rw-r--r--multilib-testing/lib32-glibc/glibc-2.15-revert-c5a0802a.patch229
3 files changed, 270 insertions, 2 deletions
diff --git a/multilib-testing/lib32-glibc/PKGBUILD b/multilib-testing/lib32-glibc/PKGBUILD
index cf07c0b27..63030deb9 100644
--- a/multilib-testing/lib32-glibc/PKGBUILD
+++ b/multilib-testing/lib32-glibc/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 61269 2011-12-27 21:40:57Z heftig $
+# $Id: PKGBUILD 61356 2011-12-28 16:49:01Z heftig $
# Maintainer: Jan "heftig" Steffens <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
@@ -9,7 +9,7 @@
_pkgbasename=glibc
pkgname=lib32-$_pkgbasename
pkgver=2.15
-pkgrel=1
+pkgrel=2
_glibcdate=20111227
pkgdesc="GNU C Library for multilib"
arch=('x86_64')
@@ -27,6 +27,8 @@ source=(ftp://ftp.archlinux.org/other/glibc/${_pkgbasename}-${pkgver}_${_glibcda
glibc-2.14-revert-4768ae77.patch
glibc-2.14-reexport-rpc-interface.patch
glibc-2.14-reinstall-nis-rpc-headers.patch
+ glibc-2.15-lddebug-scopes.patch
+ glibc-2.15-revert-c5a0802a.patch
lib32-glibc.conf)
md5sums=('6ffdf5832192b92f98bdd125317c0dfc'
'4dadb9203b69a3210d53514bb46f41c3'
@@ -37,6 +39,8 @@ md5sums=('6ffdf5832192b92f98bdd125317c0dfc'
'7da8c554a3b591c7401d7023b1928afc'
'c5de2a946215d647c8af5432ec4b0da0'
'55febbb72139ac7b65757df085024b83'
+ '3c219ddfb619b6df903cac4cc42c611d'
+ '7ae3e426251ae33e73dbad71f9c91378'
'a8f4549c716cd37244fbf1ed059497f8')
build() {
@@ -73,6 +77,14 @@ build() {
# http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=bdd816a3 (only fedora branch...)
patch -Np1 -i ${srcdir}/glibc-2.14-reinstall-nis-rpc-headers.patch
+ # propriety nvidia crash - https://bugzilla.redhat.com/show_bug.cgi?id=737223
+ # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=0c95ab64 (only fedora branch...)
+ patch -Np1 -i ${srcdir}/glibc-2.15-lddebug-scopes.patch
+
+ # revert commit c5a0802a - causes various hangs
+ # https://bugzilla.redhat.com/show_bug.cgi?id=769421
+ patch -Np1 -i ${srcdir}/glibc-2.15-revert-c5a0802a.patch
+
cd ${srcdir}
mkdir glibc-build
cd glibc-build
diff --git a/multilib-testing/lib32-glibc/glibc-2.15-lddebug-scopes.patch b/multilib-testing/lib32-glibc/glibc-2.15-lddebug-scopes.patch
new file mode 100644
index 000000000..808cf8d7c
--- /dev/null
+++ b/multilib-testing/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-testing/lib32-glibc/glibc-2.15-revert-c5a0802a.patch b/multilib-testing/lib32-glibc/glibc-2.15-revert-c5a0802a.patch
new file mode 100644
index 000000000..f532b95e8
--- /dev/null
+++ b/multilib-testing/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