# Compiling time: 8.20 SBU # Maintainer: whoever # Contributor: Miklos Vajna ## DO NOT BUMP THIS PACKAGE WITHOUT to aks the m8r!! ## IF you still want to BUMP rebuild the TOOLCHAIN!! pkgname=glibc pkgver=2.29 pkgrel=8 _githash= pkgdesc="GNU C Library" url="http://www.gnu.org/software/libc/libc.html" depends=() makedepends=('libxml2>=2.9.2-3' 'binutils>=2.32-4' 'gcc>=9.1.0-2' 'grep>=2.5.3-4' \ 'zlib>=1.2.11-11' 'pacman-g2>=3.9.4' 'python3' 'binutils-devel>=2.32-4') rodepends=('tzdata>=2017a' 'frugalware') groups=('base' 'chroot-core') archs=('x86_64') backup=('etc/nscd.conf' 'etc/sysconfig/nscd') Fup2gnubz2 _dlurl="http://ftp.gnu.org/pub/gnu/glibc" source=($_dlurl/glibc-$pkgver.tar.xz # -static-pie #allow-static-pie-with-gold-default.patch 0001-nptl-Fix-pthread_rwlock_try-lock-stalls-Bug-23844.patch 0002-x86-64-memcmp-Use-unsigned-Jcc-instructions-on-size-.patch 0003-arm-Use-nr-constraint-for-Systemtap-probes-BZ-24164.patch 0004-Add-compiler-barriers-around-modifications-of-the-ro.patch 0005-nptl-Avoid-fork-handler-lock-for-async-signal-safe-f.patch 0006-nptl-Fix-invalid-Systemtap-probe-in-pthread_join-BZ-.patch 0007-Fix-output-of-LD_SHOW_AUXV-1.patch 0008-regex-fix-read-overrun-BZ-24114.patch 0009-Record-CVE-2019-9169-in-NEWS-and-ChangeLog-BZ-24114.patch 0010-S390-Mark-vx-and-vxe-as-important-hwcap.patch 0011-ja_JP-Change-the-offset-for-Taisho-gan-nen-from-2-to.patch 0012-ja_JP-locale-Add-entry-for-the-new-Japanese-era-BZ-2.patch 0013-malloc-Set-and-reset-all-hooks-for-tracing-Bug-16573.patch 0014-memusagestat-use-local-glibc-when-linking-BZ-18465.patch 0015-Revert-memusagestat-use-local-glibc-when-linking-BZ-.patch 0016-support-Add-support_capture_subprogram.patch 0017-elf-Fix-pldd-BZ-18035.patch 0018-malloc-Check-for-large-bin-list-corruption-when-inse.patch 0019-Fix-crash-in-_IO_wfile_sync-bug-20568.patch 0020-dlfcn-Guard-__dlerror_main_freeres-with-__libc_once_.patch 0021-Update-NEWS-for-BZ-24476-Guard-__dlerror_main_freere.patch 0022-Fix-tcache-count-maximum-BZ-24531.patch nscd-config-file.patch nscd-service-sysconfig.patch nscd-use-run-like-in-service-file.patch nscd-tmpfiles.pach) sha1sums=('c8376086203fa5e39dc869235ab8a400ed747c44' \ 'b8cdbda98f2623d9c6eaadb8bbfc2716a696114d' \ '3458ca432dd7ae260144de90ab6666ba4a61637e' \ '3c0b68a05bdf84b53334fcd10d8bcff1f3a2c333' \ 'bd50d9cc831c9c0f7b400576b62dc339543f3d75' \ 'ed8929a61b0c46ec44a9c5e8cc2015fd7179d384' \ '244161ba3b77f417303f87af369cfb4d95e0eb0c' \ '743c5b8d5254ffe2d2010c1d984ca58e984ef3f0' \ 'f4be53d27b952c49f667f44aa61c75bedbd72527' \ '224ffce67f80ad8bdde04f72c3b92384072a9d31' \ '727fdc0ef45d0163898f21307759c5678beddeeb' \ '48f6a588e524b216ce6264b527e5c890a0074a87' \ '42e489c025db3ad2c9342325b11eb94949814fbc' \ 'b3473f47d477caca1822cf291906918b00ef5995' \ '35681deceff91f81b096a9a752056bc2335a21db' \ 'e2842f772d2397fb7e39c25de7b3e86d561858ef' \ '2c18e2fe8ec8815be3069189e8fc4a57b9b7b0e0' \ 'dbcb369fc0c25d9bd9649a177781c52078fa7b50' \ 'bf3b80799a6929e4041e2a1ced8f770cb9384c3e' \ 'f2d972549a5d4d492f719e06e7ef7b24ac9dbe19' \ '1edff0473844f79784b0850f2ef9e2417131cbdd' \ 'b0429755d44b5098b1b115eb6b5004b1cb24e09e' \ 'a71057ee1012036dab4efb138dd44e38b0d877ad' \ 'f0bf9db97f64aaf47312e7be63a15a750b1c0bc8' \ 'ac2da281e2fcd92faff0ce84e0a5760d1114d719' \ 'f39430174766fae3782e4e11ab879d4f3fe6eace' \ 'b5d4e9a2e369f6fd24069a975c717d49f825db68') options+=('scriptlet' 'noccache' 'static' 'nofortify' 'nolto') subpkgs=("$pkgname-memusagestat") subdescs=("glibc memusagestat utility") subdepends=('gd>=2.1.1') subgroups=('apps-extra') subarchs=('x86_64') subpkgs+=("$pkgname-devel") subdescs+=("Development files for $pkgname.") subdepends+=('') subgroups+=('devel devel-core task-devel') subarchs+=('x86_64') conflicts=('lib32') replaces=('lib32' 'lib32-glibc') provides=('lib32' 'lib32-glibc') _buildd() { Fexec make || Fdie Fexec make install_root=$Fdestdir install || Fdie #Fexec make install_root=$Fdestdir localedata/install-locales || Fdie } build() { ## FIXME local _pkgstring="$pkgname-$pkgver$_githash" Fcd $_pkgstring Fpatchall Ffilerel nscd/nscd.conf /etc/nscd.conf Fexec cd .. Fexec cp -Ra $_pkgstring lib32-$_pkgstring Fcd $_pkgstring ## use Fdie here and kill the build ## if we get any errors. -- crazy -- rm -rf ../glibc-build || Fdie mkdir ../glibc-build || Fdie rm -rf ../glibc-build32 || Fdie mkdir ../glibc-build32 || Fdie ## glibc want U_FORTIFY_SOURCE CFLAGS+=" -Wp,-U_FORTIFY_SOURCE" CXXFLAGS+=" -Wp,-U_FORTIFY_SOURCE" ## need for 32bit libs GLIBOPTS32="--libdir=/usr/lib32 --libexecdir=/usr/lib32 --build=i686-frugalware-linux" ## untill there is some tc-32.sh we need such things HOSTCF="$CFLAGS" HOSTCXX="$CXXFLAGS" ## 64bit options _GLIBOPTS="--libdir=/usr/lib --libexecdir=/usr/lib --build=$CARCH-frugalware-linux" ## common options GLIBOPTS=" \ --with-bugurl=https://bugs.frugalware.org/ \ --prefix=/usr \ --with-tls \ --with-__thread \ --with-headers=/usr/include \ --enable-kernel=4.4.113 \ --without-selinux \ --enable-shared \ --enable-static-pie \ --enable-bind-now \ --disable-werror \ --enable-add-ons \ --disable-profile \ --enable-tunables \ --enable-stackguard-randomization \ --enable-lock-elision=yes \ --enable-multi-arch \ --enable-stack-protector=strong" ## for buffer overflows detection ## first 32bit so 64 bit apps ovverrides 32bit stuff and ## we don't need to delete all over the place Fexec cd ../glibc-build32 || Fdie CFLAGS+=" -mstackrealign" CXXFLAGS+=" -mstackrealign" export CFLAGS="${CFLAGS/x86-64/i686}" export CXXFLAGS="${CXXFLAGS/x86-64/i686}" export CXX="g++ -m32" export CC="gcc -m32" export BUILD_ARCH=x86_64 ## put all in /usr/lib32 and symlink to /lib32 echo "slibdir=/usr/lib32" >> configparms echo "rtlddir=/usr/lib32" >> configparms Fexec ../lib32-$_pkgstring/configure $GLIBOPTS $GLIBOPTS32 || Fdie _buildd ## be sure to symlink the right one Fln ../lib32/ld-linux.so.2 /lib/ld-linux.so.2 Fln /usr/lib32 /lib32 Fmkdir etc/ld.so.conf.d echo /usr/lib32 >> "$Fdestdir/etc/ld.so.conf.d/glibc32.conf" || Fdie echo /lib32 >> "$Fdestdir/etc/ld.so.conf.d/glibc32.conf" || Fdie ## 109MB .. remove and symlink later Frm usr/lib32/locale/locale-archive ## 64bit Fexec cd ../glibc-build || Fdie export CFLAGS="$HOSTCF" export CXXFLAGS="$HOSTCXX" export CXX="g++" export CC="gcc" ## put all in /lib we symlink to /lib64 , no need to move stuff around echo "slibdir=/lib" >> configparms echo "rtlddir=/lib" >> configparms Fexec ../$_pkgstring/configure $GLIBOPTS $_GLIBOPTS || Fdie _buildd # --quiet breaks Fexec make --trace install_root=$Fdestdir localedata/install-locales || Fdie # nscd Finstall 644 "${_F_cd_path}/nscd/nscd.service" lib/systemd/system/nscd.service Finstall 644 "${_F_cd_path}/nscd/nscd.tmpfiles" /usr/lib/tmpfiles.d/nscd.conf # log dir Fmkdir var/log/nscd # need be chowned nscd:nscd from install scriptlet after adding the user/group Fmkdir run/nscd # same like the log dir Fmkdir var/db/nscd # same like log dif Fsplit $pkgname-memusagestat usr/bin/memusagestat Fsplit $pkgname-devel usr/include Fsplit $pkgname-devel usr/lib/{*.a,*.so,*.o} Fsplit $pkgname-devel usr/lib32/{*.a,*.o} Frm /etc/ld.so.cache ## symlink locale-archive for 32bit Fln /usr/lib/locale/locale-archive /usr/lib32/locale/locale-archive Frm /usr/share/info/dir cd - >/dev/null } # optimization ok