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>
Mon, 24 Feb 2025 01:11:58 +0000 (02:11 +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 17e8b20659001ff1cebee0d809e2a0352b406ffa..0c85e706111141abd22ef781782a2fdddd7054a8 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)