]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - scripts/Makefile.build
kbuild/recordmcount: Add RECORDMCOUNT_WARN to warn about mcount callers
[karo-tx-linux.git] / scripts / Makefile.build
index d5f925abe4d29710ab0b314bf28d29752b35dc8d..fdca952f6a409ba41cbae8a4a1e351c0acee4673 100644 (file)
@@ -244,13 +244,16 @@ endif
 
 ifdef CONFIG_FTRACE_MCOUNT_RECORD
 ifdef BUILD_C_RECORDMCOUNT
+ifeq ("$(origin RECORDMCOUNT_WARN)", "command line")
+  RECORDMCOUNT_FLAGS = -w
+endif
 # Due to recursion, we must skip empty.o.
 # The empty.o file is created in the make process in order to determine
 #  the target endianness and word size. It is made before all other C
 #  files, including recordmcount.
 sub_cmd_record_mcount =                                        \
        if [ $(@) != "scripts/mod/empty.o" ]; then      \
-               $(objtree)/scripts/recordmcount "$(@)"; \
+               $(objtree)/scripts/recordmcount $(RECORDMCOUNT_FLAGS) "$(@)";   \
        fi;
 else
 sub_cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \