diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-10-29 21:38:06 +0900 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-11-11 20:10:01 +0900 |
commit | bff9c62b5d20d26f54bab81b33b6d9d1f9afcdf6 (patch) | |
tree | b8178452dcff6dff6594d7b77344363c1292d20c /scripts/Makefile.modpost | |
parent | faade9610246e9e443068be8cb24c784e9a91f2e (diff) | |
download | linux-bff9c62b5d20d26f54bab81b33b6d9d1f9afcdf6.tar.gz linux-bff9c62b5d20d26f54bab81b33b6d9d1f9afcdf6.tar.bz2 linux-bff9c62b5d20d26f54bab81b33b6d9d1f9afcdf6.zip |
modpost: do not invoke extra modpost for nsdeps
'make nsdeps' invokes the modpost three times at most; before linking
vmlinux, before building modules, and finally for generating .ns_deps
files. Running the modpost again and again is not efficient.
The last two can be unified. When the -d option is given, the modpost
still does the usual job, and in addition, generates .ns_deps files.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Tested-by: Matthias Maennich <maennich@google.com>
Reviewed-by: Matthias Maennich <maennich@google.com>
Diffstat (limited to 'scripts/Makefile.modpost')
-rw-r--r-- | scripts/Makefile.modpost | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index 20359c7887b3..0089417760f9 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost @@ -53,8 +53,7 @@ MODPOST = scripts/mod/modpost \ $(if $(KBUILD_EXTMOD),$(addprefix -e ,$(KBUILD_EXTRA_SYMBOLS))) \ $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \ $(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \ - $(if $(KBUILD_MODPOST_WARN),-w) \ - $(if $(filter nsdeps,$(MAKECMDGOALS)),-d) + $(if $(KBUILD_MODPOST_WARN),-w) ifdef MODPOST_VMLINUX @@ -66,7 +65,8 @@ __modpost: else -MODPOST += $(subst -i,-n,$(filter -i,$(MAKEFLAGS))) -s -T - +MODPOST += $(subst -i,-n,$(filter -i,$(MAKEFLAGS))) -s -T - \ + $(if $(KBUILD_NSDEPS),-d) ifeq ($(KBUILD_EXTMOD),) MODPOST += $(wildcard vmlinux) @@ -96,8 +96,6 @@ ifneq ($(KBUILD_MODPOST_NOFINAL),1) $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modfinal endif -nsdeps: __modpost - endif .PHONY: $(PHONY) |