Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp852276pxt; Thu, 5 Aug 2021 13:21:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTyBEr2b5X9bRDw+S5UsjZ+a137weKtZJ3HkXzeAZJvssOogx3DqDfzSsGkoCj7Utz6z3m X-Received: by 2002:a92:7d08:: with SMTP id y8mr1093631ilc.111.1628194917524; Thu, 05 Aug 2021 13:21:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628194917; cv=none; d=google.com; s=arc-20160816; b=q1wuUnNvYogsWnIufojjGBJLJjtfEpDn5cPJ2CP83fcLA1e9IgXHLVmT5Fe1gjZzXL CWtxcnsh86dVSrIZZ/m9+ucw5ldUirzAAUqTDN0UCybCVTTyXo1Y94eXCnJ/vdMkL/lX 9b6EzoAdwLxN8LtzCKexCsx8FA6FNGKWpTDjYGwg+/K8psKYHwznB/rTpROZGDGri6RO zjT8iuO+8j+f8wivlOcLXX2aj2+uVwP/kJagEbHVhhFqHkL5gKRk6oHpz/D0G45Pd7np D9njwx12AC16fhZp820heUK3lpPHWsmXAZfOnvGA7UUF4Ygasv9+gM4406HBz+SYRTlc hOEw== 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=9f5+UcRxykKWQrhwnvqPA86sI58gT75eqY66GROKyNA=; b=Uk60gBQLH9jnmD68qL3wYzeM7lq3MBHdL0r6ivOkFojJXwSE3t2adRwlVDMY3nci8+ EpE5cB1adUuxdgT2WG7UK06I1AY6ijAARuk4G0pDInQ4KCfOdrMIGrkuJQxrNtgyQpo9 Jha95+Vy4dBYgfF+QrnVdDlaHl9h+1NTLPBgHRoC0hAx3z6ArMS617As1txyg0jJdnK8 IRWZm/Yyg+jn30iNdcx00FCDnN0qX9XkKlxgAsczeSDg5nRaLNGQvW4TCsixEDYJExrv RDXxltIyV6a6N+bLiLXxg5j2ey331PYkMq+zib9hD2vXFiSSxWxvWxJ9q5uiFHjth1+h 0J9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=uQ1LNJMz; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d20si6484264ioo.61.2021.08.05.13.21.40; Thu, 05 Aug 2021 13:21:57 -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=@google.com header.s=20161025 header.b=uQ1LNJMz; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241178AbhHES2X (ORCPT + 99 others); Thu, 5 Aug 2021 14:28:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241248AbhHES2U (ORCPT ); Thu, 5 Aug 2021 14:28:20 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59B18C06179C for ; Thu, 5 Aug 2021 11:28:05 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id y34so12868029lfa.8 for ; Thu, 05 Aug 2021 11:28:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9f5+UcRxykKWQrhwnvqPA86sI58gT75eqY66GROKyNA=; b=uQ1LNJMzxkDObcH33vpmUAk1N2Oa1TnGr9KB8KJnrq4Xe/+Iy+UrARUTzIQ+8UBbbg jRqswcQYLPYFi7sRv/VLjuikh2aDuqjqkVGYRk1iOp9PlNaclkfw4KFJhBskj0oYSpcn GYC4SGsSjxyMvpzU9SL0TRJR0gEXWKdxUgJ0aI0Np15wtEAsRYc67SVoGsJKf9fkUeZq 1sB4CULzzxuTJoRQtrsf0tGM/+Ie+o27/RWpDGv0yTZvwMA0BxKNTZTlNMZ4aV79noik PZsjScI95YtJnNmRYTTz69PCOynt8A2mflS2qGBlhB43YeGg43BsnenftziutIfzqxuH eaOQ== 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=9f5+UcRxykKWQrhwnvqPA86sI58gT75eqY66GROKyNA=; b=rCmfanlqCEXSbQUr9T8/VPMsKFY0kLy9rlx8FYQ2GryALxeUSSErf7UEBZQajcB0aT 4du3Uf551qPVPFLUQFsOIKTxLqQMxmKjUhnHe382DpHEoOsqQvDMB7rXnubKZn7Vmcbx IwW/RjF2P3KYj+eRjCqvSVIOfY2pzHcnh8zLZhECeQ2wf2uheB9fgS/EuirW/SiPVZ4s Li01Gknkm7zY8yLWh18YhVaBfoOAugR05gMYVWqOTnM/Fr05KnSohay4O206/Sf3A6Yr 80RfOACiZk2RiDjiy5+r4ubj43GXK7H3Jb142oHLRJ1QxvhqRSIMTtq6CilfSQmtaSjZ DbCQ== X-Gm-Message-State: AOAM531mIWGLFW280a7UhDgWxFJsvv6KwbSJ2K/+zBWnqL45P7+k/4yC 7gZH/qffCk3ilECOe7TrgHRjvSksUUALxL0+5ACBAg== X-Received: by 2002:a05:6512:39ca:: with SMTP id k10mr4737821lfu.547.1628188083378; Thu, 05 Aug 2021 11:28:03 -0700 (PDT) MIME-Version: 1.0 References: <20210802183910.1802120-1-ndesaulniers@google.com> <20210802183910.1802120-4-ndesaulniers@google.com> In-Reply-To: From: Nick Desaulniers Date: Thu, 5 Aug 2021 11:27:52 -0700 Message-ID: Subject: Re: [PATCH v6 3/3] Documentation/llvm: update CROSS_COMPILE inferencing To: Masahiro Yamada Cc: Miguel Ojeda , Fangrui Song , Michal Marek , Arnd Bergmann , Linux Kernel Mailing List , Linux Kbuild mailing list , clang-built-linux , Geert Uytterhoeven , Christoph Hellwig , Linus Torvalds Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 5, 2021 at 6:58 AM Masahiro Yamada wrote: > > On Tue, Aug 3, 2021 at 3:39 AM 'Nick Desaulniers' via Clang Built > Linux wrote: > > diff --git a/Documentation/kbuild/llvm.rst b/Documentation/kbuild/llvm.rst > > index b18401d2ba82..f8a360958f4c 100644 > > --- a/Documentation/kbuild/llvm.rst > > +++ b/Documentation/kbuild/llvm.rst > > @@ -63,6 +63,23 @@ They can be enabled individually. The full list of the parameters: :: > > Currently, the integrated assembler is disabled by default. You can pass > > ``LLVM_IAS=1`` to enable it. > > > > +Omitting CROSS_COMPILE > > +---------------------- > > + > > +As explained above, ``CROSS_COMPILE`` is used to set ``--target=``. > > + > > +Unless ``LLVM_IAS=1`` is specified, ``CROSS_COMPILE`` is also used to derive > > +``--prefix=`` to search for the GNU assembler and linker. > > > Is there any place where we rely on --prefix > to search for the linker? > > In general, the compiler stops after generating an object > since it is passed with the -c option. > The linking stage is separated. > > In the old days, VDSO was an exceptional case > where $(CC) was used as the linker driver, but > commit fe00e50b2db8c60e4ec90befad1f5bab8ca2c800 fixed it. See my previous reply to Fangrui. https://lore.kernel.org/lkml/CAKwvOdnK=SUm1_--tcLRO3LVeXd_2Srfv2tsZCUW0uXXa1W_pg@mail.gmail.com/ To be more specific, I believe this is still a problem for ppc vdso. https://github.com/ClangBuiltLinux/linux/issues/774 I had sent patches for that, but binutils 2.26 would crash (IIUC, newer GNU binutils are ok). See this thread: https://lore.kernel.org/lkml/b2066ccd-2b81-6032-08e3-41105b400f75@csgroup.eu/ So "we'd prefer the linker was used as the driver, but there's at least one place I know of in the tree where that's not currently the case." -- Thanks, ~Nick Desaulniers