From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-23.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B33A4C4320A for ; Thu, 5 Aug 2021 18:28:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9EA5D61158 for ; Thu, 5 Aug 2021 18:28:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241250AbhHES2X (ORCPT ); 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-Google-Smtp-Source: ABdhPJwPUKJ+mKOt5M72tKPqVOZ41c3qyJLEjsbx545iw2vHagDvmoOdnzkDZJBg2UjuLlGiwUkzoEwRuK29R1qgjtI= 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