kbuild: Fix recordmcount dependency for OOT modules
authorBen Hutchings <ben@decadent.org.uk>
Mon, 8 Sep 2014 17:31:24 +0000 (18:31 +0100)
committerBen Hutchings <benh@debian.org>
Tue, 9 Jun 2020 17:50:00 +0000 (18:50 +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 a1730d42e5f3b8cc48e8bad4984510fe64c0227b..9200becc80b3ebd184aa07304562e9a3ecf360b5 100644 (file)
@@ -193,6 +193,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)