diff --git a/scripts/Makefile.build b/scripts/Makefile.build index f92e0db78c8c..9176cf7ec5d9 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -242,6 +242,11 @@ endif endif ifdef CONFIG_FTRACE_MCOUNT_RECORD +# gcc 5 supports generating the mcount tables directly +ifneq ($(call cc-option,-mrecord-mcount,y),y) +KBUILD_CFLAGS += -mrecord-mcount +else +# else do it all manually ifdef BUILD_C_RECORDMCOUNT ifeq ("$(origin RECORDMCOUNT_WARN)", "command line") RECORDMCOUNT_FLAGS = -w @@ -296,6 +301,7 @@ endif ifdef CONFIG_GCOV_KERNEL objtool_args += --no-unreachable endif +endif # 'OBJECT_FILES_NON_STANDARD := y': skip objtool checking for a directory # 'OBJECT_FILES_NON_STANDARD_foo.o := 'y': skip objtool checking for a file