Skip to content

Commit 1131475

Browse files
committed
kbuild: fix the modules order between drivers and libs
Commit b2c8855 ("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: b2c8855 ("kbuild: update modules.order only when contained modules are updated") Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 370655b commit 1131475

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,13 +1113,11 @@ vmlinux-alldirs := $(sort $(vmlinux-dirs) Documentation \
11131113
$(patsubst %/,%,$(filter %/, $(core-) \
11141114
$(drivers-) $(libs-))))
11151115

1116-
subdir-modorder := $(addsuffix modules.order,$(filter %/, \
1117-
$(core-y) $(core-m) $(libs-y) $(libs-m) \
1118-
$(drivers-y) $(drivers-m)))
1119-
11201116
build-dirs := $(vmlinux-dirs)
11211117
clean-dirs := $(vmlinux-alldirs)
11221118

1119+
subdir-modorder := $(addsuffix /modules.order, $(build-dirs))
1120+
11231121
# Externally visible symbols (used by link-vmlinux.sh)
11241122
KBUILD_VMLINUX_OBJS := $(head-y) $(patsubst %/,%/built-in.a, $(core-y))
11251123
KBUILD_VMLINUX_OBJS += $(addsuffix built-in.a, $(filter %/, $(libs-y)))

0 commit comments

Comments
 (0)