From 241d792c929fddeb630124ff40c53fb4250686e0 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Wed, 17 Apr 2024 16:10:26 +0200 Subject: [PATCH] mkosi: Switch to O0 and disable FORTIFY_SOURCE -Og still causes a lot of "" in GDB so let's use -O0 instead and disable FORTIFY_SOURCE as it doesn't work without optimizations enabled. --- .../system/mkosi.conf.d/10-arch/mkosi.build.chroot | 10 +++++----- .../mkosi.conf.d/10-centos-fedora/mkosi.build.chroot | 4 +++- .../mkosi.conf.d/10-debian-ubuntu/mkosi.build.chroot | 4 ++-- 3 files changed, 10 insertions(+), 8 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 fb85580360..8eebd62b04 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 @@ -20,12 +20,12 @@ mount --mkdir --rbind "$PWD/pkg/$ID" "pkg/$ID/src/" # shellcheck source=/dev/null . /etc/makepkg.conf -# Override the default options. Use -Og because -O0 doesn't work with FORTIFY_SOURCE. We specifically disable -# "strip", "zipman" and "lto" as they slow down builds significantly. OPTIONS= cannot be overridden 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. +# Override the default options. Disable FORTIFY_SOURCE because it doesn't work with O0. We specifically +# disable "strip", "zipman" and "lto" as they slow down builds significantly. OPTIONS= cannot be overridden +# 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 <