summaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.modpost
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2020-06-01 07:57:10 +0200
committerMasahiro Yamada <masahiroy@kernel.org>2020-06-06 16:38:12 +0200
commitf1005b30ade716eb9286613aeb1d33b5c7852a91 (patch)
tree683574ca374de42c2379035bd7aa7c570d738517 /scripts/Makefile.modpost
parentmodpost: print symbol dump file as the build target in short log (diff)
downloadlinux-f1005b30ade716eb9286613aeb1d33b5c7852a91.tar.xz
linux-f1005b30ade716eb9286613aeb1d33b5c7852a91.zip
modpost: refactor -i option calculation
Prepare to use -i for in-tree modpost as well. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to '')
-rw-r--r--scripts/Makefile.modpost6
1 files changed, 2 insertions, 4 deletions
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index e766e134b0f3..79e850c8ce01 100644
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -43,13 +43,9 @@ __modpost:
include include/config/auto.conf
include scripts/Kbuild.include
-kernelsymfile := $(objtree)/Module.symvers
-
MODPOST = scripts/mod/modpost \
$(if $(CONFIG_MODVERSIONS),-m) \
$(if $(CONFIG_MODULE_SRCVERSION_ALL),-a) \
- $(if $(KBUILD_EXTMOD),-i $(kernelsymfile)) \
- $(if $(KBUILD_EXTMOD),$(addprefix -i ,$(KBUILD_EXTRA_SYMBOLS))) \
$(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \
$(if $(KBUILD_MODPOST_WARN),-w) \
-o $@
@@ -86,12 +82,14 @@ include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \
# modpost option for external modules
MODPOST += -e
+input-symdump := Module.symvers $(KBUILD_EXTRA_SYMBOLS)
output-symdump := $(KBUILD_EXTMOD)/Module.symvers
endif
# modpost options for modules (both in-kernel and external)
MODPOST += \
+ $(addprefix -i ,$(input-symdump)) \
$(if $(CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS)$(KBUILD_NSDEPS),-N)
# 'make -i -k' ignores compile errors, and builds as many modules as possible.