Skip to content

Commit

Permalink
kbuild: avoid long argument lists in make modules_install
Browse files Browse the repository at this point in the history
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: 2dfec88 ("kbuild: reduce the number of mkdir calls during modules_install")
Signed-off-by: Michal Kubecek <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
  • Loading branch information
mkubecek authored and masahir0y committed Sep 14, 2023
1 parent c86e9ae commit 552c501
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/Makefile.modinst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 552c501

Please sign in to comment.