Skip to content

Commit b480fec

Browse files
committed
kbuild: clear KBUILD_MODULES in top Makefile if CONFIG_MODULES=n
Do not try to build any module-related artifacts when CONFIG_MODULES is disabled. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
1 parent e578edc commit b480fec

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎Makefile‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1724,6 +1724,10 @@ build-dirs := $(foreach d, $(build-dirs), \
17241724

17251725
endif
17261726

1727+
ifndef CONFIG_MODULES
1728+
KBUILD_MODULES :=
1729+
endif
1730+
17271731
# Handle descending into subdirectories listed in $(build-dirs)
17281732
# Preset locale variables to speed up the build process. Limit locale
17291733
# tweaks to this spot to avoid wrong language settings when running

‎scripts/Makefile.build‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ ifdef need-builtin
7777
builtin-target := $(obj)/built-in.a
7878
endif
7979

80-
ifeq ($(CONFIG_MODULES)$(need-modorder),y1)
80+
ifdef need-modorder
8181
modorder-target := $(obj)/modules.order
8282
endif
8383

0 commit comments

Comments
 (0)