1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Stefan Hanreich <s.hanreich@proxmox.com>
3 Date: Fri, 15 Sep 2023 16:55:02 +0200
4 Subject: [PATCH] fix compatibility with CPUs not supporting SSE 4.1
7 Building without -O1 causes gcc-12 to emit SSE 4.1 instructions which
8 are not supported on older CPU architectures. This leads to Ceph
9 crashing on older CPU architectures. -O1 causes those optimizations to
10 be implemented manually via runtime dispatch.
12 Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
14 src/erasure-code/jerasure/CMakeLists.txt | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
17 diff --git a/src/erasure-code/jerasure/CMakeLists.txt b/src/erasure-code/jerasure/CMakeLists.txt
18 index f9cd22e11..b0a355235 100644
19 --- a/src/erasure-code/jerasure/CMakeLists.txt
20 +++ b/src/erasure-code/jerasure/CMakeLists.txt
21 @@ -67,7 +67,7 @@ endif()
23 add_library(gf-complete_objs OBJECT ${gf-complete_srcs})
24 set_target_properties(gf-complete_objs PROPERTIES
25 - COMPILE_FLAGS "${SIMD_COMPILE_FLAGS}")
26 + COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -O1")
27 set_target_properties(gf-complete_objs PROPERTIES
28 COMPILE_DEFINITIONS "${GF_COMPILE_FLAGS}")