kbuild: Fix recordmcount dependency for OOT modules
authorBen Hutchings <ben@decadent.org.uk>
Mon, 8 Sep 2014 17:31:24 +0000 (18:31 +0100)
committerSalvatore Bonaccorso <carnil@debian.org>
Mon, 7 Mar 2022 21:06:21 +0000 (21:06 +0000)
Forwarded: no

We never rebuild anything in-tree when building an out-of-tree
modules, so external modules should not depend on the recordmcount
sources.

Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name kbuild-fix-recordmcount-dependency.patch

scripts/Makefile.build

index 8bd4e673383f3269b6a53bd1bc1c704a8723ada8..4bb15b7de468060c29ceea976e8c4eb80beb83da 100644 (file)
@@ -209,6 +209,11 @@ cmd_record_mcount = $(if $(findstring $(strip $(CC_FLAGS_FTRACE)),$(_c_flags)),
 endif # CC_USING_RECORD_MCOUNT
 endif # CONFIG_FTRACE_MCOUNT_RECORD
 
+# Don't require recordmcount source for an OOT build.
+ifdef KBUILD_EXTMOD
+recordmcount_source :=
+endif
+
 ifdef CONFIG_STACK_VALIDATION
 ifneq ($(SKIP_STACK_VALIDATION),1)