]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - Makefile
kbuild: fix the modules order between drivers and libs
[mirror_ubuntu-jammy-kernel.git] / Makefile
index c9de14317532cedf491886e93e8ce177639d8d72..4d8d6d071dd5b80dfddb43e2de4ab0efe4f65c95 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1161,13 +1161,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)))