From: Nick Desaulniers <ndesaulniers@google.com>
To: jjohnson@codeaurora.org
Cc: eberman@quicinc.com, linux-kbuild@vger.kernel.org,
linux-kernel@vger.kernel.org, masahiroy@kernel.org,
michal.lkml@markovi.net, mkalikot@codeaurora.org,
psodagud@quicinc.com, Sami Tolvanen <samitolvanen@google.com>,
Nick Desaulniers <ndesaulniers@google.com>
Subject: Re: [PATCH 1/2] kbuild: simplify cmd_mod
Date: Thu, 14 Jan 2021 17:07:46 -0800 [thread overview]
Message-ID: <20210115010746.3839839-1-ndesaulniers@google.com> (raw)
In-Reply-To: <1610500731-30960-1-git-send-email-jjohnson@codeaurora.org>
> From: Mahesh Kumar Kalikot Veetil <mkalikot@codeaurora.org>
>
> Modules with a large number of compilation units can exceed execv
> argument list resulting in E2BIG (Argument list too long) error.
>
> Fix this by replacing shell 'echo > file' into a more native
> $(file op filename[,text]) option.
>
> Signed-off-by: Mahesh Kumar Kalikot Veetil <mkalikot@codeaurora.org>
> Signed-off-by: Jeff Johnson <jjohnson@codeaurora.org>
> ---
> scripts/Makefile.build | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> index 4c058f1..252b7d2 100644
> --- a/scripts/Makefile.build
> +++ b/scripts/Makefile.build
> @@ -279,10 +279,11 @@ $(obj)/%.o: $(src)/%.c $(recordmcount_source) $(objtool_dep) FORCE
> $(call if_changed_rule,cc_o_c)
> $(call cmd,force_checksrc)
>
> -cmd_mod = { \
> - echo $(if $($*-objs)$($*-y)$($*-m), $(addprefix $(obj)/, $($*-objs) $($*-y) $($*-m)), $(@:.mod=.o)); \
> - $(undefined_syms) echo; \
> - } > $@
> +cmd_mod = $(file >$@,\
> + $(if $($*-objs)$($*-y)$($*-m), \
> + $(addprefix $(obj)/, $($*-objs) $($*-y) $($*-m)), \
> + $(@:.mod=.o))) \
> + $(undefined_syms) echo >> $@
I find the indendation to be a readability improvement. Thanks for the
patch.
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
>
> $(obj)/%.mod: $(obj)/%.o FORCE
> $(call if_changed,mod)
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
>
>
prev parent reply other threads:[~2021-01-15 1:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-13 1:18 [PATCH 1/2] kbuild: simplify cmd_mod Jeff Johnson
2021-01-13 1:18 ` [PATCH 2/2] kbuild: handle excessively long argument lists Jeff Johnson
2021-01-14 21:07 ` Nick Desaulniers
2021-01-14 21:32 ` jjohnson
2021-01-14 21:49 ` [PATCH v2 " Jeff Johnson
2021-01-15 1:00 ` Nick Desaulniers
2021-01-15 1:25 ` Masahiro Yamada
2021-01-15 1:12 ` Masahiro Yamada
2021-01-15 20:15 ` jjohnson
2021-01-15 21:53 ` Masahiro Yamada
2021-01-19 20:02 ` mkalikot
2021-01-15 1:07 ` Nick Desaulniers [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=20210115010746.3839839-1-ndesaulniers@google.com \
--to=ndesaulniers@google.com \
--cc=eberman@quicinc.com \
--cc=jjohnson@codeaurora.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=michal.lkml@markovi.net \
--cc=mkalikot@codeaurora.org \
--cc=psodagud@quicinc.com \
--cc=samitolvanen@google.com \
/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).