]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: build portable rocksdb 17388/head
authorKefu Chai <kchai@redhat.com>
Wed, 6 Sep 2017 02:46:13 +0000 (10:46 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 15 Sep 2017 09:16:28 +0000 (17:16 +0800)
* 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 <kchai@redhat.com>
src/CMakeLists.txt

index 0eb7ae59afe0d32cffb50f9a09a3fabc43965682..68af5c3c8e5d9cab88d8f4814bb8e4b30af6d4c5 100644 (file)
@@ -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})