Skip to contentSkip to conversation

Turn off sibling call optimization w/ frame pointers

PATCH New Matthias Urlichs 1 participant 1 message May 20, 2005 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Turn off sibling call optimization w/ frame pointers

Frame pointers are supposed to enable debuggers to reliably tell where a call comes from. That is defeated by GCC's sibling call optimization (aka tail recursion elimination).

This patch turns this optimization off when compiling with frame pointers.

---

Makefile (mode:100644) +1 -1
Index: Makefile
===================================================================
@@ -518,7 +518,7 @@
 CFLAGS		+= $(call add-align,CONFIG_CC_ALIGN_JUMPS,-jumps)
 
 ifdef CONFIG_FRAME_POINTER
-CFLAGS		+= -fno-omit-frame-pointer
+CFLAGS		+= -fno-omit-frame-pointer $(call cc-option,-fno-optimize-sibling-calls,)
 else
 CFLAGS		+= -fomit-frame-pointer
 endif