From c690ae7ffb2f07bd2f14600fe52498936f3dc1b5 Mon Sep 17 00:00:00 2001 From: Davide Cavalca Date: Thu, 8 Jul 2021 15:11:41 -0700 Subject: [PATCH] Do not forcibly disable RTTI --- snappy-do-not-disable-rtti.patch | 14 ++++++++++++++ snappy.spec | 8 +++++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 snappy-do-not-disable-rtti.patch diff --git a/snappy-do-not-disable-rtti.patch b/snappy-do-not-disable-rtti.patch new file mode 100644 index 0000000..b8d1c1f --- /dev/null +++ b/snappy-do-not-disable-rtti.patch @@ -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 diff --git a/snappy.spec b/snappy.spec index 15ee494..860e760 100644 --- a/snappy.spec +++ b/snappy.spec @@ -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 - 1.1.9-2 +- Do not forcibly disable RTTI + * Sat May 15 2021 Martin Gieseking - 1.1.9-1 - Updated to new release.