Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3845277rwb; Tue, 20 Sep 2022 05:41:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5PxnYZOuvsRLH+QZhvkb61DLP2VlAsqjOrm/U8Fzu5EvqfnYVLlbklXI2UaYqpNMoZQtni X-Received: by 2002:a63:82c1:0:b0:439:f2d1:a508 with SMTP id w184-20020a6382c1000000b00439f2d1a508mr11917341pgd.155.1663677680577; Tue, 20 Sep 2022 05:41:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663677680; cv=none; d=google.com; s=arc-20160816; b=yFH4LUW9SXNiKhPwisHhVAkeEKIhZXNBNkQqA1MHO7qyvhiMq/goVHWTiix7yKT/RM yqVW3Via9oBUB+OO+mDeehVl+qx+N3+GTaLk8IRYw3kIPaiuH4L9YWlzs8DrnSBdAjhM vlBGTWrh9CrHb/ncvouUgUXCxhU1nqtlXxRso0w7YFIzNv3b7BvGUtgdnLlFNuk3kpek gboMCYoEAYHbuxE79nrEJDNn7CCeoVPWoZiLfRJSyMDX0fvJHGjtehnmve5egO0+/IJD /tigE6UDiy+eIVKV0v3X2YyuM4aCMuxFzBE59VzmIbPPKMryfkCAKdnsqwgxqIi2SI3w RZZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=kEBiP8Irblq9kj6QD799kTTxDt9/WWTcEX16z78NVkU=; b=KJgi7r2LkDTgr2YWOUhCrPeA/b+cp7wahdpTWAbkZANDju3swqy4nxZfhDTSw7Pd6p lRU7TA4a84fkmjimLVNOUgz2+on8y+qLMikmz2DKh+ZhgCdMyJbS+IKlSoB3O1FSDPnR 8gixd+NN885XAnSO7TuZj8zX3Nujl4AsREibUPA5aggDgAlDnzdTsono2s9fVk4R2nEa ykzrcuB1RIqSIESee8maHQi8H5dXWGd0xzTWwHc5/sP0/LCHn3SsDC3Fy2mf1LIVaPWM 7JRxhALhLVvdwvJ3gD91HPL/jqNnZrq0oJ/lN9bup/WA27/2vs2ArEkyMPZ5jtGHEHjD Y1dQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=jEoqDmjk; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k2-20020a170902c40200b0016eeafbe7e7si1830876plk.34.2022.09.20.05.41.08; Tue, 20 Sep 2022 05:41:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=jEoqDmjk; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231238AbiITMe6 (ORCPT + 99 others); Tue, 20 Sep 2022 08:34:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230391AbiITMev (ORCPT ); Tue, 20 Sep 2022 08:34:51 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B2F2E69; Tue, 20 Sep 2022 05:34:49 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id E5AE121B56; Tue, 20 Sep 2022 12:34:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1663677287; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kEBiP8Irblq9kj6QD799kTTxDt9/WWTcEX16z78NVkU=; b=jEoqDmjkCh7lyGBrkzZd8PrCQUDJjtkeuHecIFyS92AX6uJ7FFPOFurawsKVDMSiRx/x2Y /t/mkCBA2Gzgk765VaD/hh5sp+XrNqZRIgdhd4oYuD7qTh0xYoyU9Uw0+gVTljiht/APIO xvV45IMK5+ddhtcbpGH5+9kAE19jUnc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1663677287; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kEBiP8Irblq9kj6QD799kTTxDt9/WWTcEX16z78NVkU=; b=5g+WP+tvoIEfKRnDKwmXYo9RZENhPK4LXtcae6P0xhY4a8NNflV/TV6EZc8QVEwRUhJkjf mLB27rIOwLIDCeCA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id B3AA113ABB; Tue, 20 Sep 2022 12:34:47 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id LwACKmezKWPHWwAAMHmgww (envelope-from ); Tue, 20 Sep 2022 12:34:47 +0000 Message-ID: Date: Tue, 20 Sep 2022 14:34:47 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH v2 2/2] kbuild: lto: preserve MAKEFLAGS for module linking Content-Language: en-US To: Jiri Slaby , Masahiro Yamada Cc: Linux Kbuild mailing list , Linux Kernel Mailing List , Sedat Dilek , Michal Marek , Nick Desaulniers References: <20220719084149.29950-1-jslaby@suse.cz> <20220719084149.29950-2-jslaby@suse.cz> <0d2464f2-b900-4fd9-74cb-61d635d45799@kernel.org> From: =?UTF-8?Q?Martin_Li=c5=a1ka?= In-Reply-To: <0d2464f2-b900-4fd9-74cb-61d635d45799@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/20/22 10:06, Jiri Slaby wrote: > On 19. 07. 22, 11:15, Masahiro Yamada wrote: >> On Tue, Jul 19, 2022 at 5:41 PM Jiri Slaby wrote: >>> >>> From: Martin Liska >>> >>> 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). Yes, it's a driver that is invoked by Linker when it decides to use LTO mode in GCC compiler. Later on the lto-wrapper connects to make's jobserver and runs in parallel. Note a recent [1] make implemented named pipes when it comes to communication with jobserver. And thus the '+' won't be needed in the future, but we need it for now. Cheers, Martin [1] https://git.savannah.gnu.org/cgit/make.git/commit/?id=7ad2593b2d2bb5b9332f4444d8bf93ac6f958bc6 > > I am leaving the unanswered questions below for Martin to answer. > >>> Cc: Sedat Dilek >>> Cc: Masahiro Yamada >>> Cc: Michal Marek >>> Cc: Nick Desaulniers >>> Fixes: 5d45950dfbb1 (kbuild: move vmlinux.o link to scripts/Makefile.vmlinux_o) >>> Signed-off-by: Martin Liska >>> Signed-off-by: Jiri Slaby >>> --- >>> >>> 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? > > >