From 652bc5e8328873c67c6e5f405fd6a48c53ae0a80 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 6 Sep 2017 10:46:13 +0800 Subject: [PATCH] cmake: build portable rocksdb * so rocksdb is not built with -march=native, because - this is not portable - -march=native is not supported by older version of GCC on aarch64. * and drop the sse42 specific settings for rocksdb. since rocksdb uses "target" attribute to build sse42 optimized crc32, as long as the compiler on building host is able to emit sse42 instructions. see https://github.com/facebook/rocksdb/pull/2807 Fixes: http://tracker.ceph.com/issues/20529 Signed-off-by: Kefu Chai --- src/CMakeLists.txt | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0eb7ae59afe0d..68af5c3c8e5d9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -817,13 +817,7 @@ if (NOT WITH_SYSTEM_ROCKSDB) list(APPEND ROCKSDB_CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}) endif(WITH_CCACHE AND CCACHE_FOUND) - # We really want to have the CRC32 calculation in RocksDB accelerated - # with SSE 4.2. For details refer to rocksdb/util/crc32c.cc. - if (HAVE_INTEL_SSE4_2) - list(APPEND ROCKSDB_CMAKE_ARGS -DCMAKE_CXX_FLAGS=${SIMD_COMPILE_FLAGS}) - else() - list(APPEND ROCKSDB_CMAKE_ARGS -DWITH_SSE42=OFF) - endif() + list(APPEND ROCKSDB_CMAKE_ARGS -DPORTABLE=ON) list(APPEND ROCKSDB_CMAKE_ARGS -DCMAKE_AR=${CMAKE_AR}) list(APPEND ROCKSDB_CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}) -- 2.39.5