lkml.org 
[lkml]   [2022]   [Jul]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 2/2] kbuild: lto: preserve MAKEFLAGS for module linking
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 ?

>
> 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?






>
> targets := $(filter-out $(PHONY), $(targets))
> --
> 2.37.1
>


--
Best Regards
Masahiro Yamada

\
 
 \ /
  Last update: 2022-07-19 11:18    [W:0.068 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site