linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nick Desaulniers <ndesaulniers@google.com>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: Miguel Ojeda <ojeda@kernel.org>,
	Fangrui Song <maskray@google.com>,
	Michal Marek <michal.lkml@markovi.net>,
	Arnd Bergmann <arnd@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	clang-built-linux <clang-built-linux@googlegroups.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Christoph Hellwig <hch@infradead.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH v6 3/3] Documentation/llvm: update CROSS_COMPILE inferencing
Date: Thu, 5 Aug 2021 11:29:03 -0700	[thread overview]
Message-ID: <CAKwvOd=5drNCoU-PLFb-kJTzk1tXOvwCK89hAMPXrBZv+Ey=Bw@mail.gmail.com> (raw)
In-Reply-To: <CAKwvOd=iyhky9jhw+UpYM7W5-7tqo02sxpZUASEk6XciS0wSwg@mail.gmail.com>

On Thu, Aug 5, 2021 at 11:27 AM Nick Desaulniers
<ndesaulniers@google.com> wrote:
>
> On Thu, Aug 5, 2021 at 6:58 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
> >
> > On Tue, Aug 3, 2021 at 3:39 AM 'Nick Desaulniers' via Clang Built
> > Linux <clang-built-linux@googlegroups.com> 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=<triple>``.
> > > +
> > > +Unless ``LLVM_IAS=1`` is specified, ``CROSS_COMPILE`` is also used to derive
> > > +``--prefix=<path>`` 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."

Also, I think the CC_CAN_LINK functionality also fits the bill.
https://github.com/ClangBuiltLinux/linux/issues/1290
-- 
Thanks,
~Nick Desaulniers

  reply	other threads:[~2021-08-05 18:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-02 18:39 [PATCH v6 0/3] infer --target from SRCARCH for CC=clang Nick Desaulniers
2021-08-02 18:39 ` [PATCH v6 1/3] Makefile: move initial clang flag handling into scripts/Makefile.clang Nick Desaulniers
2021-08-02 21:06   ` Fāng-ruì Sòng
2021-08-02 21:14     ` Nick Desaulniers
2021-08-05 12:55     ` Masahiro Yamada
2021-08-02 18:39 ` [PATCH v6 2/3] Makefile: infer --target from ARCH for CC=clang Nick Desaulniers
2021-08-05 13:58   ` Masahiro Yamada
2021-08-05 18:17   ` Miguel Ojeda
2021-08-02 18:39 ` [PATCH v6 3/3] Documentation/llvm: update CROSS_COMPILE inferencing Nick Desaulniers
2021-08-02 19:16   ` Nathan Chancellor
2021-08-05 13:57   ` Masahiro Yamada
2021-08-05 18:27     ` Nick Desaulniers
2021-08-05 18:29       ` Nick Desaulniers [this message]
2021-08-05 23:26         ` Masahiro Yamada
2021-08-10  0:05 ` [PATCH v6 0/3] infer --target from SRCARCH for CC=clang Masahiro Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKwvOd=5drNCoU-PLFb-kJTzk1tXOvwCK89hAMPXrBZv+Ey=Bw@mail.gmail.com' \
    --to=ndesaulniers@google.com \
    --cc=arnd@kernel.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=geert@linux-m68k.org \
    --cc=hch@infradead.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=maskray@google.com \
    --cc=michal.lkml@markovi.net \
    --cc=ojeda@kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).