summaryrefslogtreecommitdiff
path: root/libre/glibc-static/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'libre/glibc-static/PKGBUILD')
-rw-r--r--libre/glibc-static/PKGBUILD92
1 files changed, 0 insertions, 92 deletions
diff --git a/libre/glibc-static/PKGBUILD b/libre/glibc-static/PKGBUILD
deleted file mode 100644
index dc2cd3233..000000000
--- a/libre/glibc-static/PKGBUILD
+++ /dev/null
@@ -1,92 +0,0 @@
-# Maintainer: Márcio Silva <coadde@parabola.nu>
-# based of glibc
-
-_pkgname=glibc
-pkgname=glibc-static
-pkgver=2.22
-pkgrel=4
-pkgdesc="GNU C Library (static libraries only)"
-arch=('i686' 'x86_64' 'armv7h')
-url="http://www.gnu.org/software/libc"
-license=('GPL' 'LGPL')
-depends=('glibc')
-makedepends=('gcc>=5.2')
-options=('!strip' '!docs' 'staticlibs' '!emptydirs')
-source=(http://ftp.gnu.org/gnu/libc/${_pkgname}-${pkgver}.tar.xz{,.sig}
- glibc-2.22-roundup.patch)
-md5sums=('e51e02bf552a0a1fbbdc948fb2f5e83c'
- 'SKIP'
- '8476d7f2bceaacde30ea2b9d4afb4bd1')
-validpgpkeys=('F37CDAB708E65EA183FD1AF625EF0A436C2A4AFF') # Carlos O'Donell
-
-prepare() {
- cd ${srcdir}/glibc-${pkgver}
-
- # glibc-2.21..g2b529a8
- patch -p1 -i $srcdir/glibc-2.22-roundup.patch
-
- mkdir ${srcdir}/glibc-build
-}
-
-build() {
- cd ${srcdir}/glibc-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"
- fi
-
- echo "slibdir=/usr/lib" >> configparms
- echo "rtlddir=/usr/lib" >> configparms
-
- # remove hardening options for building libraries
- CFLAGS=${CFLAGS/-fstack-protector-strong/}
- CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=2/}
-
- ${srcdir}/${_pkgname}-${pkgver}/configure --prefix=/usr \
- --libdir=/usr/lib \
- --with-headers=/usr/include \
- --with-bugurl=https://labs.parabola.no/ \
- --enable-add-ons \
- --enable-obsolete-rpc \
- --enable-kernel=2.6.32 \
- --enable-bind-now --disable-profile \
- --enable-stackguard-randomization \
- --enable-lock-elision \
- --enable-multi-arch \
- --disable-werror
-
- # 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-strong -D_FORTIFY_SOURCE=2" >> configparms
- echo "CXX += -fstack-protector-strong -D_FORTIFY_SOURCE=2" >> configparms
- make
-
- # remove harding in preparation to run test-suite
- sed -i '5,7d' configparms
-}
-
-check() {
- cd ${srcdir}/glibc-build
-
- # some failures are "expected"
- make check || true
-}
-
-package() {
- cd ${srcdir}/glibc-build
-
- make install_root=${pkgdir} install
-
- rm -vr ${pkgdir}/{etc,sbin,usr/{bin,lib/{audit,gconv},include,libexec,share,sbin},var}
- rm -v ${pkgdir}/usr/lib/*.o
- rm -v ${pkgdir}/usr/lib/*.so*
- rm -v ${pkgdir}/usr/lib/lib{c{,_nonshared},crypt,dl,g,ieee,m,mcheck,pthread{,_nonshared},rpcsvc}.a
-
- strip $STRIP_STATIC ${pkgdir}/usr/lib/*.a
-}