From: Andi Kleen <a...@linux.intel.com>

LTO is opt-in per architecture because it usually needs some
fixes.

LTO needs THIN_ARCHIVES because standard binutils doesn't like mixing
assembler and LTO code with ld -r.

Enable LTO and THIN_ARCHIVES for x86

Signed-off-by: Andi Kleen <a...@linux.intel.com>
---
 arch/x86/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 8eed3f94bfc7..92650726f908 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -122,6 +122,8 @@ config X86
        select HAVE_ARCH_VMAP_STACK             if X86_64
        select HAVE_ARCH_WITHIN_STACK_FRAMES
        select HAVE_CC_STACKPROTECTOR
+       select THIN_ARCHIVES                    if LTO
+       select ARCH_SUPPORTS_LTO
        select HAVE_CMPXCHG_DOUBLE
        select HAVE_CMPXCHG_LOCAL
        select HAVE_CONTEXT_TRACKING            if X86_64
-- 
2.13.6

Reply via email to