Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4909412pxv; Tue, 20 Jul 2021 14:18:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoIz0T0sJz6BmtsWn1HswC1BA6HiXMpggtfeiwXT9p42Kx5q57wIYI/WmVS/GBpjUbT+sM X-Received: by 2002:a05:6402:1d86:: with SMTP id dk6mr44243261edb.136.1626815900638; Tue, 20 Jul 2021 14:18:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626815900; cv=none; d=google.com; s=arc-20160816; b=Auj7m/aZUkJDOpJsPZ7MwGvLipopRHiEesPGI/AwstrmWcm5aiFfxfVn5F2Sd4sebj PYQ4TDSGFdD5F6MRqZ9kVwppEUZlDNtVbCa6pMYGU+nvIlVh/JQvxhPkAfN5xChMmk+r bI162w5//A5aRnMbrirxFo5dQcTrTC+ssZaGxMtfNt5k9PKL+RYYtCdnr6ZrKNuiogN3 RE87osFgkRyR/y3E+2idsDqNlVuSkW/skK2BHA7zwJrEp2kl+TAuDd5aJ06f1joL79qi TmPj4jnYtYrH3kuyzLbt4IJPW2S5QOwwK+g5RIa03R3lIkQORuocGEyDr19dH/t4BUNw ZwUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=+VH/k2Wu9OUzA+EFcoMXodKgYXPRRgkgoLXFJfyCQtg=; b=YfIE1v7UM0qtsjx50F6aVdpsdMGx1ytj23QaY7WL8tfKpbWO3GJw0DcQ4aJj/Fkqpe 5WHpmqpb+8Ranfm1/985qGYhPnYhej9ip1uHbZ16xfQ6aSmvfFojQFsbMQXDbsP+4fM0 LGnM3Af6ndPdVvTngT73Xrie9idjVDruglaSzncGjSmfAOTxXTCRTzCOafwfPL8F523y 1Ts2e09evSxy3I6kxWoFI11pNzIiVIpUyWhYT9FUvE0/o0T7ynib7HSiRGmN+ahIlWTu xyJt/7jcwhXXBrnOWcooPksXC0QW/9C4t3+y1bfnEAsBbS5bIvXgdZ+MKnLkPiaKPTQ5 nMSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=XQbW4ZTf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dd27si25143705ejb.615.2021.07.20.14.17.56; Tue, 20 Jul 2021 14:18:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=XQbW4ZTf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236289AbhGTUcV (ORCPT + 99 others); Tue, 20 Jul 2021 16:32:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236183AbhGTUbC (ORCPT ); Tue, 20 Jul 2021 16:31:02 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD750C061768 for ; Tue, 20 Jul 2021 14:11:35 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id l11so213984ljq.4 for ; Tue, 20 Jul 2021 14:11:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+VH/k2Wu9OUzA+EFcoMXodKgYXPRRgkgoLXFJfyCQtg=; b=XQbW4ZTf4eyK0pcFhApesUyXYPwBkXuG/ohBnhGpoxLsk3GjHVQ542pybZ34Ltq4Jq F5ScMrJEhILuheA7is0ByrzWo1rymV+PX3RDQcCzZJsJKMfJwYBxmwShbtUcgFL97//n zRd6nn2NgIhGJDwTtPzrFjb7Ap7QRfIxiTd5Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+VH/k2Wu9OUzA+EFcoMXodKgYXPRRgkgoLXFJfyCQtg=; b=F2VgQ9T/FKxhumAjI65Q4KMoeegf92dPVLgRmMKgqKbQwI1UAYTv0EFWKCHgjihy+4 I4s8WUnwzgjjR1putYOtbLeCIIQlAXF2BQBieLCy2T/2pYx4i3QQrrBg9SfP7Wq74K3r /RNGRGMRFPuNYwiq6UAJ0ITGRvkUP2vS0mU6tyYtRaIf0glAic0eE0LpHPxKWP2r0ltA /fTVIGK4KFmacw+CfDXqJY3Z4K/e3HJaFocx18LCV4xPFaCNblS0fBX8pNIROSm81Qpc Io0ZWC4JQ3gMsIapnRhoAf9w2zRzMyw4GBbBj4b6sdVOfthJiFarq/TE5FfKZ2VwD1Jo 5t3A== X-Gm-Message-State: AOAM533XfoToYfFJVkm6942O0CVgeOyQZcu8ljGN8QtmuoyNufR/Npej Mm/naFwtTPfgzhR0jTElThiUXZ95+zwuIXJI X-Received: by 2002:a2e:91da:: with SMTP id u26mr18450926ljg.358.1626815494051; Tue, 20 Jul 2021 14:11:34 -0700 (PDT) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com. [209.85.167.41]) by smtp.gmail.com with ESMTPSA id q21sm954810lfr.277.2021.07.20.14.11.32 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Jul 2021 14:11:32 -0700 (PDT) Received: by mail-lf1-f41.google.com with SMTP id s13so16341213lfi.12 for ; Tue, 20 Jul 2021 14:11:32 -0700 (PDT) X-Received: by 2002:a05:6512:3f82:: with SMTP id x2mr21979284lfa.421.1626815492489; Tue, 20 Jul 2021 14:11:32 -0700 (PDT) MIME-Version: 1.0 References: <20210708232522.3118208-1-ndesaulniers@google.com> <20210708232522.3118208-3-ndesaulniers@google.com> In-Reply-To: From: Linus Torvalds Date: Tue, 20 Jul 2021 14:11:16 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 2/2] Makefile: infer CROSS_COMPILE from SRCARCH for LLVM=1 LLVM_IAS=1 To: Nick Desaulniers Cc: Masahiro Yamada , Miguel Ojeda , Fangrui Song , Michal Marek , Arnd Bergmann , Linux Kernel Mailing List , Linux Kbuild mailing list , clang-built-linux , Geert Uytterhoeven , Christoph Hellwig , Nathan Chancellor Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 20, 2021 at 1:52 PM Nick Desaulniers wrote: > > > -CC = $(CROSS_COMPILE)gcc > > +CC = $(CROSS_COMPILE)clang > > So you haven't been using LLD... :( (imagine using more than one > thread to link, and being faster than ld.gold) I started out just building my own clang - nothing else. And now that I'm using the distro clang, the linker isn't even _close_ to a performance issue. Since clang is a big, slow, bloated pig. I posted profiles and performance numbers of clang being three times slower than gcc, and it was all just clang itself, not the linker. All due to insanely expensive startup costs. I suspect a lot of clang users build bloated C++ code where the time to compile a single object file is so big that the startup costs don't even show up. But for the (fairly) lean C kernel header files that don't bring in millions of lines of headers for some template library, startup costs are a big deal. So honestly, I don't care at all about "imagine being faster than ld.gold". I can only _dream_ of clang itself not being 3x slower than gcc. Linus