Skip to content

Commit 5ab70ff

Browse files
committed
kbuild: do not set -w for vmlinux.o modpost
The -w option is meaningless for the first pass of modpost (vmlinux.o). We know there are unresolved symbols in vmlinux.o, hence we skip check_exports() and other checks when mod->is_vmlinux is set. See the following part in the for-loop. if (mod->is_vmlinux || mod->from_dump) continue; Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 69bc8d3 commit 5ab70ff

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

scripts/Makefile.modpost

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232
# Step 4 is solely used to allow module versioning in external modules,
3333
# where the CRC of each module is retrieved from the Module.symvers file.
3434

35-
# KBUILD_MODPOST_WARN can be set to avoid error out in case of undefined
36-
# symbols in the final module linking stage
3735
# KBUILD_MODPOST_NOFINAL can be set to skip the final link of modules.
3836
# This is solely useful to speed up test compiles
3937

@@ -50,7 +48,6 @@ MODPOST = scripts/mod/modpost \
5048
$(if $(CONFIG_MODVERSIONS),-m) \
5149
$(if $(CONFIG_MODULE_SRCVERSION_ALL),-a) \
5250
$(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \
53-
$(if $(KBUILD_MODPOST_WARN),-w) \
5451
-o $@
5552

5653
ifdef MODPOST_VMLINUX
@@ -136,6 +133,11 @@ endif
136133

137134
modules := $(sort $(shell cat $(MODORDER)))
138135

136+
# KBUILD_MODPOST_WARN can be set to avoid error out in case of undefined symbols
137+
ifneq ($(KBUILD_MODPOST_WARN),)
138+
MODPOST += -w
139+
endif
140+
139141
# Read out modules.order to pass in modpost.
140142
# Otherwise, allmodconfig would fail with "Argument list too long".
141143
quiet_cmd_modpost = MODPOST $@

0 commit comments

Comments
 (0)