Do not forcibly disable RTTI

This commit is contained in:
Davide Cavalca 2021-07-08 15:11:41 -07:00
parent 15139620f3
commit c690ae7ffb
2 changed files with 21 additions and 1 deletions

View File

@ -0,0 +1,14 @@
diff -Naur a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt 2021-05-04 15:53:34.000000000 -0700
+++ b/CMakeLists.txt 2021-07-08 15:07:15.382419910 -0700
@@ -76,10 +76,6 @@
# Disable C++ exceptions.
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

View File

@ -1,7 +1,7 @@
%global __cmake_in_source_build 1
Name: snappy
Version: 1.1.9
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Fast compression and decompression library
License: BSD
@ -14,6 +14,9 @@ Patch0: %{name}-thirdparty.patch
# Prevent compiler error due to missing 'inline'.
Patch1: %{name}-inline.patch
# Do not forcibly disable RTTI
Patch2: %{name}-do-not-disable-rtti.patch
BuildRequires: make
BuildRequires: cmake
BuildRequires: gcc-c++
@ -92,6 +95,9 @@ ctest -V %{?_smp_mflags}
%changelog
* Thu Jul 08 2021 Davide Cavalca <dcavalca@fedoraproject.org> - 1.1.9-2
- Do not forcibly disable RTTI
* Sat May 15 2021 Martin Gieseking <martin.gieseking@uos.de> - 1.1.9-1
- Updated to new release.