da7ca2a15f135b6139de3ddbdea68683e7773489
[openwrt/openwrt.git] / target / linux / generic / hack-4.9 / 207-disable-modorder.patch
1 From c9ef4ab0f54356ee9f91d9676ea0ec123840ddc7 Mon Sep 17 00:00:00 2001
2 From: Felix Fietkau <nbd@nbd.name>
3 Date: Fri, 7 Jul 2017 16:57:33 +0200
4 Subject: kernel: do not build modules.order
5
6 It is not needed for anything on the system and skipping this saves some
7 build time, especially in cases where there is nothing to do.
8
9 lede-commit: afc1675833a7bf5df094f59f7250369520646d04
10 Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 ---
12 Makefile | 2 --
13 scripts/Makefile.build | 2 +-
14 2 files changed, 1 insertion(+), 3 deletions(-)
15
16 --- a/Makefile
17 +++ b/Makefile
18 @@ -1202,7 +1202,6 @@ all: modules
19
20 PHONY += modules
21 modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
22 - $(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
23 @$(kecho) ' Building modules, stage 2.';
24 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
25 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modbuild
26 @@ -1232,7 +1231,6 @@ _modinst_:
27 rm -f $(MODLIB)/build ; \
28 ln -s $(CURDIR) $(MODLIB)/build ; \
29 fi
30 - @cp -f $(objtree)/modules.order $(MODLIB)/
31 @cp -f $(objtree)/modules.builtin $(MODLIB)/
32 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst
33
34 --- a/scripts/Makefile.build
35 +++ b/scripts/Makefile.build
36 @@ -93,7 +93,7 @@ modorder-target := $(obj)/modules.order
37 # We keep a list of all modules in $(MODVERDIR)
38
39 __build: $(if $(KBUILD_BUILTIN),$(builtin-target) $(lib-target) $(extra-y)) \
40 - $(if $(KBUILD_MODULES),$(obj-m) $(modorder-target)) \
41 + $(if $(KBUILD_MODULES),$(obj-m)) \
42 $(subdir-ym) $(always)
43 @:
44