summaryrefslogtreecommitdiff
path: root/core/glibc
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2011-08-21 23:14:35 +0000
committerroot <root@rshg054.dnsready.net>2011-08-21 23:14:35 +0000
commite9a5c646563c984f362db1777f8c6bc7da63a4ab (patch)
tree709694a1605c0b60dc9c0c57718e7fd661924646 /core/glibc
parent839141249778baa4dba0f0511c52b5eded3cd934 (diff)
Sun Aug 21 23:14:34 UTC 2011
Diffstat (limited to 'core/glibc')
-rw-r--r--core/glibc/PKGBUILD25
1 files changed, 20 insertions, 5 deletions
diff --git a/core/glibc/PKGBUILD b/core/glibc/PKGBUILD
index f3a040236..0008d80ac 100644
--- a/core/glibc/PKGBUILD
+++ b/core/glibc/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 128661 2011-06-25 11:56:19Z allan $
+# $Id: PKGBUILD 135924 2011-08-20 07:14:27Z allan $
# Maintainer: Allan McRae <allan@archlinux.org>
# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
@@ -6,15 +6,15 @@
pkgname=glibc
pkgver=2.14
-pkgrel=4
+pkgrel=5
_glibcdate=20110617
pkgdesc="GNU C Library"
arch=('i686' 'x86_64')
url="http://www.gnu.org/software/libc"
license=('GPL' 'LGPL')
groups=('base')
-depends=('linux-api-headers>=2.6.39' 'tzdata')
-makedepends=('gcc>=4.4')
+depends=('linux-api-headers>=3.0' 'tzdata')
+makedepends=('gcc>=4.6')
backup=(etc/locale.gen
etc/nscd.conf)
options=('!strip')
@@ -112,6 +112,10 @@ build() {
echo "slibdir=/lib" >> configparms
+ # remove hardening options from CFLAGS for building libraries
+ CFLAGS=${CFLAGS/-fstack-protector/}
+ CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/}
+
${srcdir}/glibc/configure --prefix=/usr \
--libdir=/usr/lib --libexecdir=/usr/lib \
--with-headers=/usr/include \
@@ -121,8 +125,19 @@ build() {
--enable-bind-now --without-gd \
--without-cvs --disable-profile \
--disable-multi-arch
-
+
+ # build libraries with hardening disabled
+ echo "build-programs=no" >> configparms
make
+
+ # re-enable hardening for programs
+ sed -i "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() {