Message ID | 20200517094859.2376211-10-masahiroy@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | modpost: various fixes, cleanups, optimizations | expand |
From: Masahiro Yamada > Sent: 17 May 2020 10:49 > $(firstword ...) in scripts/Makefile.modpost was added by commit > 3f3fd3c05585 ("[PATCH] kbuild: allow multi-word $M in Makefile.modpost") > to build multiple external module directories. > > This feature has been broken for a while. Remove the bitrotten code, and > stop parsing if M or KBUILD_EXTMOD contains multiple words. ISTR that one of the kernel documentation files says that it is possible to build multiple modules together in order to avoid 'faffing' with exported symbol lists. So the docs need updating to match. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)
On Sun, May 17, 2020 at 9:33 PM David Laight <David.Laight@aculab.com> wrote: > > From: Masahiro Yamada > > Sent: 17 May 2020 10:49 > > $(firstword ...) in scripts/Makefile.modpost was added by commit > > 3f3fd3c05585 ("[PATCH] kbuild: allow multi-word $M in Makefile.modpost") > > to build multiple external module directories. > > > > This feature has been broken for a while. Remove the bitrotten code, and > > stop parsing if M or KBUILD_EXTMOD contains multiple words. > > ISTR that one of the kernel documentation files says that it is possible > to build multiple modules together in order to avoid 'faffing' with > exported symbol lists. > > So the docs need updating to match. Do you remember which doc mentions it? > David > > - > Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK > Registration No: 1397386 (Wales) >
diff --git a/Makefile b/Makefile index 1915630cc24b..aeb690c692ee 100644 --- a/Makefile +++ b/Makefile @@ -218,6 +218,9 @@ ifeq ("$(origin M)", "command line") KBUILD_EXTMOD := $(M) endif +$(if $(word 2, $(KBUILD_EXTMOD)), \ + $(error building multiple external modules is not supported)) + export KBUILD_CHECKSRC KBUILD_EXTMOD extmod-prefix = $(if $(KBUILD_EXTMOD),$(KBUILD_EXTMOD)/) diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index 957eed6a17a5..b79bf0e30d32 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost @@ -44,7 +44,7 @@ include include/config/auto.conf include scripts/Kbuild.include kernelsymfile := $(objtree)/Module.symvers -modulesymfile := $(firstword $(KBUILD_EXTMOD))/Module.symvers +modulesymfile := $(KBUILD_EXTMOD)/Module.symvers MODPOST = scripts/mod/modpost \ $(if $(CONFIG_MODVERSIONS),-m) \
$(firstword ...) in scripts/Makefile.modpost was added by commit 3f3fd3c05585 ("[PATCH] kbuild: allow multi-word $M in Makefile.modpost") to build multiple external module directories. This feature has been broken for a while. Remove the bitrotten code, and stop parsing if M or KBUILD_EXTMOD contains multiple words. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> --- Makefile | 3 +++ scripts/Makefile.modpost | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-)