Commit 552c5013 authored by Michal Kubecek's avatar Michal Kubecek Committed by Masahiro Yamada

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: 2dfec887 ("kbuild: reduce the number of mkdir calls during modules_install")
Signed-off-by: default avatarMichal Kubecek <mkubecek@suse.cz>
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent c86e9ae5
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment