Frederik Schwan pushed to branch main at Arch Linux / Packaging / Packages / glibc
Commits: bedd2d10 by Toolybird at 2024-05-08T07:01:19+10:00 Tidy up FORTIFY_SOURCE handling - the current placement of CFLAGS filtering means lib32 misses out. Not a real problem because identical binaries are created whether it's filtered or not. It matters only for the testsuite. Nevertheless fix the inconsistency - remove some outdated comments - tweak the testsuite adjustments - add 2 minor shellcheck quoting tweaks - - - - - 1 changed file: - PKGBUILD Changes: ===================================== PKGBUILD ===================================== @@ -16,7 +16,7 @@ url='https://www.gnu.org/software/libc' license=(GPL-2.0-or-later LGPL-2.1-or-later) makedepends=(git gd lib32-gcc-libs python) options=(staticlibs !lto) -source=(git+https://sourceware.org/git/glibc.git#commit=${_commit} +source=("git+https://sourceware.org/git/glibc.git#commit=${_commit}" locale.gen.txt locale-gen lib32-glibc.conf @@ -60,6 +60,10 @@ build() { --disable-werror ) + # _FORTIFY_SOURCE=3 causes testsuite build failure and is unnecessary during + # actual builds (support is built-in via --enable-fortify-source). + CFLAGS=${CFLAGS/-Wp,-D_FORTIFY_SOURCE=3/} + ( cd glibc-build @@ -68,11 +72,6 @@ build() { echo "sbindir=/usr/bin" >> configparms echo "rootsbindir=/usr/bin" >> configparms - # Credits @allanmcrae - # https://github.com/allanmcrae/toolchain/blob/f18604d70c5933c31b51a320978711e4e6791cf1/glibc/PKGBUILD - # remove fortify for building libraries - CFLAGS=${CFLAGS/-Wp,-D_FORTIFY_SOURCE=3/} - "${srcdir}"/glibc/configure \ --libdir=/usr/lib \ --libexecdir=/usr/lib \ @@ -119,16 +118,15 @@ build() { _skip_test() { test=${1} file=${2} - sed -i "/\b${test} /d" "${srcdir}"/glibc/${file} + sed -i "/\b${test} /d" "${srcdir}/glibc/${file}" } check() ( cd glibc-build # adjust/remove buildflags that cause false-positive testsuite failures - sed -i '/FORTIFY/d' configparms # failure to build testsuite sed -i 's/-Werror=format-security/-Wformat-security/' config.make # failure to build testsuite - sed -i '/CFLAGS/s/-fno-plt//' config.make # 16 failures + sed -i '/CFLAGS/s/-fno-plt//' config.make # 27 failures sed -i '/CFLAGS/s/-fexceptions//' config.make # 1 failure # The following tests fail due to restrictions in the Arch build system View it on GitLab: https://gitlab.archlinux.org/archlinux/packaging/packages/glibc/-/commit/bedd2d1077b924843071787b546cf3c0457d80f7 -- This project does not include diff previews in email notifications. View it on GitLab: https://gitlab.archlinux.org/archlinux/packaging/packages/glibc/-/commit/bedd2d1077b924843071787b546cf3c0457d80f7 You're receiving this email because of your account on gitlab.archlinux.org.