From ffd2d3e0b0ac6b10b12ddc1e8747a0fb8b847667 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 13 Aug 2012 00:02:34 +0000 Subject: Mon Aug 13 00:02:34 UTC 2012 --- multilib-staging/binutils-multilib/PKGBUILD | 89 ++++++++ .../binutils-multilib/binutils.install | 17 ++ multilib-staging/gcc-multilib/PKGBUILD | 38 ++-- .../gcc-multilib/gcc-4.7.1-libgo-mksysinfo.patch | 15 ++ multilib-staging/lib32-glibc/PKGBUILD | 128 ++++++++++++ .../glibc-2.15-fix-res_query-assert.patch | 51 +++++ .../lib32-glibc/glibc-2.15-revert-c5a0802a.patch | 226 +++++++++++++++++++++ .../lib32-glibc/glibc-2.16-rpcgen-cpp-path.patch | 68 +++++++ multilib-staging/lib32-glibc/lib32-glibc.conf | 1 + 9 files changed, 611 insertions(+), 22 deletions(-) create mode 100644 multilib-staging/binutils-multilib/PKGBUILD create mode 100644 multilib-staging/binutils-multilib/binutils.install create mode 100644 multilib-staging/gcc-multilib/gcc-4.7.1-libgo-mksysinfo.patch create mode 100644 multilib-staging/lib32-glibc/PKGBUILD create mode 100644 multilib-staging/lib32-glibc/glibc-2.15-fix-res_query-assert.patch create mode 100644 multilib-staging/lib32-glibc/glibc-2.15-revert-c5a0802a.patch create mode 100644 multilib-staging/lib32-glibc/glibc-2.16-rpcgen-cpp-path.patch create mode 100644 multilib-staging/lib32-glibc/lib32-glibc.conf (limited to 'multilib-staging') diff --git a/multilib-staging/binutils-multilib/PKGBUILD b/multilib-staging/binutils-multilib/PKGBUILD new file mode 100644 index 000000000..53017964d --- /dev/null +++ b/multilib-staging/binutils-multilib/PKGBUILD @@ -0,0 +1,89 @@ +# $Id: PKGBUILD 75001 2012-08-11 11:24:40Z heftig $ +# Maintainer: Jan Alexander Steffens (heftig) +# Contributor: Allan McRae + +# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc + +pkgname=binutils-multilib +pkgver=2.22 +pkgrel=10 +_date=20120323 +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/" +license=('GPL') +groups=('multilib-devel') +provides=("binutils=$pkgver-$pkgrel") +conflicts=('binutils') +depends=('glibc>=2.16' 'zlib') +makedepends=('gcc-multilib') # Make sure we compile this with gcc-multilib +checkdepends=('dejagnu') +options=('!libtool' '!distcc' '!ccache') +install=binutils.install +source=(http://mirrors.kernel.org/archlinux/other/binutils/binutils-${pkgver}_${_date}.tar.bz2) +md5sums=('de2ac4298732827f8af706fc24020330') + +build() { + cd ${srcdir} + mkdir binutils-build && cd binutils-build + + ${srcdir}/binutils/configure --prefix=/usr \ + --with-lib-path=/usr/lib:/usr/local/lib \ + --enable-ld=default --enable-gold \ + --enable-plugins --enable-threads \ + --enable-shared \ + --enable-64-bit-bfd --enable-multilib + + # check the host environment and makes sure all the necessary tools are available + 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 + + # Rebuild libopcodes.a with -fPIC + cp -a opcodes opcodes-pic + make -C opcodes-pic clean + make CFLAGS="$CFLAGS -fPIC" -C opcodes-pic +} + +check() { + cd ${srcdir}/binutils-build + + # do not abort on errors - manually check log files + # gold testsuite does not build with _FORTIFY_SOURCE (due to -O0 -Werror) + make CFLAGS="${CFLAGS/-D_FORTIFY_SOURCE=2/}" \ + CXXFLAGS="${CXXFLAGS/-D_FORTIFY_SOURCE=2/}" -k check || true +} + +package() { + cd ${srcdir}/binutils-build + make prefix=${pkgdir}/usr tooldir=${pkgdir}/usr install + + # Add some useful headers + install -m644 ${srcdir}/binutils/include/libiberty.h ${pkgdir}/usr/include + install -m644 ${srcdir}/binutils/include/demangle.h ${pkgdir}/usr/include + + # install libraries rebuilt with -fPIC + install -m644 libiberty-pic/libiberty.a ${pkgdir}/usr/lib + install -m644 bfd-pic/libbfd.a ${pkgdir}/usr/lib + install -m644 opcodes/libopcodes.a ${pkgdir}/usr/lib + + # Remove Windows/Novell specific man pages + rm -f ${pkgdir}/usr/share/man/man1/{dlltool,nlmconv,windres,windmc}* + + # Remove these symlinks, they are not ABI stable. + # Programs should compile static to the .a file. + rm -f ${pkgdir}/usr/lib/lib{bfd,opcodes}.so + echo "INPUT ( /usr/lib/libbfd.a -liberty -lz )" >${pkgdir}/usr/lib/libbfd.so + echo "INPUT ( /usr/lib/libopcodes.a -lbfd )" >${pkgdir}/usr/lib/libopcodes.so +} diff --git a/multilib-staging/binutils-multilib/binutils.install b/multilib-staging/binutils-multilib/binutils.install new file mode 100644 index 000000000..8bf9f3a47 --- /dev/null +++ b/multilib-staging/binutils-multilib/binutils.install @@ -0,0 +1,17 @@ +infodir=usr/share/info +filelist=(as.info bfd.info binutils.info configure.info gprof.info ld.info standards.info) + +post_upgrade() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + diff --git a/multilib-staging/gcc-multilib/PKGBUILD b/multilib-staging/gcc-multilib/PKGBUILD index d4a2f7ac2..3de3a535a 100644 --- a/multilib-staging/gcc-multilib/PKGBUILD +++ b/multilib-staging/gcc-multilib/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 73094 2012-07-01 03:25:23Z heftig $ +# $Id: PKGBUILD 75002 2012-08-11 11:41:09Z heftig $ # Maintainer: Jan Alexander Steffens (heftig) # Contributor: Allan McRae @@ -8,28 +8,26 @@ 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.7.1 -pkgrel=2 -#_snapshot=4.7-20120505 -_libstdcppmanver=20120605 # Note: check source directory name when updating this +pkgrel=6 +_snapshot=4.7-20120721 +_libstdcppmanver=20120725 # Note: check source directory name when updating this pkgdesc="The GNU Compiler Collection for multilib" arch=('x86_64') license=('GPL' 'LGPL' 'FDL' 'custom') url="http://gcc.gnu.org" makedepends=('binutils-multilib>=2.22' 'libmpc' 'cloog' 'ppl' 'gcc-ada-multilib' - 'lib32-glibc>=2.14') + 'lib32-glibc>=2.16') 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 +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 gcc_pure64-multilib.patch - gcc-4.7.0-cloog-0.17.patch - gcc-4.7.1-libada-pic.patch - gcc-4.7.1-libgo-write.patch) -md5sums=('933e6f15f51c031060af64a9e14149ff' - '767c62f9a047c4434f2345decf1d0819' + gcc-4.7.1-libada-pic.patch + gcc-4.7.1-libgo-write.patch) +md5sums=('a1a53fda426bc6809cede8e85bbaf2a3' + '79c4381f983b71868c02da3379e1e8a2' 'ec24c32d3d1030c2bc8cb2ad2d1dc629' - '575f7d17b022e609447a590e481b18b5' '2acbc9d35cc9d72329dc71d6b1f162ef' 'df82dd175ac566c8a6d46b11ac21f14c') @@ -51,9 +49,6 @@ build() { patch -p1 -i ${srcdir}/gcc_pure64-multilib.patch - # compatibility with latest cloog - patch -p1 -i ${srcdir}/gcc-4.7.0-cloog-0.17.patch - # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53679 patch -p1 -i ${srcdir}/gcc-4.7.1-libgo-write.patch @@ -76,12 +71,13 @@ build() { --disable-libstdcxx-pch --enable-libstdcxx-time \ --enable-gnu-unique-object --enable-linker-build-id \ --with-ppl --enable-cloog-backend=isl \ + --disable-ppl-version-check --disable-cloog-version-check \ --enable-lto --enable-gold --enable-ld=default \ --enable-plugin --with-plugin-ld=ld.gold \ --with-linker-hash-style=gnu \ --enable-multilib --disable-libssp \ --disable-build-with-cxx --disable-build-poststage1-with-cxx \ - --enable-checking=release --with-fpmath=sse + --enable-checking=release make } @@ -100,7 +96,7 @@ check() { package_gcc-libs-multilib() { pkgdesc="Runtime libraries shipped by GCC for multilib" - depends=('glibc>=2.15' "lib32-gcc-libs=$pkgver-$pkgrel") + depends=('glibc>=2.16' "lib32-gcc-libs=$pkgver-$pkgrel") provides=("gcc-libs=$pkgver-$pkgrel") conflicts=('gcc-libs') install=gcc-libs.install @@ -135,7 +131,7 @@ package_gcc-libs-multilib() package_lib32-gcc-libs() { pkgdesc="Runtime libraries shipped by GCC (32-bit)" - depends=('lib32-glibc>=2.15' "gcc-libs>=$pkgver") + depends=('lib32-glibc>=2.16' "gcc-libs>=$pkgver") cd gcc-build make -j1 -C $CHOST/32/libgcc DESTDIR=${pkgdir} install-shared @@ -193,9 +189,7 @@ package_gcc-multilib() rm $pkgdir/usr/share/man/man1/{gccgo,gfortran}.1 rm $pkgdir/usr/share/man/man3/ffi* - # many packages require these symlinks - #install -dm755 ${pkgdir}/lib - #ln -s /usr/bin/cpp ${pkgdir}/lib/cpp + # many packages expect this symlinks ln -s gcc ${pkgdir}/usr/bin/cc # POSIX conformance launcher scripts for c89 and c99 diff --git a/multilib-staging/gcc-multilib/gcc-4.7.1-libgo-mksysinfo.patch b/multilib-staging/gcc-multilib/gcc-4.7.1-libgo-mksysinfo.patch new file mode 100644 index 000000000..427efe8a6 --- /dev/null +++ b/multilib-staging/gcc-multilib/gcc-4.7.1-libgo-mksysinfo.patch @@ -0,0 +1,15 @@ +--- libgo/mksysinfo.sh 2012-06-29 14:23:30.684708901 +0200 ++++ libgo/mksysinfo.sh 2012-06-29 14:23:20.782761973 +0200 +@@ -522,10 +522,10 @@ grep '^const _DT_' gen-sysinfo.go | + # The rusage struct. + rusage=`grep '^type _rusage struct' gen-sysinfo.go` + if test "$rusage" != ""; then +- rusage=`echo $rusage | sed -e 's/type _rusage struct //' -e 's/[{}]//g'` +- rusage=`echo $rusage | sed -e 's/^ *//'` + # Remove anonymous unions from GNU/Linux . + rusage=`echo $rusage | sed -e 's/Godump_[0-9]* struct {\([^}]*\)};/\1/g'` ++ rusage=`echo $rusage | sed -e 's/type _rusage struct //' -e 's/[{}]//g'` ++ rusage=`echo $rusage | sed -e 's/^ *//'` + nrusage= + while test -n "$rusage"; do + field=`echo $rusage | sed -e 's/^\([^;]*\);.*$/\1/'` diff --git a/multilib-staging/lib32-glibc/PKGBUILD b/multilib-staging/lib32-glibc/PKGBUILD new file mode 100644 index 000000000..23f0b9dff --- /dev/null +++ b/multilib-staging/lib32-glibc/PKGBUILD @@ -0,0 +1,128 @@ +# $Id: PKGBUILD 75000 2012-08-11 11:23:15Z heftig $ +# Maintainer: Jan Alexander Steffens (heftig) +# Contributor: Jan de Groot +# Contributor: Allan McRae + +# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc +# NOTE: valgrind requires rebuilt with each major glibc version + +_pkgbasename=glibc +pkgname=lib32-$_pkgbasename +pkgver=2.16.0 +pkgrel=3 +pkgdesc="GNU C Library for multilib" +arch=('x86_64') +url="http://www.gnu.org/software/libc" +license=('GPL' 'LGPL') +makedepends=('gcc-multilib>=4.7') +options=('!strip' '!emptydirs') +source=(http://ftp.gnu.org/gnu/libc/${_pkgbasename}-${pkgver}.tar.xz{,.sig} + glibc-2.15-fix-res_query-assert.patch + glibc-2.15-revert-c5a0802a.patch + glibc-2.16-rpcgen-cpp-path.patch + lib32-glibc.conf) +md5sums=('80b181b02ab249524ec92822c0174cf7' + '2a1221a15575820751c325ef4d2fbb90' + '31f415b41197d85d3bbee3d1eecd06a3' + '0a0383d50d63f1c02919fe9943b82014' + 'ea6a43915474e8276e9361eed6a01280' + '6e052f1cb693d5d3203f50f9d4e8c33b') + +build() { + cd ${srcdir}/${_pkgbasename}-${pkgver} + + # fix res_query assertion + # http://sourceware.org/bugzilla/show_bug.cgi?id=13013 + patch -p1 -i ${srcdir}/glibc-2.15-fix-res_query-assert.patch + + # revert commit c5a0802a - causes various hangs + # https://bugzilla.redhat.com/show_bug.cgi?id=552960 + patch -p1 -i ${srcdir}/glibc-2.15-revert-c5a0802a.patch + + # prevent need for /lib/cpp symlink + # http://sourceware.org/git/?p=glibc.git;a=commit;h=bf9b740a + patch -p1 -i ${srcdir}/glibc-2.16-rpcgen-cpp-path.patch + + cd ${srcdir} + mkdir glibc-build + cd glibc-build + + + # Hack to fix NPTL issues with Xen, only required on 32bit platforms + # TODO: make separate glibc-xen package for i686 + export CFLAGS="${CFLAGS} -mno-tls-direct-seg-refs" + + export CC="gcc -m32" + export CXX="g++ -m32" + echo "slibdir=/usr/lib32" >> configparms + + # remove hardening options from CFLAGS for building libraries + CFLAGS=${CFLAGS/-fstack-protector/} + CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/} + + ${srcdir}/${_pkgbasename}-${pkgver}/configure --prefix=/usr \ + --libdir=/usr/lib32 --libexecdir=/usr/lib32 \ + --with-headers=/usr/include \ + --enable-add-ons=nptl,libidn \ + --enable-obsolete-rpc \ + --enable-kernel=2.6.32 \ + --enable-bind-now --disable-profile \ + --enable-stackguard-randomization \ + --enable-multi-arch i686-unknown-linux-gnu + + # build libraries with hardening disabled + echo "build-programs=no" >> configparms + make + + # re-enable hardening for programs + sed -i "/build-programs=/s#no#yes#" configparms + echo "CC += -fstack-protector -D_FORTIFY_SOURCE=2" >> configparms + echo "CXX += -fstack-protector -D_FORTIFY_SOURCE=2" >> configparms + make + + # remove harding in preparation to run test-suite + sed -i '2,4d' configparms +} + +check() { + cd ${srcdir}/glibc-build + make -k check +} + +package() { + cd ${srcdir}/glibc-build + make install_root=${pkgdir} install + + 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 + + # Do not strip the following files for improved debugging support + # ("improved" as in not breaking gdb and valgrind...): + # ld-${pkgver}.so + # libc-${pkgver}.so + # libpthread-${pkgver}.so + # libthread_db-1.0.so + + cd $pkgdir + strip $STRIP_BINARIES usr/lib32/getconf/* + + strip $STRIP_STATIC usr/lib32/*.a + + strip $STRIP_SHARED usr/lib32/{libanl,libBrokenLocale,libcidn,libcrypt}-*.so \ + usr/lib32/libnss_{compat,db,dns,files,hesiod,nis,nisplus}-*.so \ + usr/lib32/{libdl,libm,libnsl,libresolv,librt,libutil}-*.so \ + usr/lib32/{libmemusage,libpcprofile,libSegFault}.so \ + usr/lib32/{pt_chown,{audit,gconv}/*.so} + + # Dynamic linker + mkdir ${pkgdir}/usr/lib + ln -s ../lib32/ld-linux.so.2 ${pkgdir}/usr/lib/ + + # Add lib32 paths to the default library search path + install -Dm644 "$srcdir/lib32-glibc.conf" "$pkgdir/etc/ld.so.conf.d/lib32-glibc.conf" + + # Symlink /usr/lib32/locale to /usr/lib/locale + ln -s ../lib/locale "$pkgdir/usr/lib32/locale" +} diff --git a/multilib-staging/lib32-glibc/glibc-2.15-fix-res_query-assert.patch b/multilib-staging/lib32-glibc/glibc-2.15-fix-res_query-assert.patch new file mode 100644 index 000000000..a894da9c7 --- /dev/null +++ b/multilib-staging/lib32-glibc/glibc-2.15-fix-res_query-assert.patch @@ -0,0 +1,51 @@ +--- a/resolv/res_query.c ++++ a/resolv/res_query.c +@@ -122,6 +122,7 @@ __libc_res_nquery(res_state statp, + int *resplen2) + { + HEADER *hp = (HEADER *) answer; ++ HEADER *hp2; + int n, use_malloc = 0; + u_int oflags = statp->_flags; + +@@ -239,26 +240,25 @@ __libc_res_nquery(res_state statp, + /* __libc_res_nsend might have reallocated the buffer. */ + hp = (HEADER *) *answerp; + +- /* We simplify the following tests by assigning HP to HP2. It +- is easy to verify that this is the same as ignoring all +- tests of HP2. */ +- HEADER *hp2 = answerp2 ? (HEADER *) *answerp2 : hp; +- +- if (n < (int) sizeof (HEADER) && answerp2 != NULL +- && *resplen2 > (int) sizeof (HEADER)) ++ /* We simplify the following tests by assigning HP to HP2 or ++ vice versa. It is easy to verify that this is the same as ++ ignoring all tests of HP or HP2. */ ++ if (answerp2 == NULL || *resplen2 < (int) sizeof (HEADER)) + { +- /* Special case of partial answer. */ +- assert (hp != hp2); +- hp = hp2; ++ hp2 = hp; + } +- else if (answerp2 != NULL && *resplen2 < (int) sizeof (HEADER) +- && n > (int) sizeof (HEADER)) ++ else + { +- /* Special case of partial answer. */ +- assert (hp != hp2); +- hp2 = hp; ++ hp2 = (HEADER *) *answerp2; ++ if (n < (int) sizeof (HEADER)) ++ { ++ hp = hp2; ++ } + } + ++ /* Make sure both hp and hp2 are defined */ ++ assert((hp != NULL) && (hp2 != NULL)); ++ + if ((hp->rcode != NOERROR || ntohs(hp->ancount) == 0) + && (hp2->rcode != NOERROR || ntohs(hp2->ancount) == 0)) { + #ifdef DEBUG diff --git a/multilib-staging/lib32-glibc/glibc-2.15-revert-c5a0802a.patch b/multilib-staging/lib32-glibc/glibc-2.15-revert-c5a0802a.patch new file mode 100644 index 000000000..d8894723a --- /dev/null +++ b/multilib-staging/lib32-glibc/glibc-2.15-revert-c5a0802a.patch @@ -0,0 +1,226 @@ +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 + + #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 +- LP_OP(cmp) $-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 +- LP_OP(cmp) $-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 +- mov dep_mutex(%rdi), %R8_LP +- 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: + diff --git a/multilib-staging/lib32-glibc/glibc-2.16-rpcgen-cpp-path.patch b/multilib-staging/lib32-glibc/glibc-2.16-rpcgen-cpp-path.patch new file mode 100644 index 000000000..822b57294 --- /dev/null +++ b/multilib-staging/lib32-glibc/glibc-2.16-rpcgen-cpp-path.patch @@ -0,0 +1,68 @@ +diff --git a/sunrpc/rpc_main.c b/sunrpc/rpc_main.c +index 06d951a..2103b10 100644 +--- a/sunrpc/rpc_main.c ++++ b/sunrpc/rpc_main.c +@@ -75,12 +75,9 @@ struct commandline + + static const char *cmdname; + +-#define SVR4_CPP "/usr/ccs/lib/cpp" +-#define SUNOS_CPP "/lib/cpp" +- + static const char *svcclosetime = "120"; + static int cppDefined; /* explicit path for C preprocessor */ +-static const char *CPP = SUNOS_CPP; ++static const char *CPP = "/lib/cpp"; + static const char CPPFLAGS[] = "-C"; + static char *pathbuf; + static int cpp_pid; +@@ -327,23 +324,17 @@ find_cpp (void) + { + struct stat buf; + +- if (stat (CPP, &buf) < 0) +- { /* /lib/cpp or explicit cpp does not exist */ +- if (cppDefined) +- { +- fprintf (stderr, _ ("cannot find C preprocessor: %s \n"), CPP); +- crash (); +- } +- else +- { /* try the other one */ +- CPP = SVR4_CPP; +- if (stat (CPP, &buf) < 0) +- { /* can't find any cpp */ +- fputs (_ ("cannot find any C preprocessor (cpp)\n"), stdout); +- crash (); +- } +- } ++ if (stat (CPP, &buf) == 0) ++ return; ++ ++ if (cppDefined) /* user specified cpp but it does not exist */ ++ { ++ fprintf (stderr, _ ("cannot find C preprocessor: %s\n"), CPP); ++ crash (); + } ++ ++ /* fall back to system CPP */ ++ CPP = "cpp"; + } + + /* +@@ -374,8 +365,13 @@ open_input (const char *infile, const char *define) + close (1); + dup2 (pd[1], 1); + close (pd[0]); +- execv (arglist[0], (char **) arglist); +- perror ("execv"); ++ execvp (arglist[0], (char **) arglist); ++ if (errno == ENOENT) ++ { ++ fprintf (stderr, _ ("cannot find C preprocessor: %s\n"), CPP); ++ exit (1); ++ } ++ perror ("execvp"); + exit (1); + case -1: + perror ("fork"); diff --git a/multilib-staging/lib32-glibc/lib32-glibc.conf b/multilib-staging/lib32-glibc/lib32-glibc.conf new file mode 100644 index 000000000..9b08c3f43 --- /dev/null +++ b/multilib-staging/lib32-glibc/lib32-glibc.conf @@ -0,0 +1 @@ +/usr/lib32 -- cgit v1.2.3-54-g00ecf