summaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.modpost
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Makefile.modpost')
-rw-r--r--scripts/Makefile.modpost7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index b3e08fb1fd56..c383ba33d837 100644
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -98,9 +98,11 @@ output-symdump := $(KBUILD_EXTMOD)/Module.symvers
endif
+existing-input-symdump := $(wildcard $(input-symdump))
+
# modpost options for modules (both in-kernel and external)
MODPOST += \
- $(addprefix -i ,$(wildcard $(input-symdump))) \
+ $(addprefix -i ,$(existing-input-symdump)) \
$(if $(KBUILD_NSDEPS),-d $(MODULES_NSDEPS)) \
$(if $(CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS)$(KBUILD_NSDEPS),-N)
@@ -114,6 +116,7 @@ VPATH :=
$(input-symdump):
@echo >&2 'WARNING: Symbol version dump "$@" is missing.'
@echo >&2 ' Modules may not have dependencies or modversions.'
+ @echo >&2 ' You may get many unresolved symbol warnings.'
ifdef CONFIG_LTO_CLANG
# With CONFIG_LTO_CLANG, .o files might be LLVM bitcode, so we need to run
@@ -134,7 +137,7 @@ endif
modules := $(sort $(shell cat $(MODORDER)))
# KBUILD_MODPOST_WARN can be set to avoid error out in case of undefined symbols
-ifneq ($(KBUILD_MODPOST_WARN),)
+ifneq ($(KBUILD_MODPOST_WARN)$(filter-out $(existing-input-symdump), $(input-symdump)),)
MODPOST += -w
endif