Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 9 Dec 2020 10:19:44 +0100
From: Arnd Bergmann <>
To: Fangrui Song <>
Cc: Sami Tolvanen <>, Masahiro Yamada <>, 
	Steven Rostedt <>, Will Deacon <>, 
	Josh Poimboeuf <>, Peter Zijlstra <>, 
	Greg Kroah-Hartman <>, "Paul E. McKenney" <>, 
	Kees Cook <>, Nick Desaulniers <>, 
	clang-built-linux <>, 
	Kernel Hardening <>, 
	linux-arch <>, 
	Linux ARM <>, 
	Linux Kbuild mailing list <>, 
	"" <>, linux-pci <>
Subject: Re: [PATCH v8 00/16] Add support for Clang LTO

On Wed, Dec 9, 2020 at 5:56 AM 'Fangrui Song' via Clang Built Linux
<> wrote:
> On 2020-12-08, 'Sami Tolvanen' via Clang Built Linux wrote:
> >On Tue, Dec 8, 2020 at 4:15 AM Arnd Bergmann <> wrote:
> >> So far I have
> >> not managed to get a working build out of it, the main problem so far being
> >> that it is really slow to build because the link stage only uses one CPU.
> >> These are the other issues I've seen so far:
> ld.lld ThinLTO uses the number of (physical cores enabled by affinity) by default.

Ah, I see.  Do you know if it's also possible to do something like
to integrate better with the kernel build system?

I tend to run multiple builds under a top-level makefile with 'make
-j30' in order
to use 30 of the 32 threads and leave the scheduling to jobserver instead of
the kernel. If the linker itself is multithreaded but the jobserver
thinks it is a
single thread, could end up with 30 concurrent linkers each trying to use
16 cores.

> >> - CONFIG_CPU_BIG_ENDIAN doesn't seem to work with lld, and LTO
> >>   doesn't work with ld.bfd.
> >>   I've added a CPU_LITTLE_ENDIAN dependency to
> >
> >Ah, good point. I'll fix this in v9.
> Full/Thin LTO should work with GNU ld and gold with built from
> llvm-project ( ). You'll need to make sure
> that is newer than clang. (Newer clang may introduce bitcode
> attributes which are unrecognizable by older

The current patch series requires LLD:

       def_bool y
       depends on CC_IS_CLANG && CLANG_VERSION >= 110000 && LD_IS_LLD

Is this something we should change then, or try to keep it simple with the
current approach, leaving LTO disabled for big-endian builds and hosts without
a working lld?


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.