xen: add DEBUG_INFO Kconfig symbol
PATCH v3 1/1 xen: add DEBUG_INFO Kconfig symbol
Creating debug info during build is not strictly required at runtime. Make it optional by introducing a new Kconfig knob "DEBUG_INFO". This slightly reduces build time and diskusage, if disabled.
Signed-off-by Olaf Hering <[email protected]>
--- xen/Kconfig.debug | 7 +++++++ xen/Rules.mk | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-)
xen/Kconfig.debug +7 -0
@@ -20,6 +20,13 @@ config CRASH_DEBUG If you want to attach gdb to Xen to debug Xen if it crashes then say Y. +config DEBUG_INFO + bool "Compile Xen with debug info" + default y + ---help--- + If you say Y here the resulting Xen will include debugging info + resulting in a larger binary image. + config FRAME_POINTER bool "Compile Xen with frame pointers" default DEBUG
xen/Rules.mk +2 -1
@@ -55,7 +55,7 @@ endif CFLAGS += -nostdinc -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 += '-D__OBJECT_FILE__="$@"' ifneq ($(clang),y)
@@ -65,6 +65,7 @@ ifneq ($(clang),y) CFLAGS += -Wa,--strip-local-absolute endif +CFLAGS-$(CONFIG_DEBUG_INFO) += -g ifneq ($(max_phys_irqs),) CFLAGS-y += -DMAX_PHYS_IRQS=$(max_phys_irqs) endif
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 13 lines
Quoted 1 line
Quoted 1 line · On 31.08.18 at 12:56, <[email protected]> wrote:
xen/Rules.mk +1
-1@@ -55,7 +55,7 @@ endif CFLAGS += -nostdinc -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 += '-D__OBJECT_FILE__="$@"' ifneq ($(clang),y)
xen/Rules.mk ifneq ($(clang),y) · line 71
Quoted 7 lines
xen/Rules.mk +1
-0@@ -65,6 +65,7 @@ ifneq ($(clang),y) CFLAGS += -Wa,--strip-local-absolute endif +CFLAGS-$(CONFIG_DEBUG_INFO) += -g ifneq ($(max_phys_irqs),) CFLAGS-y += -DMAX_PHYS_IRQS=$(max_phys_irqs) endif
I don't understand why you move the addition of -g down here, but this can be easily adjusted while committing. With this taken care of
Acked-by Jan Beulich <[email protected]>
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel