summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-dbs/rocksdb/files/0003-cmake-Do-not-add-msse4.2-mpclmul-on-clang.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-dbs/rocksdb/files/0003-cmake-Do-not-add-msse4.2-mpclmul-on-clang.patch')
-rw-r--r--meta-oe/recipes-dbs/rocksdb/files/0003-cmake-Do-not-add-msse4.2-mpclmul-on-clang.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/meta-oe/recipes-dbs/rocksdb/files/0003-cmake-Do-not-add-msse4.2-mpclmul-on-clang.patch b/meta-oe/recipes-dbs/rocksdb/files/0003-cmake-Do-not-add-msse4.2-mpclmul-on-clang.patch
new file mode 100644
index 0000000000..e2f785d7cf
--- /dev/null
+++ b/meta-oe/recipes-dbs/rocksdb/files/0003-cmake-Do-not-add-msse4.2-mpclmul-on-clang.patch
@@ -0,0 +1,33 @@
1From bb10f55eb77be7b7eee94cb3506c9cbef8e24099 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 26 Jan 2023 13:00:43 -0800
4Subject: [PATCH] cmake: Do not add -msse4.2 -mpclmul on clang
5
6When testcase is compiled with clang and -msse4.2 -mpclmul is added to
7cxxflags then clang -m32 still ends up compiling the test case which is
8not correct for i386, therefore depend on yocto to pass the right flags
9from environemnt via cflags rather than manufecture them here
10
11Upstream-Status: Inappropriate [OE-Specific]
12
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 CMakeLists.txt | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/CMakeLists.txt b/CMakeLists.txt
19index be80edb955..a1bbade81a 100644
20--- a/CMakeLists.txt
21+++ b/CMakeLists.txt
22@@ -279,7 +279,7 @@ endif()
23
24 include(CheckCXXSourceCompiles)
25 set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
26-if(NOT MSVC)
27+if(NOT MSVC AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
28 set(CMAKE_REQUIRED_FLAGS "-msse4.2 -mpclmul")
29 endif()
30
31--
322.25.1
33