aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-09-14 17:31:02 -1000
committerLinus Torvalds <torvalds@linux-foundation.org>2018-09-14 17:31:02 -1000
commit5b945fd2c34c6324752fc793266b4598a307d765 (patch)
tree48e7684f00e165730c6a252ebe0739479c532971
parent090b75bcba62e8e0e43c8acdbc230d26c5b731dc (diff)
parentb1f4ff74fcb0e82664e8633cc225c2ad4234878a (diff)
downloadpowerpc-5b945fd2c34c6324752fc793266b4598a307d765.tar.gz
Merge tag 'trace-v4.19-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
Pull tracing fix from Steven Rostedt: "This fixes an issue with the build system caused by a change that modifies CC_FLAGS_FTRACE. The issue is that it breaks the dependencies and causes "make targz-pkg" to rebuild the entire world" * tag 'trace-v4.19-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing/Makefile: Fix handling redefinition of CC_FLAGS_FTRACE
-rw-r--r--Makefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 4d5c883a98e5a0..a5ef6818157a0b 100644
--- a/Makefile
+++ b/Makefile
@@ -616,6 +616,11 @@ CFLAGS_GCOV := -fprofile-arcs -ftest-coverage \
$(call cc-disable-warning,maybe-uninitialized,)
export CFLAGS_GCOV
+# The arch Makefiles can override CC_FLAGS_FTRACE. We may also append it later.
+ifdef CONFIG_FUNCTION_TRACER
+ CC_FLAGS_FTRACE := -pg
+endif
+
# The arch Makefile can set ARCH_{CPP,A,C}FLAGS to override the default
# values of the respective KBUILD_* variables
ARCH_CPPFLAGS :=
@@ -755,9 +760,6 @@ KBUILD_CFLAGS += $(call cc-option, -femit-struct-debug-baseonly) \
endif
ifdef CONFIG_FUNCTION_TRACER
-ifndef CC_FLAGS_FTRACE
-CC_FLAGS_FTRACE := -pg
-endif
ifdef CONFIG_FTRACE_MCOUNT_RECORD
# gcc 5 supports generating the mcount tables directly
ifeq ($(call cc-option-yn,-mrecord-mcount),y)