Skip to content

Commit 583bfd4

Browse files
nathanchancekees
authored andcommitted
x86, lto: Enable Clang LTO for 32-bit as well
Commit b33fff0 ("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 <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]> Tested-by: Nick Desaulniers <[email protected]> Signed-off-by: Kees Cook <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 590e8a0 commit 583bfd4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/x86/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ config X86
103103
select ARCH_SUPPORTS_DEBUG_PAGEALLOC
104104
select ARCH_SUPPORTS_NUMA_BALANCING if X86_64
105105
select ARCH_SUPPORTS_KMAP_LOCAL_FORCE_MAP if NR_CPUS <= 4096
106-
select ARCH_SUPPORTS_LTO_CLANG if X86_64
107-
select ARCH_SUPPORTS_LTO_CLANG_THIN if X86_64
106+
select ARCH_SUPPORTS_LTO_CLANG
107+
select ARCH_SUPPORTS_LTO_CLANG_THIN
108108
select ARCH_USE_BUILTIN_BSWAP
109109
select ARCH_USE_MEMTEST
110110
select ARCH_USE_QUEUED_RWLOCKS

0 commit comments

Comments
 (0)