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>
Tue, 29 Mar 2022 20:46:53 +0000 (21:46 +0100)
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 78656b527fe59a2b944b29ce808d8842f3c87bea..e89ff15be51fd95e617d8ff9a0e9e30208adab89 100644 (file)
@@ -223,6 +223,11 @@ cmd_record_mcount = $(if $(findstring $(strip $(CC_FLAGS_FTRACE)),$(_c_flags)),
        $(sub_cmd_record_mcount))
 endif # CONFIG_FTRACE_MCOUNT_USE_RECORDMCOUNT
 
+# Don't require recordmcount source for an OOT build.
+ifdef KBUILD_EXTMOD
+recordmcount_source :=
+endif
+
 ifdef CONFIG_STACK_VALIDATION
 
 objtool := $(objtree)/tools/objtool/objtool