Skip to contentSkip to conversation

x86/build: Untangle CONFIG_DEBUG and CONFIG_FRAME_POINTER

PATCH In review Andrew Cooper 2 participants 2 messages Jan 25, 2018 – Jan 26, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/build: Untangle CONFIG_DEBUG and CONFIG_FRAME_POINTER

Both options are independently choseable in KConfig, but currently a DEBUG build without FRAME_POINTER is left to the compilers default choice, not the users choice.

---
CC: Jan Beulich <[email protected]>

---
 xen/Rules.mk | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
xen/Rules.mk +7 -3
index 3cf4075..541ed13 100644
@@ -43,7 +43,13 @@ ALL_OBJS-$(CONFIG_CRYPTO)   += $(BASEDIR)/crypto/built_in.o
 ifeq ($(CONFIG_DEBUG),y)
 CFLAGS += -O1
 else
-CFLAGS += -O2 -fomit-frame-pointer
+CFLAGS += -O2
+endif
+
+ifeq ($(CONFIG_FRAME_POINTER),y)
+CFLAGS += -fno-omit-frame-pointer
+else
+CFLAGS += -fomit-frame-pointer
 endif
 
 CFLAGS += -nostdinc -fno-builtin -fno-common
@@ -58,8 +64,6 @@ ifneq ($(clang),y)
 CFLAGS += -Wa,--strip-local-absolute
 endif
 
-CFLAGS-$(CONFIG_FRAME_POINTER) += -fno-omit-frame-pointer
-
 ifneq ($(max_phys_irqs),)
 CFLAGS-y                += -DMAX_PHYS_IRQS=$(max_phys_irqs)
 endif
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines
Quoted 1 line
Quoted 1 line · On 25.01.18 at 19:39, <[email protected]> wrote:

Both options are independently choseable in KConfig, but currently a DEBUG build without FRAME_POINTER is left to the compilers default choice, not the users choice.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel