From 85828cc2c2c3ef5c0b9b03388b9323d3d163b389 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 4 Jan 2012 23:14:55 +0000 Subject: Wed Jan 4 23:14:55 UTC 2012 --- multilib/binutils-multilib/PKGBUILD | 32 +-- multilib/gcc-multilib/PKGBUILD | 25 +-- multilib/lib32-glibc/PKGBUILD | 51 ++--- .../lib32-glibc/glibc-2.15-lddebug-scopes.patch | 27 +++ multilib/lib32-glibc/glibc-2.15-math64crash.patch | 184 +++++++++++++++++ .../lib32-glibc/glibc-2.15-revert-c5a0802a.patch | 229 +++++++++++++++++++++ 6 files changed, 494 insertions(+), 54 deletions(-) create mode 100644 multilib/lib32-glibc/glibc-2.15-lddebug-scopes.patch create mode 100644 multilib/lib32-glibc/glibc-2.15-math64crash.patch create mode 100644 multilib/lib32-glibc/glibc-2.15-revert-c5a0802a.patch (limited to 'multilib') diff --git a/multilib/binutils-multilib/PKGBUILD b/multilib/binutils-multilib/PKGBUILD index 09bb986dc..e4f77c71d 100644 --- a/multilib/binutils-multilib/PKGBUILD +++ b/multilib/binutils-multilib/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 60241 2011-12-08 12:19:44Z allan $ +# $Id: PKGBUILD 61592 2012-01-04 01:24:05Z allan $ # Maintainer: Jan "heftig" Steffens # Contributor: Allan McRae @@ -6,8 +6,8 @@ pkgname=binutils-multilib pkgver=2.22 -pkgrel=1 -_date=20111201 +pkgrel=4 +_date=20111227 pkgdesc="A set of programs to assemble and manipulate binary and object files for multilib" arch=('x86_64') url="http://www.gnu.org/software/binutils/" @@ -20,7 +20,7 @@ makedepends=('dejagnu' 'gcc-multilib') # Make sure we compile this with gcc-mult options=('!libtool' '!distcc' '!ccache') install=binutils.install source=(http://mirrors.kernel.org/archlinux/other/binutils/binutils-${pkgver}_${_date}.tar.bz2) -md5sums=('77c15027ac112c65fd5f73ca91b0651c') +md5sums=('c2377089c15bb1a1bfaeca8d0e59dd4d') build() { cd ${srcdir} @@ -36,6 +36,17 @@ build() { make configure-host make tooldir=${pkgdir}/usr + + # Rebuild libiberty.a with -fPIC + cp -a libiberty libiberty-pic + make -C libiberty-pic clean + make CFLAGS="$CFLAGS -fPIC" -C libiberty-pic + + # Rebuild libbfd.a with -fPIC + # hidden visability prevent 3rd party shared libraries exporting bfd non-stable API + cp -a bfd bfd-pic + make -C bfd-pic clean + make CFLAGS="$CFLAGS -fPIC -fvisibility=hidden" -C bfd-pic } check() { @@ -53,16 +64,9 @@ package() { install -m644 ${srcdir}/binutils/include/libiberty.h ${pkgdir}/usr/include install -m644 ${srcdir}/binutils/include/demangle.h ${pkgdir}/usr/include - # Rebuild libiberty.a with -fPIC - make -C libiberty clean - make CFLAGS="$CFLAGS -fPIC" -C libiberty - install -m644 libiberty/libiberty.a ${pkgdir}/usr/lib - - # Rebuild libbfd.a with -fPIC - make -C bfd clean - # hidden visability prevent 3rd party shared libraries exporting bfd non-stable API - make CFLAGS="$CFLAGS -fPIC -fvisibility=hidden" -C bfd - install -m644 bfd/libbfd.a ${pkgdir}/usr/lib + # install libraries rebuilt with -fPIC + install -m644 libiberty-pic/libiberty.a ${pkgdir}/usr/lib + install -m644 bfd-pic/libbfd.a ${pkgdir}/usr/lib # Remove Windows/Novell specific man pages rm -f ${pkgdir}/usr/share/man/man1/{dlltool,nlmconv,windres,windmc}* diff --git a/multilib/gcc-multilib/PKGBUILD b/multilib/gcc-multilib/PKGBUILD index 27d180609..fd906c6e5 100644 --- a/multilib/gcc-multilib/PKGBUILD +++ b/multilib/gcc-multilib/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 60283 2011-12-08 22:16:27Z heftig $ +# $Id: PKGBUILD 61593 2012-01-04 01:24:16Z allan $ # Maintainer: Jan "heftig" Steffens # Contributor: Allan McRae @@ -8,9 +8,9 @@ pkgbase='gcc-multilib' pkgname=('gcc-multilib' 'gcc-libs-multilib' 'lib32-gcc-libs' 'gcc-fortran-multilib' 'gcc-objc-multilib' 'gcc-ada-multilib' 'gcc-go-multilib') pkgver=4.6.2 -pkgrel=3 -_snapshot=4.6-20111125 -_libstdcppmanver=20110814 # Note: check source directory name when updating this +pkgrel=5 +_snapshot=4.6-20111223 +_libstdcppmanver=20111215 pkgdesc="The GNU Compiler Collection for multilib" arch=('x86_64') license=('GPL' 'LGPL' 'FDL' 'custom') @@ -21,15 +21,13 @@ checkdepends=('dejagnu') options=('!libtool' '!emptydirs') source=(#ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2 ftp://gcc.gnu.org/pub/gcc/snapshots/${_snapshot}/gcc-${_snapshot}.tar.bz2 - ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/libstdc++-api.${_libstdcppmanver}.man.tar.bz2 + ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/libstdc++-man.${_libstdcppmanver}.tar.bz2 gcc_pure64.patch - gcc-hash-style-both.patch - gcc-pr49720.patch) -md5sums=('922b0ee688669c188d237bbd21d42d07' - 'ce920d2550ff7e042b9f091d27764d8f' + gcc-hash-style-both.patch) +md5sums=('4755b9f6ac0abecbaa2097ed9738406a' + '450772ce32daed97d7383199f8797f33' '4030ee1c08dd1e843c0225b772360e76' - '4df25b623799b148a0703eaeec8fdf3f' - 'f9d7e5b792c59175f3da3f8421447512') + '4df25b623799b148a0703eaeec8fdf3f') if [ -n "${_snapshot}" ]; then _basedir="${srcdir}/gcc-${_snapshot}" @@ -49,9 +47,6 @@ build() { patch -Np1 -i ${srcdir}/gcc_pure64.patch patch -Np0 -i ${srcdir}/gcc-hash-style-both.patch - # fix compiler segfault in binutils testsuite - patch -Np1 -i ${srcdir}/gcc-pr49720.patch - echo ${pkgver} > gcc/BASE-VER cd ${srcdir} @@ -217,7 +212,7 @@ EOF # install the libstdc++ man pages install -dm755 ${pkgdir}/usr/share/man/man3 - install -m644 ${srcdir}/man/man3/* ${pkgdir}/usr/share/man/man3/ + install -m644 ${srcdir}/man3/* ${pkgdir}/usr/share/man/man3/ # Install Runtime Library Exception install -Dm644 ${_basedir}/COPYING.RUNTIME \ diff --git a/multilib/lib32-glibc/PKGBUILD b/multilib/lib32-glibc/PKGBUILD index aebce916d..4cca687a9 100644 --- a/multilib/lib32-glibc/PKGBUILD +++ b/multilib/lib32-glibc/PKGBUILD @@ -1,16 +1,16 @@ -# $Id: PKGBUILD 61006 2011-12-20 11:55:16Z allan $ +# $Id: PKGBUILD 61594 2012-01-04 01:24:30Z allan $ # Maintainer: Jan "heftig" Steffens # Contributor: Jan de Groot # Contributor: Allan McRae # toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc -# NOTE: valgrind requires rebuild with each new glibc version +# NOTE: valgrind requires rebuilt with each major glibc version _pkgbasename=glibc pkgname=lib32-$_pkgbasename -pkgver=2.14.1 -pkgrel=4 -_glibcdate=20111025 +pkgver=2.15 +pkgrel=3 +_glibcdate=20111227 pkgdesc="GNU C Library for multilib" arch=('x86_64') url="http://www.gnu.org/software/libc" @@ -22,27 +22,27 @@ source=(ftp://ftp.archlinux.org/other/glibc/${_pkgbasename}-${pkgver}_${_glibcda glibc-2.10-dont-build-timezone.patch glibc-2.10-bz4781.patch glibc-__i686.patch - glibc-2.12.1-static-shared-getpagesize.patch glibc-2.12.2-ignore-origin-of-privileged-program.patch - glibc-2.13-futex.patch glibc-2.14-libdl-crash.patch glibc-2.14-revert-4768ae77.patch glibc-2.14-reexport-rpc-interface.patch glibc-2.14-reinstall-nis-rpc-headers.patch - glibc-2.14.1-tzfile-overflow.patch + glibc-2.15-lddebug-scopes.patch + glibc-2.15-revert-c5a0802a.patch + glibc-2.15-math64crash.patch lib32-glibc.conf) -md5sums=('c52a15134dfa9f2c94f2ccd4cb155cf1' +md5sums=('6ffdf5832192b92f98bdd125317c0dfc' '4dadb9203b69a3210d53514bb46f41c3' '0c5540efc51c0b93996c51b57a8540ae' '40cd342e21f71f5e49e32622b25acc52' - 'a3ac6f318d680347bb6e2805d42b73b2' 'b042647ea7d6f22ad319e12e796bd13e' - '7d0154b7e17ea218c9fa953599d24cc4' '6970bcfeb3bf88913436d5112d16f588' '7da8c554a3b591c7401d7023b1928afc' 'c5de2a946215d647c8af5432ec4b0da0' '55febbb72139ac7b65757df085024b83' - '178779bfaa1418c709f31c25eb3d8a3e' + '3c219ddfb619b6df903cac4cc42c611d' + '7ae3e426251ae33e73dbad71f9c91378' + 'dc7550e659ddd685bd78a930d15a01f2' 'a8f4549c716cd37244fbf1ed059497f8') build() { @@ -58,24 +58,17 @@ build() { # http://sourceware.org/ml/libc-alpha/2009-07/msg00072.html patch -Np1 -i ${srcdir}/glibc-__i686.patch - # http://sourceware.org/bugzilla/show_bug.cgi?id=11929 - # using Fedora "fix" as patch in that bug report causes breakages... - patch -Np1 -i ${srcdir}/glibc-2.12.1-static-shared-getpagesize.patch - # http://www.exploit-db.com/exploits/15274/ # http://sourceware.org/git/?p=glibc.git;a=patch;h=d14e6b09 (only fedora branch...) patch -Np1 -i ${srcdir}/glibc-2.12.2-ignore-origin-of-privileged-program.patch - # http://sourceware.org/bugzilla/show_bug.cgi?id=12403 - patch -Np1 -i ${srcdir}/glibc-2.13-futex.patch - # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=675155e9 (only fedora branch...) # http://sourceware.org/ml/libc-alpha/2011-06/msg00006.html patch -Np1 -i ${srcdir}/glibc-2.14-libdl-crash.patch # Revert commit causing issues with crappy DNS servers... # Will be removed when workaround becomes annoying to maintain - USE A BETTER DNS SERVER! - # Note that both these patches do not fix the issue completely: + # Note that both these patches appear not to fix the issue completely: # http://sourceware.org/bugzilla/show_bug.cgi?id=13013 # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=032c0ee3 (only fedora branch...) patch -Np1 -i ${srcdir}/glibc-2.14-revert-4768ae77.patch @@ -86,9 +79,17 @@ 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 - # http://sourceware.org/bugzilla/show_bug.cgi?id=13506 - # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=97ac2654 - patch -Np1 -i ${srcdir}/glibc-2.14.1-tzfile-overflow.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 + + # revert optimized math routines that can cause crashes (FS#27736, FS#27743) + # obviously not a real fix... + patch -Np1 -i ${srcdir}/glibc-2.15-math64crash.patch cd ${srcdir} mkdir glibc-build @@ -140,7 +141,7 @@ package() { cd ${srcdir}/glibc-build make install_root=${pkgdir} install - rm -rf ${pkgdir}/{etc,sbin,usr/{bin,sbin,share}} + rm -rf ${pkgdir}/{etc,sbin,usr/{bin,sbin,share},var} # We need one 32 bit specific header file find ${pkgdir}/usr/include -type f -not -name stubs-32.h -delete @@ -158,7 +159,7 @@ package() { strip $STRIP_STATIC usr/lib32/*.a strip $STRIP_SHARED lib32/{libanl,libBrokenLocale,libcidn,libcrypt}-${pkgver}.so \ - lib32/libnss_{compat,dns,files,hesiod,nis,nisplus}-${pkgver}.so \ + lib32/libnss_{compat,db,dns,files,hesiod,nis,nisplus}-${pkgver}.so \ lib32/{libdl,libm,libnsl,libresolv,librt,libutil}-${pkgver}.so \ lib32/{libmemusage,libpcprofile,libSegFault}.so \ usr/lib32/{pt_chown,{audit,gconv}/*.so} 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 +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 +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 , 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 +-#include +- +- +-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 +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 , 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 +-#include +- +- +-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 +-# include +-# 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 +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 +-# include +- +-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 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 + #include + #include +-#include + + #include + +@@ -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 -- cgit v1.2.3-54-g00ecf