summaryrefslogtreecommitdiffstats
path: root/abs/core/glibc/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/glibc/PKGBUILD')
-rw-r--r--abs/core/glibc/PKGBUILD98
1 files changed, 52 insertions, 46 deletions
diff --git a/abs/core/glibc/PKGBUILD b/abs/core/glibc/PKGBUILD
index 1da7c0a..7cc6d22 100644
--- a/abs/core/glibc/PKGBUILD
+++ b/abs/core/glibc/PKGBUILD
@@ -1,4 +1,3 @@
-# $Id$
# Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
@@ -7,34 +6,41 @@
pkgbase=glibc
pkgname=(glibc lib32-glibc)
-pkgver=2.26
-pkgrel=11
+pkgver=2.31
+pkgrel=5
arch=(x86_64)
-url='http://www.gnu.org/software/libc'
+url='https://www.gnu.org/software/libc'
license=(GPL LGPL)
-makedepends=(git gd lib32-gcc-libs)
+makedepends=(git gd lib32-gcc-libs python)
options=(!strip staticlibs)
-_commit=de51f431ed6226ec68ca76e578f2cbd55b6262cb
-source=(git+https://sourceware.org/git/glibc.git#commit=${_commit}
+#source=(https://ftp.gnu.org/gnu/glibc/glibc-$pkgver.tar.xz{,.sig}
+_commit=18fdba553dd9b907e9812b90d2cea593f776058f
+source=(git+https://sourceware.org/git/glibc.git#commit=$_commit
locale.gen.txt
locale-gen
lib32-glibc.conf
+ sdt.h sdt-config.h
bz20338.patch)
+validpgpkeys=(7273542B39962DF7B299931416792B4EA25340F8 # Carlos O'Donell
+ BC7C7372637EC10C57D7AA6579C43DFBF1CF2187) # Siddhesh Poyarekar
md5sums=('SKIP'
'07ac979b6ab5eeb778d55f041529d623'
'476e9113489f93b348b21e144b6a8fcf'
'6e052f1cb693d5d3203f50f9d4e8c33b'
- 'dc0d3ad59aeaaf591b085a77de6e03e9')
+ '91fec3b7e75510ae2ac42533aa2e695e'
+ '680df504c683640b02ed4a805797c0b2'
+ '430673eccc78e52c249aa4b0f1786450')
prepare() {
mkdir -p glibc-build lib32-glibc-build
+ [[ -d glibc-$pkgver ]] && ln -s glibc-$pkgver glibc
cd glibc
local i; for i in ${source[@]}; do
case ${i%::*} in
*.patch)
- msg2 "Applying ${i}"
+ echo " -> Applying ${i}"
patch -p1 -i "$srcdir/${i}"
;;
esac
@@ -48,12 +54,13 @@ build() {
--with-bugurl=https://bugs.archlinux.org/
--enable-add-ons
--enable-bind-now
+ --enable-cet
--enable-lock-elision
--enable-multi-arch
- --enable-obsolete-nsl
- --enable-obsolete-rpc
--enable-stack-protector=strong
--enable-stackguard-randomization
+ --enable-static-pie
+ --enable-systemtap
--disable-profile
--disable-werror
)
@@ -68,6 +75,11 @@ build() {
# remove fortify for building libraries
CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=2/}
+ #
+ CFLAGS=${CFLAGS/-fno-plt/}
+ CXXFLAGS=${CXXFLAGS/-fno-plt/}
+ LDFLAGS=${LDFLAGS/,-z,now/}
+
"$srcdir/glibc/configure" \
--libdir=/usr/lib \
--libexecdir=/usr/lib \
@@ -84,6 +96,9 @@ build() {
echo "CXX += -D_FORTIFY_SOURCE=2" >> configparms
make
+ # build info pages manually for reprducibility
+ make info
+
cd "$srcdir/lib32-glibc-build"
export CC="gcc -m32 -mstackrealign"
export CXX="g++ -m32 -mstackrealign"
@@ -135,7 +150,6 @@ package_glibc() {
backup=(etc/gai.conf
etc/locale.gen
etc/nscd.conf)
- groups=(base)
install -dm755 "$pkgdir/etc"
touch "$pkgdir/etc/ld.so.conf"
@@ -143,6 +157,9 @@ package_glibc() {
make -C glibc-build install_root="$pkgdir" install
rm -f "$pkgdir"/etc/ld.so.{cache,conf}
+ # Shipped in tzdata
+ rm -f "$pkgdir"/usr/bin/{tzselect,zdump,zic}
+
cd glibc
install -dm755 "$pkgdir"/usr/lib/{locale,systemd/system,tmpfiles.d}
@@ -155,36 +172,28 @@ package_glibc() {
install -m755 "$srcdir/locale-gen" "$pkgdir/usr/bin"
- # create /etc/locale.gen
+ # Create /etc/locale.gen
install -m644 "$srcdir/locale.gen.txt" "$pkgdir/etc/locale.gen"
sed -e '1,3d' -e 's|/| |g' -e 's|\\| |g' -e 's|^|#|g' \
"$srcdir/glibc/localedata/SUPPORTED" >> "$pkgdir/etc/locale.gen"
- # 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
-
if check_option 'debug' n; then
- cd "$pkgdir"
- strip $STRIP_BINARIES usr/bin/{gencat,getconf,getent,iconv,iconvconfig} \
- usr/bin/{ldconfig,locale,localedef,nscd,makedb} \
- usr/bin/{pcprofiledump,pldd,rpcgen,sln,sprof} \
- usr/lib/getconf/*
-
- strip $STRIP_STATIC usr/lib/lib{anl,BrokenLocale,c{,_nonshared},crypt}.a \
- usr/lib/lib{dl,g,ieee,mcheck,nsl,pthread{,_nonshared}}.a \
- usr/lib/lib{resolv,rpcsvc,rt,util}.a \
- usr/lib/lib{m-${pkgver},mvec{,_nonshared}}.a
-
- strip $STRIP_SHARED usr/lib/lib{anl,BrokenLocale,cidn,crypt}-${pkgver}.so \
- usr/lib/libnss_{compat,db,dns,files,hesiod,nis,nisplus}-*.so \
- usr/lib/lib{dl,m,nsl,resolv,rt,util}-${pkgver}.so \
- usr/lib/lib{memusage,pcprofile,SegFault}.so \
- usr/lib/{audit,gconv}/*.so usr/lib/libmvec-*.so || true
+ find "$pkgdir"/usr/bin -type f -executable -exec strip $STRIP_BINARIES {} + 2> /dev/null || true
+ find "$pkgdir"/usr/lib -name '*.a' -type f -exec strip $STRIP_STATIC {} + 2> /dev/null || true
+
+ # Do not strip these for gdb and valgrind functionality, but strip the rest
+ find "$pkgdir"/usr/lib \
+ -not -name 'ld-*.so' \
+ -not -name 'libc-*.so' \
+ -not -name 'libpthread-*.so' \
+ -not -name 'libthread_db-*.so' \
+ -name '*-*.so' -type f -exec strip $STRIP_SHARED {} + 2> /dev/null || true
fi
+
+ # Provide tracing probes to libstdc++ for exceptions, possibly for other
+ # libraries too. Useful for gdb's catch command.
+ install -Dm644 "$srcdir/sdt.h" "$pkgdir/usr/include/sys/sdt.h"
+ install -Dm644 "$srcdir/sdt-config.h" "$pkgdir/usr/include/sys/sdt-config.h"
}
package_lib32-glibc() {
@@ -210,15 +219,12 @@ package_lib32-glibc() {
ln -s ../lib/locale "$pkgdir/usr/lib32/locale"
if check_option 'debug' n; then
- cd $pkgdir
- strip $STRIP_BINARIES usr/lib32/getconf/*
- strip $STRIP_STATIC usr/lib32/lib{anl,BrokenLocale,c{,_nonshared},crypt}.a \
- usr/lib32/lib{dl,g,ieee,mcheck,nsl,pthread{,_nonshared}}.a \
- usr/lib32/lib{resolv,rpcsvc,rt,util,m}.a
- strip $STRIP_SHARED usr/lib32/lib{anl,BrokenLocale,cidn,crypt}-${pkgver}.so \
- usr/lib32/libnss_{compat,db,dns,files,hesiod,nis,nisplus}-*.so \
- usr/lib32/lib{dl,m,nsl,resolv,rt,util}-${pkgver}.so \
- usr/lib32/lib{memusage,pcprofile,SegFault}.so \
- usr/lib32/{audit,gconv}/*.so || true
+ find "$pkgdir"/usr/lib32 -name '*.a' -type f -exec strip $STRIP_STATIC {} + 2> /dev/null || true
+ find "$pkgdir"/usr/lib32 \
+ -not -name 'ld-*.so' \
+ -not -name 'libc-*.so' \
+ -not -name 'libpthread-*.so' \
+ -not -name 'libthread_db-*.so' \
+ -name '*-*.so' -type f -exec strip $STRIP_SHARED {} + 2> /dev/null || true
fi
}