]> xenbits.xensource.com Git - xen.git/commitdiff
build: use debug_symbols to add -g3
authorWei Liu <wei.liu2@citrix.com>
Thu, 5 Jan 2017 16:36:51 +0000 (16:36 +0000)
committerWei Liu <wei.liu2@citrix.com>
Thu, 5 Jan 2017 16:36:51 +0000 (16:36 +0000)
While doing archeology I found 38ce7ce3,  we should make sure
debug_symbols is responsible for adding "-g" to CFLAGS.

Move adding "-g3" from being guarded by debug to being guarded by
debug_symbols.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/Rules.mk

index 9a87f18bf32b5fcd62ebf9c263328c13b54ef389..b35999b21b8355d2f397adb40032ba395c574643 100644 (file)
@@ -31,7 +31,7 @@ debug ?= y
 debug_symbols ?= $(debug)
 
 ifeq ($(debug_symbols),y)
-CFLAGS += -g
+CFLAGS += -g3
 endif
 
 ifneq ($(nosharedlibs),y)
@@ -145,8 +145,8 @@ LDLIBS_libxenvchan = $(SHDEPS_libxenvchan) $(XEN_LIBVCHAN)/libxenvchan$(libexten
 SHLIB_libxenvchan  = $(SHDEPS_libxenvchan) -Wl,-rpath-link=$(XEN_LIBVCHAN)
 
 ifeq ($(debug),y)
-# Disable optimizations and enable debugging information for macros
-CFLAGS += -O0 -g3 -fno-omit-frame-pointer
+# Disable optimizations
+CFLAGS += -O0 -fno-omit-frame-pointer
 # But allow an override to -O0 in case Python enforces -D_FORTIFY_SOURCE=<n>.
 PY_CFLAGS += $(PY_NOOPT_CFLAGS)
 else