summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Kubecek <mkubecek@suse.cz>2023-09-11 11:01:29 +0300
committerMasahiro Yamada <masahiroy@kernel.org>2023-09-14 20:39:24 +0300
commit552c5013f2bc648611395ea80df6250aa4fe28f6 (patch)
tree79d85bafe8e13ef2342bb1f274c0cdf86e02a578
parentc86e9ae5e3ad82969fe395414d1d9f173f8e9fd4 (diff)
downloadlinux-552c5013f2bc648611395ea80df6250aa4fe28f6.tar.xz
kbuild: avoid long argument lists in make modules_install
Running "make modules_install" may fail with make[2]: execvp: /bin/sh: Argument list too long if many modules are built and INSTALL_MOD_PATH is long. This is because scripts/Makefile.modinst creates all directories with one mkdir command. Use $(foreach ...) instead to prevent an excessive argument list. Fixes: 2dfec887c0fd ("kbuild: reduce the number of mkdir calls during modules_install") Signed-off-by: Michal Kubecek <mkubecek@suse.cz> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
-rw-r--r--scripts/Makefile.modinst2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst
index c59cc57286ba..346f5ec50682 100644
--- a/scripts/Makefile.modinst
+++ b/scripts/Makefile.modinst
@@ -113,7 +113,7 @@ quiet_cmd_sign :=
endif
# Create necessary directories
-$(shell mkdir -p $(sort $(dir $(install-y))))
+$(foreach dir, $(sort $(dir $(install-y))), $(shell mkdir -p $(dir)))
$(dst)/%.ko: $(extmod_prefix)%.ko FORCE
$(call cmd,install)