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 /scripts | |
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 'scripts')
-rw-r--r-- | scripts/Makefile.build | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 649ce6844033..01df30af4d4a 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build | |||
@@ -234,8 +234,9 @@ sub_cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH | |||
234 | "$(if $(part-of-module),1,0)" "$(@)"; | 234 | "$(if $(part-of-module),1,0)" "$(@)"; |
235 | recordmcount_source := $(srctree)/scripts/recordmcount.pl | 235 | recordmcount_source := $(srctree)/scripts/recordmcount.pl |
236 | endif | 236 | endif |
237 | cmd_record_mcount = \ | 237 | cmd_record_mcount = \ |
238 | if [ "$(findstring -pg,$(_c_flags))" = "-pg" ]; then \ | 238 | if [ "$(findstring $(CC_FLAGS_FTRACE),$(_c_flags))" = \ |
239 | "$(CC_FLAGS_FTRACE)" ]; then \ | ||
239 | $(sub_cmd_record_mcount) \ | 240 | $(sub_cmd_record_mcount) \ |
240 | fi; | 241 | fi; |
241 | endif | 242 | endif |