Re-enable RTTI, to fix Ceph runtime failures (for details see https://tracker.ceph.com/issues/53060 and https://github.com/google/snappy/pull/144). Note that we're already carrying a similar patch for leveldb, for the same reason. If accepted, please pass this on to Factory. Thank you! OBS-URL: https://build.opensuse.org/request/show/927746 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/snappy?expand=0&rev=19
26 lines
1.1 KiB
Diff
26 lines
1.1 KiB
Diff
Index: snappy-1.1.9/CMakeLists.txt
|
|
===================================================================
|
|
--- snappy-1.1.9.orig/CMakeLists.txt
|
|
+++ snappy-1.1.9/CMakeLists.txt
|
|
@@ -51,10 +51,6 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC"
|
|
string(REGEX REPLACE "/EH[a-z]+" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHs-c-")
|
|
add_definitions(-D_HAS_EXCEPTIONS=0)
|
|
-
|
|
- # Disable RTTI.
|
|
- string(REGEX REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
|
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR-")
|
|
else(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
|
# Use -Wall for clang and gcc.
|
|
if(NOT CMAKE_CXX_FLAGS MATCHES "-Wall")
|
|
@@ -77,9 +73,6 @@ else(CMAKE_CXX_COMPILER_ID STREQUAL "MSV
|
|
string(REGEX REPLACE "-fexceptions" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions")
|
|
|
|
- # Disable RTTI.
|
|
- string(REGEX REPLACE "-frtti" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
|
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
|
|
endif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
|
|
|
# BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to make
|