From c8df669b7cf85238443a0df3e136a8dd0364e52d Mon Sep 17 00:00:00 2001 From: "J. Avila" Date: Thu, 20 May 2021 20:50:24 +0000 Subject: [PATCH] ANDROID: modpost: Check for KBUILD_MIXED_TREE for Modules.symvers When building with KBUILD_MIXED_TREE, Modules.symvers will not be built since vmlinux.symvers won't be in the normal build outputs. Fix this by checking for the mixed-build-prefix in the Modules.symvers target. Fixes: d0736af81151c ("kbuild: generate Module.symvers only when vmlinux exists") Signed-off-by: J. Avila Change-Id: Ic8dcc220cb7b93498629719aaccdb7b6fc38a6a1 --- scripts/Makefile.modpost | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index fa50e8fdd344..772e73ee455d 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost @@ -72,15 +72,14 @@ ifeq ($(KBUILD_EXTMOD),) input-symdump := $(mixed-build-prefix)vmlinux.symvers output-symdump := modules-only.symvers module_srcpath := $(srctree) -input-symdump := vmlinux.symvers quiet_cmd_cat = GEN $@ cmd_cat = cat $(real-prereqs) > $@ -ifneq ($(wildcard vmlinux.symvers),) +ifneq ($(wildcard $(mixed-build-prefix)vmlinux.symvers),) __modpost: Module.symvers -Module.symvers: vmlinux.symvers modules-only.symvers FORCE +Module.symvers: $(mixed-build-prefix)vmlinux.symvers modules-only.symvers FORCE $(call if_changed,cat) targets += Module.symvers