linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@kernel.org>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Martin Liska <mliska@suse.cz>,
	Sedat Dilek <sedat.dilek@gmail.com>,
	Michal Marek <michal.lkml@markovi.net>,
	Nick Desaulniers <ndesaulniers@google.com>
Subject: Re: [PATCH v2 2/2] kbuild: lto: preserve MAKEFLAGS for module linking
Date: Tue, 20 Sep 2022 10:06:46 +0200	[thread overview]
Message-ID: <0d2464f2-b900-4fd9-74cb-61d635d45799@kernel.org> (raw)
In-Reply-To: <CAK7LNATNy6-W+9USiO1pEK1syj1M1fVB1Zda2NuDmPogVp4cmQ@mail.gmail.com>

On 19. 07. 22, 11:15, Masahiro Yamada wrote:
> On Tue, Jul 19, 2022 at 5:41 PM Jiri Slaby <jslaby@suse.cz> wrote:
>>
>> From: Martin Liska <mliska@suse.cz>
>>
>> Prefix command in makefile run in order to preserve access to jobserver.
>> This is needed for gcc at least.
>>
>> Fixes this warning:
>> lto-wrapper: warning: jobserver is not available: ‘--jobserver-auth=’ is not present in ‘MAKEFLAGS’
> 
> 
> What is lto-wrapper ?

lto-wrapper is a part of gcc:
https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/lto-wrapper.cc

And is invoked during the link of LTO objects (also to link in parallel 
if jobserver is available).

I am leaving the unanswered questions below for Martin to answer.

>> Cc: Sedat Dilek <sedat.dilek@gmail.com>
>> Cc: Masahiro Yamada <masahiroy@kernel.org>
>> Cc: Michal Marek <michal.lkml@markovi.net>
>> Cc: Nick Desaulniers <ndesaulniers@google.com>
>> Fixes: 5d45950dfbb1 (kbuild: move vmlinux.o link to scripts/Makefile.vmlinux_o)
>> Signed-off-by: Martin Liska <mliska@suse.cz>
>> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
>> ---
>>
>> Notes:
>>      [v2] this is new in v2
>>
>>   scripts/Makefile.build | 6 +++---
>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/scripts/Makefile.build b/scripts/Makefile.build
>> index bb63374fb055..493f3c4e8461 100644
>> --- a/scripts/Makefile.build
>> +++ b/scripts/Makefile.build
>> @@ -247,8 +247,8 @@ endef
>>
>>   # Built-in and composite module parts
>>   $(obj)/%.o: $(src)/%.c $(recordmcount_source) FORCE
>> -       $(call if_changed_rule,cc_o_c)
>> -       $(call cmd,force_checksrc)
>> +       +$(call if_changed_rule,cc_o_c)
>> +       +$(call cmd,force_checksrc)
> 
> 
> cmd_force_checksrc invokes sparse.
> How is it related to GCC?
> 
> 
> 
> 
>>
>>   # To make this rule robust against "Argument list too long" error,
>>   # ensure to add $(obj)/ prefix by a shell command.
>> @@ -457,7 +457,7 @@ endef
>>   $(multi-obj-m): objtool-enabled := $(delay-objtool)
>>   $(multi-obj-m): part-of-module := y
>>   $(multi-obj-m): %.o: %.mod FORCE
>> -       $(call if_changed_rule,ld_multi_m)
>> +       +$(call if_changed_rule,ld_multi_m)
>>   $(call multi_depend, $(multi-obj-m), .o, -objs -y -m)
> 
> 
> cmd_ld_multi_m invokes $(LD) directly.
> How is it related to gcc?



-- 
js
suse labs


  reply	other threads:[~2022-09-20  8:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-19  8:41 [PATCH v2 1/2] kbuild: pass jobserver to cmd_ld_vmlinux.o Jiri Slaby
2022-07-19  8:41 ` [PATCH v2 2/2] kbuild: lto: preserve MAKEFLAGS for module linking Jiri Slaby
2022-07-19  9:15   ` Masahiro Yamada
2022-09-20  8:06     ` Jiri Slaby [this message]
2022-09-20 12:34       ` Martin Liška
2022-07-19  9:15 ` [PATCH v2 1/2] kbuild: pass jobserver to cmd_ld_vmlinux.o Masahiro Yamada
2022-09-20  6:16   ` Jiri Slaby

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=0d2464f2-b900-4fd9-74cb-61d635d45799@kernel.org \
    --to=jirislaby@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=mliska@suse.cz \
    --cc=ndesaulniers@google.com \
    --cc=sedat.dilek@gmail.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).