1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
Description: Use system libsnappy for retracers
The tracers run LD_PRELOADed into arbitrary, often closed-source binaries,
so statically-link libsnappy to minimise the possibility of symbol conflicts,
but the retracers don't have that constraint and are used to process untrusted
data.
Forwarded: not-needed
Author: Christopher James Halse Rogers <raof@ubuntu.com>
--- a/lib/trace/CMakeLists.txt
+++ b/lib/trace/CMakeLists.txt
@@ -31,7 +31,7 @@ target_link_libraries (common
guids
highlight
os
- Snappy::snappy
+ ${SNAPPY_STATIC_LIBRARIES}
ZLIB::ZLIB
PkgConfig::BROTLIDEC
)
--- a/thirdparty/CMakeLists.txt
+++ b/thirdparty/CMakeLists.txt
@@ -36,8 +36,10 @@ if (SUBMODULES_MISSING)
endif ()
if (ENABLE_STATIC_SNAPPY OR NOT Snappy_FOUND)
- message (STATUS "Using bundled Snappy")
- include_with_scope (snappy.cmake)
+ message (STATUS "Using static SNAPPY")
+ find_package(Snappy REQUIRED)
+ # Our libsnappy package builds a PIC libsnappy-shared.a archive.
+ find_library(SNAPPY_STATIC_LIBRARIES libsnappy-shared.a)
endif ()
if (NOT ZLIB_FOUND)
|