History

modpost: pass -N option only for modules modpost

The built-in only code is not required to have MODULE_IMPORT_NS() to use symbols. So, the namespace is not checked for vmlinux(.o). Do not pass the meaningless -N option to the first pass of modpost.

Masahiro Yamada committed 6 years ago

Commit 4e5ab741 parent 89d61171 file · +4 −1Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/Makefile.modpost+4−1
@@ -53,7 +53,6 @@ MODPOST = scripts/mod/modpost \ · 52 unmodified lines
5353 $(if $(KBUILD_EXTMOD),$(addprefix -e ,$(KBUILD_EXTRA_SYMBOLS))) \
5454 $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \
5555 $(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \
56− $(if $(CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS)$(KBUILD_NSDEPS),-N) \
5756 $(if $(KBUILD_MODPOST_WARN),-w)
5857
5958 ifdef MODPOST_VMLINUX
@@ -82,6 +81,10 @@ include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \ · 22 unmodified lines
8281 $(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile)
8382 endif
8483
84+# modpost options for modules (both in-kernel and external)
85+MODPOST += \
86+ $(if $(CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS)$(KBUILD_NSDEPS),-N)
87+
8588 # 'make -i -k' ignores compile errors, and builds as many modules as possible.
8689 ifneq ($(findstring i,$(filter-out --%,$(MAKEFLAGS))),)
8790 MODPOST += -n