[PATCH] Turn off sibling call optimization w/ frame pointers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Signed-Off-By: Matthias Urlichs <[email protected]>

---
Index: Makefile
===================================================================
--- cf96cb2bd8bb633b174549815ad3c45f65ae2848/Makefile  (mode:100644)
+++ df32987da12629d4a4498fc8948bf11b1a49d377/Makefile  (mode:100644)
@@ -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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux