summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-07-31 00:59:00 +0900
committerSasha Levin <sashal@kernel.org>2019-08-25 10:10:31 -0400
commitab5565b2dfe5a08c7060022f2ba2e175d286af88 (patch)
treee4d22fa8596b1d0c0bd1e05a870651d3a32791ee /scripts
parentc07b8aab75d913e220caa7891a0791b97972f4a7 (diff)
downloadlinux-stable-ab5565b2dfe5a08c7060022f2ba2e175d286af88.tar.gz
linux-stable-ab5565b2dfe5a08c7060022f2ba2e175d286af88.tar.bz2
linux-stable-ab5565b2dfe5a08c7060022f2ba2e175d286af88.zip
kbuild: modpost: handle KBUILD_EXTRA_SYMBOLS only for external modules
[ Upstream commit cb4819934a7f9b87876f11ed05b8624c0114551b ] KBUILD_EXTRA_SYMBOLS makes sense only when building external modules. Moreover, the modpost sets 'external_module' if the -e option is given. I replaced $(patsubst %, -e %,...) with simpler $(addprefix -e,...) while I was here. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.modpost2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index 38d77353c66a..cea276955147 100644
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -75,7 +75,7 @@ modpost = scripts/mod/modpost \
$(if $(CONFIG_MODULE_SRCVERSION_ALL),-a,) \
$(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \
$(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \
- $(if $(KBUILD_EXTRA_SYMBOLS), $(patsubst %, -e %,$(KBUILD_EXTRA_SYMBOLS))) \
+ $(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)