diff options
author | Rabin Vincent <rabin@rab.in> | 2010-08-10 14:20:53 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-09-02 10:24:18 -0400 |
commit | 7e9501fdecdee8151938e624b41978307cadddd2 (patch) | |
tree | 4bbaa236d934e9fc7e6339b4a028f08b685047d9 /Makefile | |
parent | d4348c678977c7093438bbbf2067c49396ae941b (diff) |
ARM: 6312/1: ftrace: allow building without frame pointers
With current gcc, compiling with both -pg and -fomit-frame-pointer is
not allowed. However, -pg can be used to build without actually
specifying -fno-omit-frame-pointer, upon which the default 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.
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -554,8 +554,15 @@ endif | |||
554 | ifdef CONFIG_FRAME_POINTER | 554 | ifdef CONFIG_FRAME_POINTER |
555 | KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls | 555 | KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls |
556 | else | 556 | else |
557 | # Some targets (ARM with Thumb2, for example), can't be built with frame | ||
558 | # pointers. For those, we don't have FUNCTION_TRACER automatically | ||
559 | # select FRAME_POINTER. However, FUNCTION_TRACER adds -pg, and this is | ||
560 | # incompatible with -fomit-frame-pointer with current GCC, so we don't use | ||
561 | # -fomit-frame-pointer with FUNCTION_TRACER. | ||
562 | ifndef CONFIG_FUNCTION_TRACER | ||
557 | KBUILD_CFLAGS += -fomit-frame-pointer | 563 | KBUILD_CFLAGS += -fomit-frame-pointer |
558 | endif | 564 | endif |
565 | endif | ||
559 | 566 | ||
560 | ifdef CONFIG_DEBUG_INFO | 567 | ifdef CONFIG_DEBUG_INFO |
561 | KBUILD_CFLAGS += -g | 568 | KBUILD_CFLAGS += -g |