From: Matthias Urlichs <smurf@smurf.noris.de>

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>
---

 Makefile |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN Makefile~turn-off-sibling-call-optimization-w-frame-pointers Makefile
--- 25/Makefile~turn-off-sibling-call-optimization-w-frame-pointers	Fri May 20 16:50:41 2005
+++ 25-akpm/Makefile	Fri May 20 16:50:41 2005
@@ -518,7 +518,7 @@ CFLAGS		+= $(call add-align,CONFIG_CC_AL
 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
_