Skip to content

Commit a7c4127

Browse files
committed
Merge tag 'kbuild-fixes-v6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild fixes from Masahiro Yamada: - Fix single *.ko build - Fix module builds when vmlinux.o or Module.symver is missing * tag 'kbuild-fixes-v6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: readd -w option when vmlinux.o or Module.symver is missing kbuild: fix single *.ko build
2 parents 0a71553 + 735aec5 commit a7c4127

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1986,7 +1986,7 @@ $(single-no-ko): $(build-dir)
19861986
# Remove MODORDER when done because it is not the real one.
19871987
PHONY += single_modules
19881988
single_modules: $(single-no-ko) modules_prepare
1989-
$(Q){ $(foreach m, $(single-ko), echo $(extmod_prefix)$m;) } > $(MODORDER)
1989+
$(Q){ $(foreach m, $(single-ko), echo $(extmod_prefix)$(m:%.ko=%.o);) } > $(MODORDER)
19901990
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
19911991
ifneq ($(KBUILD_MODPOST_NOFINAL),1)
19921992
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modfinal

scripts/Makefile.modpost

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ modpost-args = \
4444
$(if $(CONFIG_MODVERSIONS),-m) \
4545
$(if $(CONFIG_MODULE_SRCVERSION_ALL),-a) \
4646
$(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \
47+
$(if $(KBUILD_MODPOST_WARN),-w) \
4748
$(if $(KBUILD_NSDEPS),-d $(MODULES_NSDEPS)) \
4849
$(if $(CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS)$(KBUILD_NSDEPS),-N) \
4950
-o $@
@@ -55,10 +56,6 @@ ifneq ($(findstring i,$(filter-out --%,$(MAKEFLAGS))),)
5556
modpost-args += -n
5657
endif
5758

58-
ifneq ($(KBUILD_MODPOST_WARN)$(missing-input),)
59-
modpost-args += -w
60-
endif
61-
6259
# Read out modules.order to pass in modpost.
6360
# Otherwise, allmodconfig would fail with "Argument list too long".
6461
ifdef KBUILD_MODULES
@@ -124,6 +121,10 @@ modpost-args += -e $(addprefix -i , $(KBUILD_EXTRA_SYMBOLS))
124121

125122
endif # ($(KBUILD_EXTMOD),)
126123

124+
ifneq ($(missing-input),)
125+
modpost-args += -w
126+
endif
127+
127128
quiet_cmd_modpost = MODPOST $@
128129
cmd_modpost = \
129130
$(if $(missing-input), \

0 commit comments

Comments
 (0)