summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorVasily Gorbik <gor@linux.ibm.com>2018-08-06 09:17:42 -0400
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2018-08-15 22:36:12 -0400
commitf28bc3c32c059ab4d13f52155fabd3e20f477f65 (patch)
tree196907e6fa8a510241b23ce44495df9f49f096da /Makefile
parent6d43743e9079ac0531b60cde7eadd0f042873344 (diff)
tracing: Handle CC_FLAGS_FTRACE more accurately
CC_FLAGS_FTRACE is exported and later used to remove ftrace relevant build flags from files which should be built without ftrace support. For that reason add -mfentry to CC_FLAGS_FTRACE as well. That fixes a problem with vdso32 build on s390, where -mfentry could not be used together with -m31 flag. At the same time flags like -pg and -mfentry are not relevant for asm files, so avoid adding them to KBUILD_AFLAGS. Introduce CC_FLAGS_USING instead of CC_USING_FENTRY to collect -DCC_USING_FENTRY (and future alike) which are relevant for both KBUILD_CFLAGS and KBUILD_AFLAGS. Link: http://lkml.kernel.org/r/patch-1.thread-aa7b8d.git-42971afe87de.your-ad-here.call-01533557518-ext-9465@work.hours Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 7 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 67d9d20f8564..489de42d30c7 100644
--- a/Makefile
+++ b/Makefile
@@ -743,12 +743,15 @@ ifdef CONFIG_FUNCTION_TRACER
743ifndef CC_FLAGS_FTRACE 743ifndef CC_FLAGS_FTRACE
744CC_FLAGS_FTRACE := -pg 744CC_FLAGS_FTRACE := -pg
745endif 745endif
746export CC_FLAGS_FTRACE
747ifdef CONFIG_HAVE_FENTRY 746ifdef CONFIG_HAVE_FENTRY
748CC_USING_FENTRY := $(call cc-option, -mfentry -DCC_USING_FENTRY) 747 ifeq ($(call cc-option-yn, -mfentry),y)
748 CC_FLAGS_FTRACE += -mfentry
749 CC_FLAGS_USING += -DCC_USING_FENTRY
750 endif
749endif 751endif
750KBUILD_CFLAGS += $(CC_FLAGS_FTRACE) $(CC_USING_FENTRY) 752export CC_FLAGS_FTRACE
751KBUILD_AFLAGS += $(CC_USING_FENTRY) 753KBUILD_CFLAGS += $(CC_FLAGS_FTRACE) $(CC_FLAGS_USING)
754KBUILD_AFLAGS += $(CC_FLAGS_USING)
752ifdef CONFIG_DYNAMIC_FTRACE 755ifdef CONFIG_DYNAMIC_FTRACE
753 ifdef CONFIG_HAVE_C_RECORDMCOUNT 756 ifdef CONFIG_HAVE_C_RECORDMCOUNT
754 BUILD_C_RECORDMCOUNT := y 757 BUILD_C_RECORDMCOUNT := y