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

Unified · Split

scripts/Makefile.modpost+4−1
@@ -53,7 +53,6 @@ MODPOST = scripts/mod/modpost \ · 52 unmodified lines
53 $(if $(KBUILD_EXTMOD),$(addprefix -e ,$(KBUILD_EXTRA_SYMBOLS))) \53 $(if $(KBUILD_EXTMOD),$(addprefix -e ,$(KBUILD_EXTRA_SYMBOLS))) \
54 $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \54 $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \
55 $(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \55 $(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \
56 $(if $(CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS)$(KBUILD_NSDEPS),-N) \
57 $(if $(KBUILD_MODPOST_WARN),-w)56 $(if $(KBUILD_MODPOST_WARN),-w)
58 57
59ifdef MODPOST_VMLINUX58ifdef MODPOST_VMLINUX
@@ -82,6 +81,10 @@ include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \ · 22 unmodified lines
82 $(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile)81 $(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile)
83endif82endif
84 83
84# modpost options for modules (both in-kernel and external)
85MODPOST += \
86 $(if $(CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS)$(KBUILD_NSDEPS),-N)
87
85# 'make -i -k' ignores compile errors, and builds as many modules as possible.88# 'make -i -k' ignores compile errors, and builds as many modules as possible.
86ifneq ($(findstring i,$(filter-out --%,$(MAKEFLAGS))),)89ifneq ($(findstring i,$(filter-out --%,$(MAKEFLAGS))),)
87MODPOST += -n90MODPOST += -n