Blob Blame History Raw
From: Michal Marek <mmarek@suse.cz>
Subject: Fix Module.supported handling for external modules
References: bnc#905304
Patch-mainline: Never, SLES feature

The $(srctree)/Module.supported file should only be used when building
the kernel. Likewise for $(objtree)/Module.supported, which is
equivalent to $(dir $(MODVERDIR))/Module.supported when building the
kernel.

Signed-off-by: Michal Marek <mmarek@suse.cz>

---
 scripts/Makefile.modpost | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -59,8 +59,7 @@ MODPOST = scripts/mod/modpost						\
 	$(if $(KBUILD_MODPOST_WARN),-w)					\
 	$(if $(CONFIG_SUSE_KERNEL_SUPPORTED),				\
 		-N $(firstword $(wildcard $(dir $(MODVERDIR))/Module.supported \
-		$(objtree)/Module.supported				\
-		$(srctree)/Module.supported /dev/null)))
+		$(if $(KBUILD_EXTMOD),,$(srctree)/Module.supported) /dev/null)))
 
 ifdef MODPOST_VMLINUX