lkml.org 
[lkml]   [2021]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v6 3/3] Documentation/llvm: update CROSS_COMPILE inferencing
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."
--
Thanks,
~Nick Desaulniers

\
 
 \ /
  Last update: 2021-08-05 20:28    [W:0.069 / U:0.848 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site