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 /kernel/trace/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 'kernel/trace/Makefile')
| -rw-r--r-- | kernel/trace/Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/Makefile b/kernel/trace/Makefile index 67d6369ddf83..9a7e0e60a1a8 100644 --- a/kernel/trace/Makefile +++ b/kernel/trace/Makefile | |||
| @@ -3,11 +3,11 @@ | |||
| 3 | 3 | ||
| 4 | ifdef CONFIG_FUNCTION_TRACER | 4 | ifdef CONFIG_FUNCTION_TRACER |
| 5 | ORIG_CFLAGS := $(KBUILD_CFLAGS) | 5 | ORIG_CFLAGS := $(KBUILD_CFLAGS) |
| 6 | KBUILD_CFLAGS = $(subst -pg,,$(ORIG_CFLAGS)) | 6 | KBUILD_CFLAGS = $(subst $(CC_FLAGS_FTRACE),,$(ORIG_CFLAGS)) |
| 7 | 7 | ||
| 8 | ifdef CONFIG_FTRACE_SELFTEST | 8 | ifdef CONFIG_FTRACE_SELFTEST |
| 9 | # selftest needs instrumentation | 9 | # selftest needs instrumentation |
| 10 | CFLAGS_trace_selftest_dynamic.o = -pg | 10 | CFLAGS_trace_selftest_dynamic.o = $(CC_FLAGS_FTRACE) |
| 11 | obj-y += trace_selftest_dynamic.o | 11 | obj-y += trace_selftest_dynamic.o |
| 12 | endif | 12 | endif |
| 13 | endif | 13 | endif |
