From: Wei Liu Date: Wed, 14 Mar 2018 17:15:15 +0000 (+0000) Subject: Revert "tools: detect appropriate debug optimization level" X-Git-Tag: 4.11.0-rc1~227 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=1dd9fa04fae69a2371572663d150c976a9e948d3;p=people%2Fandrewcoop%2Fxen.git Revert "tools: detect appropriate debug optimization level" This reverts commit b43501451733193b265de30fd79a764363a2a473. Due to the implementation of cc-option, the check is always true, which means build for gcc that doesn't have -Og support is broken. This patch can be reapplied once we have fixed cc-option. Signed-off-by: Wei Liu --- 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