lkml.org 
[lkml]   [2010]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 03/10] ftrace: allow building without frame pointers
From
Date
On Sun, 2010-02-14 at 01:18 +0530, Rabin Vincent wrote:
> With current gcc, compiling with both -pg and -fomit-frame-pointer is
> not allowed. However, -pg can be used to build without actually
> specying -fno-omit-frame-pointer, upon which the defaut behaviour for
> the target will be used.
>
> On ARM, it is not possible to build a Thumb-2 kernel with
> -fno-omit-frame-pointer (FRAME_POINTERS depends on !THUMB2_KERNEL). In
> order to support ftrace for Thumb-2, we need to be able to allow a
> combination of FUNCTION_TRACER and !FRAME_POINTER. We do this by
> omitting -fomit-frame-pointer if ftrace is enabled.
>
> Signed-off-by: Rabin Vincent <rabin@rab.in>
> ---
> Makefile | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 67d6cff..72d90de 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -546,8 +546,11 @@ endif
> ifdef CONFIG_FRAME_POINTER
> KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
> else
> +ifndef CONFIG_FUNCTION_TRACER

Is this needed? Selecting FUNCTION_TRACER also selects FRAME_POINTER,
which this change is in the else part of that #if.

-- Steve

> +# -fomit-frame-pointer is incompatible with -pg
> KBUILD_CFLAGS += -fomit-frame-pointer
> endif
> +endif
>
> ifdef CONFIG_DEBUG_INFO
> KBUILD_CFLAGS += -g



\
 
 \ /
  Last update: 2010-02-23 14:49    [W:0.325 / U:0.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site