[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v3] Separate runtime debug output from debug symbols
Two make variables exist (debug=y and debug_symbols=y) to control either the creation of additional runtime debug or the creation of debug symbols for tools like gdb. Some places in the code still passed -g unconditionally to the compiler. Wrap them into a "debug_symbols" conditional. The xen build passed -g unconditional, reuse the existing debug_symbols=y check in Config.mk. There are still parts of the code that hardcode -g, namely the external qemu-traditional and stubdom packages. They are not changed by this patch. No change in behaviour is expected by that patch for tools and xen. Signed-off-by: Olaf Hering <olaf@xxxxxxxxx> Release-Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> (for xen/Rules.mk) Cc: David Scott <dave.scott@xxxxxxxxxxxxx> Cc: Ian Campbell <ian.campbell@xxxxxxxxxx> Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Cc: Jan Beulich <jbeulich@xxxxxxxx> Cc: Keir Fraser <keir@xxxxxxx> Cc: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx> Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> Cc: Tim Deegan <tim@xxxxxxx> Cc: Wei Liu <wei.liu2@xxxxxxxxxx> --- tools/Makefile | 7 +++++++ tools/ocaml/common.make | 5 ++++- xen/Rules.mk | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/tools/Makefile b/tools/Makefile index 543cd29..884dc91 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -197,6 +197,12 @@ else QEMU_XEN_ENABLE_DEBUG := endif +ifeq ($(debug_symbols),y) +QEMU_XEN_ENABLE_DEBUG_SYMBOLS := --enable-debug-info --disable-strip +else +QEMU_XEN_ENABLE_DEBUG_SYMBOLS := --disable-debug-info +endif + subdir-all-qemu-xen-dir: qemu-xen-dir-find if test -d $(QEMU_UPSTREAM_LOC) ; then \ source=$(QEMU_UPSTREAM_LOC); \ @@ -206,6 +212,7 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find cd qemu-xen-dir; \ $$source/configure --enable-xen --target-list=i386-softmmu \ $(QEMU_XEN_ENABLE_DEBUG) \ + $(QEMU_XEN_ENABLE_DEBUG_SYMBOLS) \ --prefix=$(LIBEXEC) \ --libdir=$(LIBEXEC_LIB) \ --includedir=$(LIBEXEC_INC) \ diff --git a/tools/ocaml/common.make b/tools/ocaml/common.make index d5478f6..33b3142 100644 --- a/tools/ocaml/common.make +++ b/tools/ocaml/common.make @@ -13,7 +13,10 @@ CFLAGS += -fPIC -Werror -I$(shell ocamlc -where) OCAMLOPTFLAG_G := $(shell $(OCAMLOPT) -h 2>&1 | sed -n 's/^ *\(-g\) .*/\1/p') OCAMLOPTFLAGS = $(OCAMLOPTFLAG_G) -ccopt "$(LDFLAGS)" -dtypes $(OCAMLINCLUDE) -cc $(CC) -w F -warn-error F -OCAMLCFLAGS += -g $(OCAMLINCLUDE) -w F -warn-error F +ifeq ($(debug_symbols),y) +OCAMLCFLAGS += -g +endif +OCAMLCFLAGS += $(OCAMLINCLUDE) -w F -warn-error F VERSION := 4.1 diff --git a/xen/Rules.mk b/xen/Rules.mk index a97405c..60cd173 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -43,7 +43,7 @@ ALL_OBJS-$(x86) += $(BASEDIR)/crypto/built_in.o CFLAGS += -fno-builtin -fno-common CFLAGS += -Werror -Wredundant-decls -Wno-pointer-arith -CFLAGS += -pipe -g -D__XEN__ -include $(BASEDIR)/include/xen/config.h +CFLAGS += -pipe -D__XEN__ -include $(BASEDIR)/include/xen/config.h CFLAGS += -nostdinc CFLAGS-$(XSM_ENABLE) += -DXSM_ENABLE _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |