summaryrefslogtreecommitdiff
path: root/kernel/trace/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/Makefile')
-rw-r--r--kernel/trace/Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/Makefile b/kernel/trace/Makefile
index aeba5ee7325a..e153be351548 100644
--- a/kernel/trace/Makefile
+++ b/kernel/trace/Makefile
@@ -2,9 +2,9 @@
# Do not instrument the tracer itself:
+ccflags-remove-$(CONFIG_FUNCTION_TRACER) += $(CC_FLAGS_FTRACE)
+
ifdef CONFIG_FUNCTION_TRACER
-ORIG_CFLAGS := $(KBUILD_CFLAGS)
-KBUILD_CFLAGS = $(subst $(CC_FLAGS_FTRACE),,$(ORIG_CFLAGS))
# Avoid recursion due to instrumentation.
KCSAN_SANITIZE := n