diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2015-01-09 07:06:33 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2015-01-29 03:19:19 -0500 |
commit | c0a80c0c27e5e65b180a25e6c4c2f7ef9e386cd3 (patch) | |
tree | 4c3a34ab47f07da13df0f351db4cef929f07bcf9 /Makefile | |
parent | 4d92f50249eb3ed1c066276e214e8cc7be81e96d (diff) |
ftrace: allow architectures to specify ftrace compile options
If the kernel is compiled with function tracer support the -pg compile option
is passed to gcc to generate extra code into the prologue of each function.
This patch replaces the "open-coded" -pg compile flag with a CC_FLAGS_FTRACE
makefile variable which architectures can override if a different option
should be used for code generation.
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -724,10 +724,14 @@ KBUILD_CFLAGS += $(call cc-option, -femit-struct-debug-baseonly) \ | |||
724 | endif | 724 | endif |
725 | 725 | ||
726 | ifdef CONFIG_FUNCTION_TRACER | 726 | ifdef CONFIG_FUNCTION_TRACER |
727 | ifndef CC_FLAGS_FTRACE | ||
728 | CC_FLAGS_FTRACE := -pg | ||
729 | endif | ||
730 | export CC_FLAGS_FTRACE | ||
727 | ifdef CONFIG_HAVE_FENTRY | 731 | ifdef CONFIG_HAVE_FENTRY |
728 | CC_USING_FENTRY := $(call cc-option, -mfentry -DCC_USING_FENTRY) | 732 | CC_USING_FENTRY := $(call cc-option, -mfentry -DCC_USING_FENTRY) |
729 | endif | 733 | endif |
730 | KBUILD_CFLAGS += -pg $(CC_USING_FENTRY) | 734 | KBUILD_CFLAGS += $(CC_FLAGS_FTRACE) $(CC_USING_FENTRY) |
731 | KBUILD_AFLAGS += $(CC_USING_FENTRY) | 735 | KBUILD_AFLAGS += $(CC_USING_FENTRY) |
732 | ifdef CONFIG_DYNAMIC_FTRACE | 736 | ifdef CONFIG_DYNAMIC_FTRACE |
733 | ifdef CONFIG_HAVE_C_RECORDMCOUNT | 737 | ifdef CONFIG_HAVE_C_RECORDMCOUNT |