summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2022-10-15 05:18:11 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-04-13 16:48:26 +0200
commitb97e4100be37350f1953c897902097cb01347df6 (patch)
treedbf2dda8bfa5264d6dc51f4fd1fb6655220d72b7
parent326b80bd2267c9f25eca1cdb725980a27a084add (diff)
kbuild: fix single directory build
commit 3753af778dd9d0d5199d6a7d01b0ead33135d095 upstream. Commit f110e5a250e3 ("kbuild: refactor single builds of *.ko") was wrong. KBUILD_MODULES _is_ needed for single builds. Otherwise, "make foo/bar/baz/" does not build module objects at all. Fixes: f110e5a250e3 ("kbuild: refactor single builds of *.ko") Reported-by: David Sterba <dsterba@suse.cz> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Tested-by: David Sterba <dsterba@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 4de8cd300451..69c2fa9a1c09 100644
--- a/Makefile
+++ b/Makefile
@@ -1890,6 +1890,8 @@ export KBUILD_SINGLE_TARGETS := $(addprefix $(extmod_prefix), $(single-no-ko))
build-dirs := $(foreach d, $(build-dirs), \
$(if $(filter $(d)/%, $(KBUILD_SINGLE_TARGETS)), $(d)))
+KBUILD_MODULES := 1
+
endif
# Handle descending into subdirectories listed in $(build-dirs)