]> code.ossystems Code Review - openembedded-core.git/commitdiff
ccache: Fix build on aarch64/clang
authorKhem Raj <raj.khem@gmail.com>
Tue, 5 Jan 2021 22:06:38 +0000 (14:06 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 8 Jan 2021 10:02:32 +0000 (10:02 +0000)
asm option checks in cmake gets it wrong to just check compiler options
to decide if SSE/AVX is supported, this accidentally then succeeds on
aarch64 and ends up compiler failures on aarch64 with clang

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/ccache/ccache/0001-blake3-Remove-asm-checks-for-sse-avx.patch [new file with mode: 0644]
meta/recipes-devtools/ccache/ccache_4.1.bb

diff --git a/meta/recipes-devtools/ccache/ccache/0001-blake3-Remove-asm-checks-for-sse-avx.patch b/meta/recipes-devtools/ccache/ccache/0001-blake3-Remove-asm-checks-for-sse-avx.patch
new file mode 100644 (file)
index 0000000..bdabb38
--- /dev/null
@@ -0,0 +1,35 @@
+From 0448eddcf2863ebf911e7dd445bca1c7eee2a239 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 5 Jan 2021 13:55:34 -0800
+Subject: [PATCH] blake3: Remove asm checks for sse/avx
+
+This ends up passing on clang/linux wrongly when building for aarch64
+the check in else part is good to detect the feature support and this
+check can be removed, it was setting
+
+HAVE_ASM_AVX* and HAVE_ASM_SSE* macros which are not used in the build
+anyway
+
+Upstream-Status: Submitted [https://github.com/ccache/ccache/pull/768]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/third_party/blake3/CMakeLists.txt | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/src/third_party/blake3/CMakeLists.txt b/src/third_party/blake3/CMakeLists.txt
+index cc24253c..856b5721 100644
+--- a/src/third_party/blake3/CMakeLists.txt
++++ b/src/third_party/blake3/CMakeLists.txt
+@@ -25,8 +25,6 @@ function(add_source_if_enabled feature compile_flags intrinsic)
+       AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
+     message(STATUS "Detected unsupported compiler for ${have_feature} - disabled")
+     set(${have_feature} FALSE)
+-  elseif(${blake_source_type} STREQUAL "asm")
+-    check_asm_compiler_flag(${compile_flags} ${have_feature})
+   else()
+     set(CMAKE_REQUIRED_FLAGS ${compile_flags})
+     check_c_source_compiles(
+-- 
+2.30.0
+
index 96254a38753581a664ccf8b5f45c30690e2ead71..551b4c7e5c45505041dc51746439e212253a0cd9 100644 (file)
@@ -14,6 +14,7 @@ DEPENDS = "zstd"
 SRC_URI = "https://github.com/ccache/ccache/releases/download/v${PV}/${BP}.tar.gz \
            file://0001-Improve-SIMD-detection-735.patch \
            file://0002-Always-use-64bit-to-print-time_t.patch \
+           file://0001-blake3-Remove-asm-checks-for-sse-avx.patch \
            "
 SRC_URI[sha256sum] = "cdeefb827b3eef3b42b5454858123881a4a90abbd46cc72cf8c20b3bd039deb7"