[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 2/2] tools: detect appropriate debug optimization level
The build should not use -O0 as that results in miscompilations. There have been a few instances on the ML where users were told to switch from -O0 to -O1 or -O2 or to set debug=n and their issue went away. The preferred route should be to use -Og if its available, otherwise use -O1 which is the default. This change undoes the change from -O1 to -O0 in 1166ecf781b1016eaa61f8d5ba4fb1fde9d599b6. Signed-off-by: Doug Goldstein <cardoe@xxxxxxxxxx> --- CC: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> CC: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> CC: Wei Liu <wei.liu2@xxxxxxxxxx> --- tools/Rules.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/Rules.mk b/tools/Rules.mk index 9ef0b47..ae6b01f 100644 --- a/tools/Rules.mk +++ b/tools/Rules.mk @@ -137,7 +137,8 @@ SHLIB_libxenvchan = $(SHDEPS_libxenvchan) -Wl,-rpath-link=$(XEN_LIBVCHAN) ifeq ($(debug),y) # Disable optimizations and enable debugging information for macros -CFLAGS += -O0 -g3 +$(call cc-option-add,CFLAGS,CC,-Og) +CFLAGS += -g3 # But allow an override to -O0 in case Python enforces -D_FORTIFY_SOURCE=<n>. PY_CFLAGS += $(PY_NOOPT_CFLAGS) endif -- 2.4.10 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |