ftrace: Only compile ftrace selftest if selftests are enabled
authorSteven Rostedt <srostedt@redhat.com>
Fri, 20 Jul 2012 15:13:07 +0000 (11:13 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Tue, 31 Jul 2012 14:29:53 +0000 (10:29 -0400)
No need to compile in the ftrace selftest helper file if selftests are
not being executed.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/Makefile

index b831087c8200c9548bb5334ea7a2cbd301410ac4..837090808aac03c3632a00e586e6a2a20b74a76a 100644 (file)
@@ -5,10 +5,12 @@ ifdef CONFIG_FUNCTION_TRACER
 ORIG_CFLAGS := $(KBUILD_CFLAGS)
 KBUILD_CFLAGS = $(subst -pg,,$(ORIG_CFLAGS))
 
+ifdef CONFIG_FTRACE_SELFTEST
 # selftest needs instrumentation
 CFLAGS_trace_selftest_dynamic.o = -pg
 obj-y += trace_selftest_dynamic.o
 endif
+endif
 
 # If unlikely tracing is enabled, do not trace these files
 ifdef CONFIG_TRACING_BRANCHES