This is just annoying for development. You want -O0 or -Og,
and consequently you get lots of warnings that are difficult to disable.
I believe hardening options are more of a responsibility/choice of the
caller, typically distributions have some general policies and pass the
flags (almost) uniformly to all packages. I can't see any part of kresd
being so specific to warrant explicit hardening.
+
+- don't magically -D_FORTIFY_SOURCE=2 in some cases
+
Knot Resolver 2.1.1 (2018-02-23)
================================
ifeq (,$(findstring -O,$(CFLAGS)))
BUILD_CFLAGS += -O2
endif
-ifeq (,$(findstring -fsanitize=address,$(CFLAGS)))
- BUILD_CFLAGS += -D_FORTIFY_SOURCE=2
-endif