linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: Michal Kubecek <mkubecek@suse.cz>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kbuild: avoid long argument lists in make modules_install
Date: Fri, 15 Sep 2023 02:37:17 +0900	[thread overview]
Message-ID: <CAK7LNASTc80bZY1Kvk4rwRk=jL0uCaOfc0ggmWv5O994WD=rsg@mail.gmail.com> (raw)
In-Reply-To: <20230911080129.38BA12016B@lion.mk-sys.cz>

On Mon, Sep 11, 2023 at 5:01 PM Michal Kubecek <mkubecek@suse.cz> wrote:
>
> 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>
> ---

Applied to linux-kbuild/fixes.
Thanks.



>  scripts/Makefile.modinst | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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)
> --
> 2.42.0
>


-- 
Best Regards
Masahiro Yamada

      reply	other threads:[~2023-09-14 17:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-11  8:01 [PATCH] kbuild: avoid long argument lists in make modules_install Michal Kubecek
2023-09-14 17:37 ` Masahiro Yamada [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAK7LNASTc80bZY1Kvk4rwRk=jL0uCaOfc0ggmWv5O994WD=rsg@mail.gmail.com' \
    --to=masahiroy@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mkubecek@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).