File xen.debug_symbols-for-xen.patch of Package xen

From: Olaf Hering <olaf@aepfle.de>
Date: Wed, 23 May 2018 16:33:25 +0200
Subject: debug_symbols for xen

Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
 xen/Rules.mk | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -45,25 +45,28 @@ ALL_OBJS-y               += $(BASEDIR)/drivers/built_in.o
 ALL_OBJS-y               += $(BASEDIR)/xsm/built_in.o
 ALL_OBJS-y               += $(BASEDIR)/arch/$(TARGET_ARCH)/built_in.o
 ALL_OBJS-$(CONFIG_CRYPTO)   += $(BASEDIR)/crypto/built_in.o
 
 ifeq ($(CONFIG_DEBUG),y)
 CFLAGS += -O1
 else
 CFLAGS += -O2 -fomit-frame-pointer
 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
+ifeq ($(debug_symbols),y)
+CFLAGS += -g
+endif
+CFLAGS += -pipe -D__XEN__ -include $(BASEDIR)/include/xen/config.h
 CFLAGS += '-D__OBJECT_FILE__="$@"'
 
 ifneq ($(clang),y)
 # Clang doesn't understand this command line argument, and doesn't appear to
 # have an suitable alternative.  The resulting compiled binary does function,
 # but has an excessively large symbol table.
 CFLAGS += -Wa,--strip-local-absolute
 endif
 
 CFLAGS-$(CONFIG_FRAME_POINTER) += -fno-omit-frame-pointer
 
 ifneq ($(max_phys_irqs),)
openSUSE Build Service is sponsored by