Commit f1005b30 authored by Masahiro Yamada's avatar Masahiro Yamada

modpost: refactor -i option calculation

Prepare to use -i for in-tree modpost as well.
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent bcfedae7
...@@ -43,13 +43,9 @@ __modpost: ...@@ -43,13 +43,9 @@ __modpost:
include include/config/auto.conf include include/config/auto.conf
include scripts/Kbuild.include include scripts/Kbuild.include
kernelsymfile := $(objtree)/Module.symvers
MODPOST = scripts/mod/modpost \ MODPOST = scripts/mod/modpost \
$(if $(CONFIG_MODVERSIONS),-m) \ $(if $(CONFIG_MODVERSIONS),-m) \
$(if $(CONFIG_MODULE_SRCVERSION_ALL),-a) \ $(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 $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \
$(if $(KBUILD_MODPOST_WARN),-w) \ $(if $(KBUILD_MODPOST_WARN),-w) \
-o $@ -o $@
...@@ -86,12 +82,14 @@ include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \ ...@@ -86,12 +82,14 @@ include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \
# modpost option for external modules # modpost option for external modules
MODPOST += -e MODPOST += -e
input-symdump := Module.symvers $(KBUILD_EXTRA_SYMBOLS)
output-symdump := $(KBUILD_EXTMOD)/Module.symvers output-symdump := $(KBUILD_EXTMOD)/Module.symvers
endif endif
# modpost options for modules (both in-kernel and external) # modpost options for modules (both in-kernel and external)
MODPOST += \ MODPOST += \
$(addprefix -i ,$(input-symdump)) \
$(if $(CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS)$(KBUILD_NSDEPS),-N) $(if $(CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS)$(KBUILD_NSDEPS),-N)
# 'make -i -k' ignores compile errors, and builds as many modules as possible. # 'make -i -k' ignores compile errors, and builds as many modules as possible.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment