diff --git a/tools/Rules.mk b/tools/Rules.mk index 3848bcf1f7..296b722372 100644 --- a/tools/Rules.mk +++ b/tools/Rules.mk @@ -164,13 +164,8 @@ LDLIBS_libxenvchan = $(SHDEPS_libxenvchan) $(XEN_LIBVCHAN)/libxenvchan$(libexten SHLIB_libxenvchan = $(SHDEPS_libxenvchan) -Wl,-rpath-link=$(XEN_LIBVCHAN) ifeq ($(debug),y) -CFLAGS += -fno-omit-frame-pointer -# Use optimizations compatible with debugging otherwise disable optimizations -ifneq ($(call cc-option,$(CC),-Og,n),n) -CFLAGS += -Og -else -CFLAGS += -O0 -endif +# Disable optimizations +CFLAGS += -O0 -fno-omit-frame-pointer # But allow an override to -O0 in case Python enforces -D_FORTIFY_SOURCE=. PY_CFLAGS += $(PY_NOOPT_CFLAGS) else