Accepting request 898809 from home:susnux:branches:devel:libraries:c_c++

- Add enable-rtti.patch, enable rtti support again to fix build issue of ceph

OBS-URL: https://build.opensuse.org/request/show/898809
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/leveldb?expand=0&rev=29
This commit is contained in:
David Disseldorp 2021-06-10 12:33:25 +00:00 committed by Git OBS Bridge
parent e5a050e75d
commit 31f53c2f54
3 changed files with 27 additions and 2 deletions

17
enable-rtti.patch Normal file
View File

@ -0,0 +1,17 @@
diff -Nur leveldb-1.23/CMakeLists.txt new/CMakeLists.txt
--- leveldb-1.23/CMakeLists.txt 2021-02-23 21:54:37.000000000 +0100
+++ new/CMakeLists.txt 2021-06-09 14:06:15.129760255 +0200
@@ -71,9 +71,10 @@
string(REGEX REPLACE "-fexceptions" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions")
+
+ # We need RTTI support if code that uses leveldb uses typeid (e.g. ceph).
- # Disable RTTI.
- string(REGEX REPLACE "-frtti" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-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")
# Test whether -Wthread-safety is available. See

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Jun 9 12:08:18 UTC 2021 - Ferdinand Thiessen <rpm@fthiessen.de>
- Add enable-rtti.patch, enable rtti support again to fix build
issue of ceph
-------------------------------------------------------------------
Mon May 3 09:46:47 UTC 2021 - Ferdinand Thiessen <rpm@fthiessen.de>

View File

@ -23,9 +23,11 @@ Summary: A key/value-store
License: BSD-3-Clause
Group: Development/Libraries/C and C++
URL: https://github.com/google/leveldb
Source0: %{URL}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
# PATCH-FEATURE-OPENSUSE detect-system-gtest.patch -- Use googletest from system if provided
Source0: %{url}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
# PATCH-FEATURE-OPENSUSE detect-system-gtest.patch -- https://github.com/google/leveldb/pull/912
Patch0: detect-system-gtest.patch
# PATCH-FIX-OPENSUSE enable-rtti.patch -- Enable rtti support again, needed for ceph
Patch1: enable-rtti.patch
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: snappy-devel