summarylogtreecommitdiffstats
path: root/0002-kbuild-Rollback-required-CLANG-version-to-10-for-LTO.patch
diff options
context:
space:
mode:
Diffstat (limited to '0002-kbuild-Rollback-required-CLANG-version-to-10-for-LTO.patch')
-rw-r--r--0002-kbuild-Rollback-required-CLANG-version-to-10-for-LTO.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/0002-kbuild-Rollback-required-CLANG-version-to-10-for-LTO.patch b/0002-kbuild-Rollback-required-CLANG-version-to-10-for-LTO.patch
new file mode 100644
index 000000000000..ac45406c710c
--- /dev/null
+++ b/0002-kbuild-Rollback-required-CLANG-version-to-10-for-LTO.patch
@@ -0,0 +1,42 @@
+From 846915b6d07f53349de1e097b7143856619f34e0 Mon Sep 17 00:00:00 2001
+From: Luca Stefani <luca.stefani.ge1@gmail.com>
+Date: Tue, 4 Aug 2020 18:01:47 +0200
+Subject: [PATCH 2/2] kbuild: Rollback required CLANG version to 10 for LTO
+
+* ARM64 still requires CLANG 11 to fix https://github.com/ClangBuiltLinux/linux/issues/510
+
+Signed-off-by: Luca Stefani <luca.stefani.ge1@gmail.com>
+---
+ arch/Kconfig | 2 +-
+ arch/arm64/Kconfig | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/arch/Kconfig b/arch/Kconfig
+index 694bfdc2073f..54f6a55180ca 100644
+--- a/arch/Kconfig
++++ b/arch/Kconfig
+@@ -595,7 +595,7 @@ config LTO_NONE
+ config LTO_CLANG
+ bool "Clang's Link Time Optimization (EXPERIMENTAL)"
+ # https://github.com/ClangBuiltLinux/linux/issues/510
+- depends on CC_IS_CLANG && CLANG_VERSION >= 110000 && LD_IS_LLD
++ depends on CC_IS_CLANG && CLANG_VERSION >= 100000 && LD_IS_LLD
+ depends on $(success,$(NM) --help | head -n 1 | grep -qi llvm)
+ depends on $(success,$(AR) --help | head -n 1 | grep -qi llvm)
+ depends on ARCH_SUPPORTS_LTO_CLANG
+diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
+index c9fb665b62b5..1883f42e341c 100644
+--- a/arch/arm64/Kconfig
++++ b/arch/arm64/Kconfig
+@@ -73,7 +73,7 @@ config ARM64
+ select ARCH_SUPPORTS_MEMORY_FAILURE
+ select ARCH_SUPPORTS_SHADOW_CALL_STACK if CC_HAVE_SHADOW_CALL_STACK
+ select ARCH_SUPPORTS_LTO_CLANG
+- select ARCH_SUPPORTS_THINLTO
++ select ARCH_SUPPORTS_THINLTO if CLANG_VERSION >= 110000
+ select ARCH_SUPPORTS_ATOMIC_RMW
+ select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 && (GCC_VERSION >= 50000 || CC_IS_CLANG)
+ select ARCH_SUPPORTS_NUMA_BALANCING
+--
+2.28.0
+