From: jjohnson@codeaurora.org
To: Nick Desaulniers <ndesaulniers@google.com>
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,
ndesaulniers via sendgmr
<ndesaulniers@ndesaulniers1.mtv.corp.google.com>
Subject: Re: [PATCH 2/2] kbuild: handle excessively long argument lists
Date: Thu, 14 Jan 2021 13:32:45 -0800 [thread overview]
Message-ID: <eb308cc4f26288ad02290d9656179771@codeaurora.org> (raw)
In-Reply-To: <20210114210733.3490303-1-ndesaulniers@google.com>
On 2021-01-14 13:07, Nick Desaulniers wrote:
>> From: Mahesh Kumar Kalikot Veetil <mkalikot@codeaurora.org>
>>
>> Modules with a large number of compilation units may be
>> exceeding AR and LD command argument list. Handle this gracefully by
>> writing the long argument list in a file. The command line options
>> read from file are inserted in place of the original @file option.
>>
>> The usage is well documented at
>> https://www.gnu.org/software/make/manual/html_node/File-Function.html
>>
>> Signed-off-by: Mahesh Kumar Kalikot Veetil <mkalikot@codeaurora.org>
>> Signed-off-by: Jeff Johnson <jjohnson@codeaurora.org>
>> ---
>> scripts/Makefile.build | 6 +++++-
>> 1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/scripts/Makefile.build b/scripts/Makefile.build
>> index 252b7d2..d5ef345 100644
>> --- a/scripts/Makefile.build
>> +++ b/scripts/Makefile.build
>> @@ -425,7 +425,11 @@ $(obj)/lib.a: $(lib-y) FORCE
>> # module is turned into a multi object module, $^ will contain header
>> file
>> # dependencies recorded in the .*.cmd file.
>> quiet_cmd_link_multi-m = LD [M] $@
>> - cmd_link_multi-m = $(LD) $(ld_flags) -r -o $@ $(filter %.o,$^)
>> + cmd_link_multi-m = \
>> + $(file >$@.in,$(filter %.o,$^)) \
>> + $(LD) $(ld_flags) -r -o $@ @$@.in; \
>> + rm -f $@.in
>> +endif
>
> Was this build tested?
>
> $ make LLVM=1 LLVM_IAS=1 -j72 defconfig
> scripts/Makefile.build:432: *** extraneous 'endif'. Stop.
> make: *** [Makefile:535: scripts_basic] Error 2
>
> (Please cc me on v2)
blush
It was tested on a workspace that also contains the Clang LTO series
https://patchwork.kernel.org/project/linux-kbuild/patch/20201211184633.3213045-3-samitolvanen@google.com/
I messed up when trimming, will update in v2
next prev parent reply other threads:[~2021-01-14 21:33 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 [this message]
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 ` [PATCH 1/2] kbuild: simplify cmd_mod Nick Desaulniers
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=eb308cc4f26288ad02290d9656179771@codeaurora.org \
--to=jjohnson@codeaurora.org \
--cc=eberman@quicinc.com \
--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=ndesaulniers@google.com \
--cc=ndesaulniers@ndesaulniers1.mtv.corp.google.com \
--cc=psodagud@quicinc.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