summaryrefslogtreecommitdiff
path: root/scripts/Makefile.modpost
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-10-03 13:29:13 +0300
committerMasahiro Yamada <yamada.masahiro@socionext.com>2019-11-11 14:07:03 +0300
commit1747269ab016b49650c952099b0ca096ed5c06f1 (patch)
treec61a1106c7cef779cb8b158906227e7e765e55d0 /scripts/Makefile.modpost
parentfab546e6cd7aee6574472ad3239db07ee1d94c09 (diff)
downloadlinux-1747269ab016b49650c952099b0ca096ed5c06f1.tar.xz
modpost: do not parse vmlinux for external module builds
When building external modules, $(objtree)/Module.symvers is scanned for symbol information of vmlinux and in-tree modules. Additionally, vmlinux is parsed if it exists in $(objtree)/. This is totally redundant since all the necessary information is contained in $(objtree)/Module.symvers. Do not parse vmlinux at all for external module builds. This makes sense because vmlinux is deleted by 'make clean'. 'make clean' leaves all the build artifacts for building external modules. vmlinux is unneeded for that. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/Makefile.modpost')
-rw-r--r--scripts/Makefile.modpost8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index cc19b95c2116..13842693c143 100644
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -67,7 +67,11 @@ __modpost:
else
-ifneq ($(KBUILD_EXTMOD),)
+MODPOST += $(subst -i,-n,$(filter -i,$(MAKEFLAGS))) -s -T -
+
+ifeq ($(KBUILD_EXTMOD),)
+MODPOST += $(wildcard vmlinux)
+else
# set src + obj - they may be used in the modules's Makefile
obj := $(KBUILD_EXTMOD)
@@ -78,8 +82,6 @@ include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \
$(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile)
endif
-MODPOST += $(subst -i,-n,$(filter -i,$(MAKEFLAGS))) -s -T - $(wildcard vmlinux)
-
# find all modules listed in modules.order
modules := $(sort $(shell cat $(MODORDER)))