Thread (50 messages) 50 messages, 10 authors, 2020-12-02

Re: [PATCH v7 02/17] kbuild: add support for Clang LTO

From: Kees Cook <hidden>
Date: 2020-11-20 20:43:19
Also in: linux-arch, linux-kbuild, linux-pci, lkml

On Fri, Nov 20, 2020 at 01:29:35PM -0700, Nathan Chancellor wrote:
On Fri, Nov 20, 2020 at 11:47:21AM -0800, Kees Cook wrote:
quoted
On Fri, Nov 20, 2020 at 08:23:11AM -0800, Sami Tolvanen wrote:
quoted
Changing the ThinLTO config to a choice and moving it after the main
LTO config sounds like a good idea to me. I'll see if I can change
this in v8. Thanks!
Originally, I thought this might be a bit ugly once GCC LTO is added,
but this could be just a choice like we're done for the stack
initialization. Something like an "LTO" choice of NONE, CLANG_FULL,
CLANG_THIN, and in the future GCC, etc.
Having two separate choices might be a little bit cleaner though? One
for the compiler (LTO_CLANG versus LTO_GCC) and one for the type
(THINLTO versus FULLLTO). The type one could just have a "depends on
CC_IS_CLANG" to ensure it only showed up when needed.
Right, that's how the stack init choice works. Kconfigs that aren't
supported by the compiler won't be shown. I.e. after Sami's future
patch, the only choice for GCC will be CONFIG_LTO_NONE. But building
under Clang, it would offer CONFIG_LTO_NONE, CONFIG_LTO_CLANG_FULL,
CONFIG_LTO_CLANG_THIN, or something.

(and I assume  CONFIG_LTO would be def_bool y, depends on !LTO_NONE)

-- 
Kees Cook

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help