lkml.org 
[lkml]   [2020]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 00/28] Add support for Clang LTO
On Fri, Sep 11, 2020 at 2:46 AM 'Nick Desaulniers' via Clang Built
Linux <clang-built-linux@googlegroups.com> wrote:
>
> Hey Ian,
> It was nice to meet you at Linux plumbers. You might want to take a
> look at this series. It implements builds of the Linux kernel with
> LTO. It would be good to get eyes on it and help review it from folks
> working on this from the GCC angle. The series has some configs that
> split where Clang specific changes need to be made; it might be of
> interest to think about what would the similar changes be needed for
> GCC. Also, congrats on your LWN article!
> https://lwn.net/Articles/830300/


FYI.

Some people may remember GCC LTO was posted in 2014
(and rejected by Linus).

https://lore.kernel.org/linux-kbuild/20140407201919.GA15838@sepie.suse.cz/


In my understanding, GCC LTO does not work for relocatable objects
because GNU linker is agnostic about LTO.

GCC LTO was implemented in the final link stage (i.e. vmlinux)
by using $(CC) as a linker driver.


On the other hand, Clang LTO, in this series implementation,
works in the pre-mospost stage (i.e. vmlinux.o).




--
Best Regards
Masahiro Yamada

\
 
 \ /
  Last update: 2020-09-10 20:13    [W:0.731 / U:1.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site