Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3605665rwb; Tue, 20 Sep 2022 02:00:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7eb5vWLEO5saYqe0qVhSOEuwisJU8OhFY2fAElipDX+1I/PjgeUkZnnJV1dm5yeN1TJWVy X-Received: by 2002:a17:907:1df1:b0:779:4f57:6bb2 with SMTP id og49-20020a1709071df100b007794f576bb2mr16350856ejc.407.1663664424919; Tue, 20 Sep 2022 02:00:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663664424; cv=none; d=google.com; s=arc-20160816; b=d5NOyGn8mxdB9uhiKNgmFlpzR5/PcQwF+m76QOz3cdiy1hYf4AqXR5XJbm0D1Oym7y dkZzRvw7tepDN8Jnjic2VIPMUpI3ONM7/3hFY3nEXzhNhWK91J7iFHjO/28YPvlV+Dnd SctBgKMPVX7bDVd1M09LcAA3xfFGDCXwcFYYdbSLLRR9qexRytYL0BCukBJavvd620l5 pwWLpIsMCrYyNMFjflwVrQ+lspOeTePs4G2kJa4B+R8Ca+VkB+ddr6zxmxd8EVVAnjit wR6R+jt10FqnJecNTyevB2iL6HgqiKiGDGCqMKTHDcwkR1kJElMEHPB7SISJtOQ6azm3 XcXw== 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; bh=3Q48nRjfZmM0qXUdlJ9dbqaN2v4JDiUTzZSH3VhXCD8=; b=tJPXvLjsv3P5yw3h8h3VLsRUy+YSnsKUd2SSShctTCPB4ShcsO8bFY3V3KZ8iTSGLt h3+oVAT/ybl1wgIswDkkDsn/G5Sr3/BOe2czGzhRrQ2Z8faaZzFAJDqhpjq76OpncBGx tACyUwOoJeUIQlDWvtslnUCwIPj/iGbrcXurgekP6tRjX2l+4C3NLwIbmPLL+UUduGfy oQGQ693mQP7fFFQc3tedJtK5fSZrSSOTnqEsGjU+QP0hSeSno3KFmJoVbVWptvCJJa4T vOnlEs5O+LE0ee3pr81F7HqV6bWqjyyVhK/HxE1YkU+ehVPEAzmdMY5fY55arYtK/suA +Lvg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cr21-20020a170906d55500b007813b1924ccsi989299ejc.934.2022.09.20.01.59.58; Tue, 20 Sep 2022 02:00:24 -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; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231245AbiITIoe (ORCPT + 99 others); Tue, 20 Sep 2022 04:44:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231489AbiITInt (ORCPT ); Tue, 20 Sep 2022 04:43:49 -0400 Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C48F1C4; Tue, 20 Sep 2022 01:43:47 -0700 (PDT) Received: by mail-ej1-f50.google.com with SMTP id u9so4428460ejy.5; Tue, 20 Sep 2022 01:43:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=3Q48nRjfZmM0qXUdlJ9dbqaN2v4JDiUTzZSH3VhXCD8=; b=VUSIqT+zyO7QHXm4LWcwcAGdXnxpjdlsN8ivWFYJuBeuQ+PLsFdfQDuehwJQFZZBcA GrqgG37b1e5KAs4Tne+1wY4KuOvin6F2P1vjH83rhdmGmPVd/i1okm20yTYaeG/DOkgu YSX0viEGQxJF1oXJ+apiK6GsPA+iSicO2nmYEyS3bNjTORSS/3mm44sJpKEDBz0WC28M NVxgio+LpSSjxz57v6W6bQka35VW8O0rxUXdcO1hJKJcge4UtcM6ySzmbOvfVUrNJCOp RnP9dP2Pw/MkxoqOxFWuBKEpJtOv251N+QWJ/IxtgQL0prEfQDTDgI5vTqxmO/Snq3Js giqA== X-Gm-Message-State: ACrzQf1arPpOuiQGwzpgwOIXFKLjq0Lz3TUpdeDdwH848Xk3FgGkEd5n AGVIuno1DxVDqMu9cdgtZQt0om3mXNo= X-Received: by 2002:a17:907:7e93:b0:77c:1e21:a50b with SMTP id qb19-20020a1709077e9300b0077c1e21a50bmr16584346ejc.72.1663663425735; Tue, 20 Sep 2022 01:43:45 -0700 (PDT) Received: from ?IPV6:2a0b:e7c0:0:107::70f? ([2a0b:e7c0:0:107::70f]) by smtp.gmail.com with ESMTPSA id cz23-20020a0564021cb700b0044625884285sm852438edb.49.2022.09.20.01.43.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Sep 2022 01:43:44 -0700 (PDT) Message-ID: Date: Tue, 20 Sep 2022 10:43:43 +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] kbuild: pass jobserver to cmd_ld_vmlinux.o Content-Language: en-US To: Masahiro Yamada Cc: Nick Desaulniers , Sedat Dilek , Linux Kbuild mailing list , LKML , Michal Marek , Nathan Chancellor , Sami Tolvanen References: <20220616104541.16289-1-jslaby@suse.cz> <14c9839b-c015-69c1-84f0-a99d03877005@suse.cz> From: Jiri Slaby In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, 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 21. 06. 22, 10:41, Masahiro Yamada wrote: > On Tue, Jun 21, 2022 at 4:30 PM Jiri Slaby wrote: >> >> On 17. 06. 22, 18:32, Nick Desaulniers wrote: >>> On Fri, Jun 17, 2022 at 3:35 AM Sedat Dilek wrote: >>>> >>>> On Fri, Jun 17, 2022 at 12:53 AM Sedat Dilek wrote: >>>>> >>>>> On Thu, Jun 16, 2022 at 4:09 PM Sedat Dilek wrote: >>>>>> >>>>>> On Thu, Jun 16, 2022 at 12:45 PM Jiri Slaby wrote: >>>>>>> >>>>>>> Until the link-vmlinux.sh split (cf. the commit below), the linker was >>>>>>> run with jobserver set in MAKEFLAGS. After the split, the command in >>>>>>> Makefile.vmlinux_o is not prefixed by "+" anymore, so this information >>>>>>> is lost. >>>>>>> >>>>>>> Restore it as linkers working in parallel (esp. the LTO ones) make a use >>>>>>> of it. >>> >>> TBH, I agree with Masahiro. I didn't understand this comment "esp. the >>> LTO ones." Jiri, can you clarify what you mean here? >> >> Sure. clang is not the only compiler/linker that can handle kernel ;). >> So while rebasing gcc-LTO-kernel-patches to 5.19-rc (to upstream them >> later), this broke. See: >> https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/lto-wrapper.cc;h=26e06e77be4e0afb2bc3e913062a9c51cab5d205;hb=HEAD#l1336 >> >> gcc really parses MAKEFLAGS and looks for "--jobserver-auth=" there, if >> one passes specifies -flto=jobserver. >> >> thanks, >> -- >> js >> suse labs > > > > Then, this patch should go together (or after) the GCC LTO upstreaming. Hi, OK, I will make it part of the gcc-lto series. > I still do not understand why you are patching the pre-modpost linking, though. > > In my understanding, Clang LTO and GCC LTO are implemented > in different layers. > > Clang LTO is implemented in the linker (i.e. lld). > > In contrast, GCC LTO is implemented in the compiler (i.e. gcc itself) > The linker (i.e. BFD linker or Gold from GNU binutils project) > is agnostic about LTO. Right. First, gcc compiles the sources to an intermediate language. Then gcc-ld (LTO-)links the objects into a binary object. BFD ld/gold is invoked only from within gcc to actually link the binary. > Your are patching the relocatable link ($(LD) -r), > but I could not find the code parsing jobserver-auth > in the binutils-gdb repository. With gcc-lto patchset, gcc-ld is invoked in cmd_ld_vmlinux.o. So you are right, making it part of the gcc-lto patchset makes perfect sense. First, to see the context. Second, upstream doesn't need the change. thanks, -- js suse labs