Patrick Williams | 03514f1 | 2024-04-05 07:04:11 -0500 | [diff] [blame] | 1 | From bb10f55eb77be7b7eee94cb3506c9cbef8e24099 Mon Sep 17 00:00:00 2001 |
Andrew Geissler | c5535c9 | 2023-01-27 16:10:19 -0600 | [diff] [blame] | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Thu, 26 Jan 2023 13:00:43 -0800 |
| 4 | Subject: [PATCH] cmake: Do not add -msse4.2 -mpclmul on clang |
| 5 | |
| 6 | When testcase is compiled with clang and -msse4.2 -mpclmul is added to |
| 7 | cxxflags then clang -m32 still ends up compiling the test case which is |
| 8 | not correct for i386, therefore depend on yocto to pass the right flags |
| 9 | from environemnt via cflags rather than manufecture them here |
| 10 | |
| 11 | Upstream-Status: Inappropriate [OE-Specific] |
| 12 | |
| 13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 14 | --- |
| 15 | CMakeLists.txt | 2 +- |
| 16 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 17 | |
| 18 | diff --git a/CMakeLists.txt b/CMakeLists.txt |
Patrick Williams | 03514f1 | 2024-04-05 07:04:11 -0500 | [diff] [blame] | 19 | index be80edb955..a1bbade81a 100644 |
Andrew Geissler | c5535c9 | 2023-01-27 16:10:19 -0600 | [diff] [blame] | 20 | --- a/CMakeLists.txt |
| 21 | +++ b/CMakeLists.txt |
Patrick Williams | 03514f1 | 2024-04-05 07:04:11 -0500 | [diff] [blame] | 22 | @@ -279,7 +279,7 @@ endif() |
Andrew Geissler | c5535c9 | 2023-01-27 16:10:19 -0600 | [diff] [blame] | 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 | -- |
Patrick Williams | 03514f1 | 2024-04-05 07:04:11 -0500 | [diff] [blame] | 32 | 2.25.1 |
Andrew Geissler | c5535c9 | 2023-01-27 16:10:19 -0600 | [diff] [blame] | 33 | |