summaryrefslogtreecommitdiffstats
path: root/mkosi.images/system
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2024-04-18 14:00:30 +0200
committerDaan De Meyer <daan.j.demeyer@gmail.com>2024-04-18 14:01:06 +0200
commit15bf8bfb69e549fe46e652366fc9e7fab0e02562 (patch)
tree491517d9aae9f777576e17637b30323867508193 /mkosi.images/system
parentmkosi: Install more packages (diff)
downloadsystemd-15bf8bfb69e549fe46e652366fc9e7fab0e02562.tar.xz
systemd-15bf8bfb69e549fe46e652366fc9e7fab0e02562.zip
mkosi: Undefine FORTIFY_SOURCE before setting it again
Otherwise we get warnings from gcc.
Diffstat (limited to 'mkosi.images/system')
-rwxr-xr-xmkosi.images/system/mkosi.conf.d/10-arch/mkosi.build.chroot2
-rwxr-xr-xmkosi.images/system/mkosi.conf.d/10-centos-fedora/mkosi.build.chroot2
2 files changed, 2 insertions, 2 deletions
diff --git a/mkosi.images/system/mkosi.conf.d/10-arch/mkosi.build.chroot b/mkosi.images/system/mkosi.conf.d/10-arch/mkosi.build.chroot
index 8eebd62b04..13d4ebeb18 100755
--- a/mkosi.images/system/mkosi.conf.d/10-arch/mkosi.build.chroot
+++ b/mkosi.images/system/mkosi.conf.d/10-arch/mkosi.build.chroot
@@ -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,-D_FORTIFY_SOURCE=0"
+CFLAGS="$CFLAGS -O0 -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=0"
OPTIONS=(
docs
!libtool
diff --git a/mkosi.images/system/mkosi.conf.d/10-centos-fedora/mkosi.build.chroot b/mkosi.images/system/mkosi.conf.d/10-centos-fedora/mkosi.build.chroot
index 0cba71bf7a..46a509b330 100755
--- a/mkosi.images/system/mkosi.conf.d/10-centos-fedora/mkosi.build.chroot
+++ b/mkosi.images/system/mkosi.conf.d/10-centos-fedora/mkosi.build.chroot
@@ -32,7 +32,7 @@ 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,-D_FORTIFY_SOURCE=0"
+EXTRA_CFLAGS="-O0 -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=0"
if ((WITH_DEBUG)); then
EXTRA_CFLAGS="$EXTRA_CFLAGS -ffile-prefix-map=../src=$SRCDEST"
fi