]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mkosi: undefine FORTIFY_SOURCE instead of setting it zero 32335/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 18 Apr 2024 12:27:38 +0000 (14:27 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 18 Apr 2024 12:35:07 +0000 (14:35 +0200)
Newer gcc complains if FORTIFY_SOURCE=0 is set so just undefine it
instead.

mkosi.images/system/mkosi.conf.d/10-arch/mkosi.build.chroot
mkosi.images/system/mkosi.conf.d/10-centos-fedora/mkosi.build.chroot
mkosi.images/system/mkosi.conf.d/10-opensuse/mkosi.build.chroot

index be7594609da4dbc1e0ac7ea87577d397cdc39fbc..5abeea5493c724ed3383d3fab415be2aa610b9e1 100755 (executable)
@@ -25,7 +25,7 @@ mount --mkdir --rbind "$PWD/pkg/$ID" "pkg/$ID/src/"
 # on the makepkg command line so we append to /etc/makepkg.conf instead. The rootfs is overlaid with a
 # writable tmpfs during the build script so these changes don't end up in the image itself.
 tee --append /etc/makepkg.conf >/dev/null <<EOF
-CFLAGS="$CFLAGS -O0 -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=0"
+CFLAGS="$CFLAGS -O0 -Wp,-U_FORTIFY_SOURCE"
 OPTIONS=(
     docs
     !libtool
index 46a509b33021565733a7c1b74bcaa8fe0ece228d..f745a2c002efd09c537031460835d2fcb5a3aba5 100755 (executable)
@@ -31,8 +31,8 @@ DIST="$(rpm --eval %dist)"
 ARCH="$(rpm --eval %_arch)"
 SRCDEST="/usr/src/debug/systemd-$VERSION-${RELEASE}${DIST}.$ARCH"
 
-# TODO: Drop -D_FORTIFY_SOURCE when we switch to CentOS Stream 10.
-EXTRA_CFLAGS="-O0 -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=0"
+# TODO: Drop -U_FORTIFY_SOURCE when we switch to CentOS Stream 10.
+EXTRA_CFLAGS="-O0 -Wp,-U_FORTIFY_SOURCE"
 if ((WITH_DEBUG)); then
     EXTRA_CFLAGS="$EXTRA_CFLAGS -ffile-prefix-map=../src=$SRCDEST"
 fi
index 6261be199035e7140013fa99d683a4adde6426fc..be270997918f6034a57635c7745478dd62dc6e9f 100755 (executable)
@@ -37,7 +37,7 @@ ARCH="$(rpm --eval %_arch)"
 SRCDEST="/usr/src/debug/systemd-$VERSION-${RELEASE}${DIST}.$ARCH"
 
 # TODO: Enable this when the opensuse spec stops unconditionally setting FORTIFY_SOURCE=2.
-# EXTRA_CFLAGS="-O0 -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=0"
+# EXTRA_CFLAGS="-O0 -Wp,-U_FORTIFY_SOURCE"
 EXTRA_CFLAGS=""
 if ((WITH_DEBUG)); then
     EXTRA_CFLAGS="$EXTRA_CFLAGS -ffile-prefix-map=../src=$SRCDEST"