summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2022-08-14 08:09:28 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-08-25 11:38:09 +0200
commit9112826f28ee3a1cd3e7c9b16f9cce0340d6b69f (patch)
treee64f28d193357e873bf300555aabfc0dc23eef22 /Makefile
parent0f516dcd1456b18b56a7de0c1f67b8a4aa54c2ef (diff)
kbuild: fix the modules order between drivers and libs
commit 113147510b48e764e624e3d0e6707a1e48bc05a9 upstream. Commit b2c885549122 ("kbuild: update modules.order only when contained modules are updated") accidentally changed the modules order. Prior to that commit, the modules order was determined based on vmlinux-dirs, which lists core-y/m, drivers-y/m, libs-y/m, in this order. Now, subdir-modorder lists them in a different order: core-y/m, libs-y/m, drivers-y/m. Presumably, there was no practical issue because the modules in drivers and libs are orthogonal, but there is no reason to have this distortion. Get back to the original order. Fixes: b2c885549122 ("kbuild: update modules.order only when contained modules are updated") Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 2 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index b3bfdf51232f..ac56b4757a6e 100644
--- a/Makefile
+++ b/Makefile
@@ -1133,13 +1133,11 @@ vmlinux-alldirs := $(sort $(vmlinux-dirs) Documentation \
$(patsubst %/,%,$(filter %/, $(core-) \
$(drivers-) $(libs-))))
-subdir-modorder := $(addsuffix modules.order,$(filter %/, \
- $(core-y) $(core-m) $(libs-y) $(libs-m) \
- $(drivers-y) $(drivers-m)))
-
build-dirs := $(vmlinux-dirs)
clean-dirs := $(vmlinux-alldirs)
+subdir-modorder := $(addsuffix /modules.order, $(build-dirs))
+
# Externally visible symbols (used by link-vmlinux.sh)
KBUILD_VMLINUX_OBJS := $(head-y) $(patsubst %/,%/built-in.a, $(core-y))
KBUILD_VMLINUX_OBJS += $(addsuffix built-in.a, $(filter %/, $(libs-y)))