summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD98
1 files changed, 39 insertions, 59 deletions
diff --git a/PKGBUILD b/PKGBUILD
index ecb95b38ea57..31cd162e9c80 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,76 +1,47 @@
-# $Id: PKGBUILD 78834 2012-10-25 13:03:04Z heftig $
+# $Id$
+# Maintainer: Fantix King <fantix.king@gmail.com>
# Upstream Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
-# Maintainer: Fantix King <fantix.king at gmail.com>
# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
# NOTE: valgrind requires rebuilt with each major glibc version
_pkgbasename=glibc
pkgname=libx32-$_pkgbasename
-pkgver=2.16.0
-pkgrel=5.1
+pkgver=2.17_5
+pkgrel=1
pkgdesc="GNU C Library for x32 ABI"
arch=('x86_64')
url="http://www.gnu.org/software/libc"
license=('GPL' 'LGPL')
makedepends=('gcc-multilib-x32>=4.7')
conflicts=('glibc-x32-seed')
+provides=('glibc-x32-seed')
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.16-unlock-mutex.patch
- glibc-2.16-rpcgen-cpp-path.patch
- glibc-2.16-strncasecmp-segfault.patch
- glibc-2.16-strtod-overflow.patch
- glibc-2.16-detect-fma.patch
- glibc-2.16-glob-use-size_t.patch
+source=(http://ftp.gnu.org/gnu/libc/${_pkgbasename}-${pkgver%_*}.tar.xz{,.sig}
+ glibc-2.17-sync-with-linux37.patch
+ glibc-2.17-getaddrinfo-stack-overflow.patch
+ glibc-2.17-regexp-matcher-overrun.patch
libx32-glibc.conf)
-md5sums=('80b181b02ab249524ec92822c0174cf7'
- '2a1221a15575820751c325ef4d2fbb90'
- '31f415b41197d85d3bbee3d1eecd06a3'
- '0afcd8c6020d61684aba63ed5f26bd91'
- 'ea6a43915474e8276e9361eed6a01280'
- 'f042d37cc8ca3459023431809039bc88'
- '61d322f7681a85d3293ada5c3ccc2c7e'
- '2426f593bc43f5499c41d21b57ee0e30'
- 'a441353901992feda4b15a11a20140a1'
+md5sums=('87bf675c8ee523ebda4803e8e1cec638'
+ 'SKIP'
+ 'fb99380d94598cc76d793deebf630022'
+ '56d5f2c09503a348281a20ae404b7de3'
+ '200acc05961b084ee00dde919e64f82d'
'34a4169d2bdc5a3eb83676a0831aae57')
build() {
- cd ${srcdir}/${_pkgbasename}-${pkgver}
+ 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
+ # combination of upstream commits 318cd0b, b540704 and fc1abbe
+ patch -p1 -i ${srcdir}/glibc-2.17-sync-with-linux37.patch
- # prevent hang by locked mutex
- # http://sourceware.org/git/?p=glibc.git;a=patch;h=c30e8edf
- patch -p1 -i ${srcdir}/glibc-2.16-unlock-mutex.patch
+ # CVE-2013-1914 - upstream commit 1cef1b19
+ patch -p1 -i ${srcdir}/glibc-2.17-getaddrinfo-stack-overflow.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
-
- # strncasecmp segfault on i686
- # http://sourceware.org/git/?p=glibc.git;a=commit;h=6db8f737
- patch -p1 -i ${srcdir}/glibc-2.16-strncasecmp-segfault.patch
-
- # strtod integer/buffer overflow
- # http://sourceware.org/git/?p=glibc.git;a=commit;h=da1f4319
- patch -p1 -i ${srcdir}/glibc-2.16-strtod-overflow.patch
-
- # detect FMA supprt
- # http://sourceware.org/git/?p=glibc.git;a=commit;h=a5cfcf08
- patch -p1 -i ${srcdir}/glibc-2.16-detect-fma.patch
-
- # prevent overflow in globc
- # http://sourceware.org/git/?p=glibc.git;a=commit;h=6c62f108
- patch -p1 -i ${srcdir}/glibc-2.16-glob-use-size_t.patch
-
- # ldconfig does not need to look in /usr/lib64 or /usr/libx32 on Arch Linux
- sed -i "s#add_system_dir#do_not_add_system_dir#" sysdeps/unix/sysv/linux/x86_64/dl-cache.h
+ # CVE-2013-0242 - upstream commit a445af0b
+ patch -p1 -i ${srcdir}/glibc-2.17-regexp-matcher-overrun.patch
cd ${srcdir}
mkdir glibc-build
@@ -79,13 +50,14 @@ build() {
#if [[ ${CARCH} = "i686" ]]; then
# 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 CFLAGS="${CFLAGS} -mno-tls-direct-seg-refs"
#fi
if [ -x "/opt/gcc-x32-seed/bin/gcc" ]; then
echo "Using gcc-x32-seed"
- export CC="/opt/gcc-x32-seed/bin/gcc -mx32 -B/opt/gcc-x32-seed/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/"
- export CXX="/opt/gcc-x32-seed/bin/cpp -mx32 -B/opt/gcc-x32-seed/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/"
+ gcc_home=`ls -d /opt/gcc-x32-seed/lib/gcc/x86_64-unknown-linux-gnu/*/`
+ export CC="/opt/gcc-x32-seed/bin/gcc -mx32 -B"${gcc_home}
+ export CXX="/opt/gcc-x32-seed/bin/g++ -mx32 -B"${gcc_home}
else
echo "Using gcc-multilib-x32"
export CC="gcc -mx32"
@@ -93,13 +65,14 @@ build() {
fi
echo "slibdir=/usr/libx32" >> configparms
- # remove hardening options from CFLAGS for building libraries
+ # remove hardening options for building libraries
CFLAGS=${CFLAGS/-fstack-protector/}
- CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/}
+ CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=2/}
- ${srcdir}/${_pkgbasename}-${pkgver}/configure --prefix=/usr \
+ ${srcdir}/${_pkgbasename}-${pkgver%_*}/configure --prefix=/usr \
--libdir=/usr/libx32 --libexecdir=/usr/libx32 \
--with-headers=/usr/include \
+ --with-bugurl=https://bugs.archlinux.org/ \
--enable-add-ons=nptl,libidn \
--enable-obsolete-rpc \
--enable-kernel=2.6.32 \
@@ -123,8 +96,15 @@ build() {
}
check() {
+ # bug to file - the linker commands need to be reordered
+ LDFLAGS=${LDFLAGS/--as-needed,/}
+
cd ${srcdir}/glibc-build
- make check
+ if [ -x "/opt/gcc-x32-seed/bin/gcc" ]; then
+ make check || true
+ else
+ make check
+ fi
}
package() {
@@ -133,7 +113,7 @@ package() {
rm -rf ${pkgdir}/{etc,sbin,usr/{bin,sbin,share},var}
- # We need one 32 bit specific header file
+ # We need one x32 ABI specific header file
find ${pkgdir}/usr/include -type f -not -name stubs-x32.h -delete
# Do not strip the following files for improved debugging support
@@ -144,7 +124,7 @@ package() {
# libthread_db-1.0.so
cd $pkgdir
- strip $STRIP_BINARIES usr/libx32/getconf/* || true
+ strip $STRIP_BINARIES usr/libx32/getconf/*
strip $STRIP_STATIC usr/libx32/*.a