archivers/snappy: Enable RTTI info

devel/folly is (silently) built with unresolved symbols because snappy disables RTTI info.
This later causes www/proxygen build failure.

PR:		256625
Approved by:	vanilla (maintainer)
This commit is contained in:
Yuri Victorovich 2021-06-15 19:36:53 -07:00
parent 3d5114cb4f
commit 57c6667792
2 changed files with 17 additions and 3 deletions

View File

@ -2,6 +2,7 @@
PORTNAME= snappy
PORTVERSION= 1.1.9
PORTREVISION= 1
CATEGORIES= archivers
MAINTAINER= vanilla@FreeBSD.org

View File

@ -1,6 +1,19 @@
--- CMakeLists.txt.orig 2021-05-04 22:53:34 UTC
+++ CMakeLists.txt
@@ -213,8 +213,7 @@ configure_file(
@@ -78,8 +78,10 @@ else(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
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")
+ if (NOT CMAKE_SYSTEM_NAME MATCHES "FreeBSD") # devel/folly requires RTTI info, see https://github.com/facebook/folly/issues/1606
+ string(REGEX REPLACE "-frtti" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
+ endif()
endif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
# BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to make
@@ -213,8 +215,7 @@ configure_file(
"snappy-stubs-public.h.in"
"${PROJECT_BINARY_DIR}/snappy-stubs-public.h")
@ -10,7 +23,7 @@
PRIVATE
"snappy-internal.h"
"snappy-stubs-internal.h"
@@ -235,20 +234,35 @@ target_sources(snappy
@@ -235,20 +236,35 @@ target_sources(snappy
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/snappy-stubs-public.h>
$<INSTALL_INTERFACE:include/snappy-stubs-public.h>
)
@ -50,7 +63,7 @@
if(SNAPPY_BUILD_TESTS OR SNAPPY_BUILD_BENCHMARKS)
add_library(snappy_test_support "")
target_sources(snappy_test_support
@@ -359,7 +373,7 @@ endif(SNAPPY_FUZZING_BUILD)
@@ -359,7 +375,7 @@ endif(SNAPPY_FUZZING_BUILD)
include(GNUInstallDirs)
if(SNAPPY_INSTALL)