]> git.baikalelectronics.ru Git - kernel.git/commit
x86, lto: Enable Clang LTO for 32-bit as well
authorNathan Chancellor <nathan@kernel.org>
Thu, 29 Apr 2021 23:26:12 +0000 (16:26 -0700)
committerKees Cook <keescook@chromium.org>
Mon, 14 Jun 2021 16:12:41 +0000 (09:12 -0700)
commit1679da8b1d8f8cb38f8be994def0e536a57293f7
tree04777411b389677aafcd12055dd38a5cb0c5cd77
parent5c65d9508d87311fc2362c7e9a1fd7590dc2d3de
x86, lto: Enable Clang LTO for 32-bit as well

Commit d33fec438058 ("x86, build: allow LTO to be selected") enabled
support for LTO for x86_64 but 32-bit works fine as well.

I tested the following config combinations:

* i386_defconfig + CONFIG_LTO_CLANG_FULL=y

* i386_defconfig + CONFIG_LTO_CLANG_THIN=y

* ARCH=i386 allmodconfig + CONFIG_LTO_CLANG_THIN=y

with LLVM 11.1.0, 12.0.0, and 13.0.0 from git without any build
failures. The defconfigs boot in QEMU with no new warnings.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20210429232611.3966964-1-nathan@kernel.org
arch/x86/Kconfig