buildsys: avoid handling noopt locally, rather extend CFLAGS

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2023-05-23 14:09:03 +02:00
parent 04e0262e2e
commit de2dde2da9

12
debian/rules vendored
View File

@ -17,16 +17,8 @@ machinefile := $(destdir)/usr/share/kvm/machine-versions-x86_64.json
# default QEMU out-of-tree build directory is ./build
BUILDDIR=build
CFLAGS = -Wall
# FIXME: There is a second -02 added because of meson.build in the subproject
# and that is appended after -O0 from here (last -O wins), so supporting noopt
# doesn't work like this.
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
# FIXME: pass to configure as --extra-cflags=CFLAGS ?! also LDFLAGS?
CFLAGS += -Wall
export CFLAGS