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 <ben@decadent.org.uk>
Thu, 28 Sep 2017 17:27:56 +0000 (18:27 +0100)
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 7675d11ee65e6d41e353debcd2fc51abff9a5dfa..40c4cc4c95aa536139d146544cfae537ab2eefd4 100644 (file)
@@ -244,6 +244,11 @@ cmd_record_mcount =                                                \
        fi;
 endif
 
+# Don't require recordmcount source for an OOT build.
+ifdef KBUILD_EXTMOD
+recordmcount_source :=
+endif
+
 ifdef CONFIG_STACK_VALIDATION
 ifneq ($(SKIP_STACK_VALIDATION),1)