[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK7LNAQSYHseN5n-WYKtBYHJCUJUquSbkq34WnuUO9q1geEDYQ@mail.gmail.com>
Date: Mon, 29 Aug 2022 17:30:32 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Jiri Slaby <jirislaby@...nel.org>
Cc: Nick Desaulniers <ndesaulniers@...gle.com>,
Lukas Bulwahn <lukas.bulwahn@...il.com>,
Andi Kleen <ak@...ux.intel.com>,
"H . Peter Anvin" <hpa@...ux.intel.com>,
Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
Michal Marek <michal.lkml@...kovi.net>,
kernel-janitors@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Martin Liska <martin.liska@...e.com>
Subject: Re: [PATCH] scripts: remove obsolete gcc-ld script
On Mon, Aug 29, 2022 at 4:08 PM Jiri Slaby <jirislaby@...nel.org> wrote:
>
> On 25. 08. 22, 19:19, Nick Desaulniers wrote:
> > + Jiri in case this needs to be carried downstream.
>
> Thanks.
>
> > On Thu, Aug 25, 2022 at 2:15 AM Lukas Bulwahn <lukas.bulwahn@...il.com> wrote:
> >>
> >> Since commit 8564ed2b3888 ("Kbuild, lto: Add a gcc-ld script to let run gcc
> >> as ld") in 2014, there was not specific work on this the gcc-ld script
> >> other than treewide clean-ups.
> >>
> >> There are no users within the kernel tree, and probably no out-of-tree
> >> users either, and there is no dedicated maintainer in MAINTAINERS.
>
> There are out-of-tree users.
>
> >> Delete this obsolete gcc-ld script.
> >>
> >> Signed-off-by: Lukas Bulwahn <lukas.bulwahn@...il.com>
> >
> > No callers in-tree; happy to bring it back though should there later
> > be. Thanks for the patch.
>
> I agree to have this downstream-only for the time being. We have updates
> for it queued, so we'd only start tracking the full content now...
>
> BTW the script is not nice at all. How do the clang people cope with the
> issue? (Running gcc-ld instead of ld with proper arguments when linking
> using (full) LTO. For example "-z now" -> "-Wl,-z,now".)
This comes from the difference in which layer LTO is implemented.
GCC LTO is a feature of the GCC compiler.
GNU binutils is agnostic about LTO.
So, you need to use $(CC) as the linker driver.
scripts/gcc-ld adds the '-Wl,' prefix to linker options.
Clang LTO works in cooperation with the LLD linker.
So, the direct use of $(LD) works.
scripts/gcc-ld is unneeded.
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists