modpost: show warning if any of symbol dump files is missing

If modpost fails to load a symbol dump file, it cannot check unresolved
symbols, hence module dependency will not be added. Nor CRCs can be added.

Currently, external module builds check only $(objtree)/Module.symvers,
but it should check files specified by KBUILD_EXTRA_SYMBOLS as well.

Move the warning message from the top Makefile to scripts/Makefile.modpost
and print the warning if any dump file is missing.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
Masahiro Yamada
2020-06-01 14:57:14 +09:00
parent 7e8a323582
commit 48a0f72797
2 changed files with 5 additions and 10 deletions

View File

@@ -98,8 +98,11 @@ ifneq ($(findstring i,$(filter-out --%,$(MAKEFLAGS))),)
MODPOST += -n
endif
# Clear VPATH to not search for *.symvers in $(srctree). Check only $(objtree).
VPATH :=
$(input-symdump):
@:
@echo >&2 'WARNING: Symbol version dump "$@" is missing.'
@echo >&2 ' Modules may not have dependencies or modversions.'
# Read out modules.order to pass in modpost.
# Otherwise, allmodconfig would fail with "Argument list too long".