]> err.no Git - linux-2.6/commitdiff
[PATCH] Turn off sibling call optimization w/ frame pointers
authorMatthias Urlichs <smurf@smurf.noris.de>
Thu, 23 Jun 2005 07:10:05 +0000 (00:10 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 23 Jun 2005 16:45:30 +0000 (09:45 -0700)
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 <smurf@smurf.noris.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Makefile

index 0d1e74d50067dbce4bd3dc9bcbd7954460b5da61..fad349724e993f6a297ca019aab9b4d0a2455d35 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -518,7 +518,7 @@ CFLAGS              += $(call add-align,CONFIG_CC_ALIGN_LOOPS,-loops)
 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