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: d0736af811 ("kbuild: generate Module.symvers only when vmlinux exists")
Signed-off-by: J. Avila <elavila@google.com>
Change-Id: Ic8dcc220cb7b93498629719aaccdb7b6fc38a6a1
This commit is contained in:
J. Avila
2021-05-20 20:50:24 +00:00
parent 17b9c24b25
commit c8df669b7c

View File

@@ -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