From c35d083dc525e223b085ec00e6863ea6eafb003c Mon Sep 17 00:00:00 2001 From: davidovski Date: Sun, 17 Apr 2022 22:07:52 +0100 Subject: updated musl --- extra/snappy/cmakelists.patch | 96 +++++++++++++++++++++++++++++++++++++++++++ extra/snappy/fix-inline.patch | 13 ++++++ extra/snappy/rtti.patch | 1 + 3 files changed, 110 insertions(+) create mode 100644 extra/snappy/cmakelists.patch create mode 100644 extra/snappy/fix-inline.patch create mode 100644 extra/snappy/rtti.patch (limited to 'extra/snappy') diff --git a/extra/snappy/cmakelists.patch b/extra/snappy/cmakelists.patch new file mode 100644 index 0000000..9c16853 --- /dev/null +++ b/extra/snappy/cmakelists.patch @@ -0,0 +1,96 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -86,6 +86,8 @@ + # it prominent in the GUI. + option(BUILD_SHARED_LIBS "Build shared libraries(DLLs)." OFF) + ++option(BUILD_STATIC_LIBS "Build static libraries." ON) ++ + option(SNAPPY_BUILD_TESTS "Build Snappy's own tests." ON) + + option(SNAPPY_BUILD_BENCHMARKS "Build Snappy's benchmarks" ON) +@@ -98,6 +100,10 @@ + + option(SNAPPY_INSTALL "Install Snappy's header and library" ON) + ++if(NOT BUILD_SHARED_LIBS AND BUILD_STATIC_LIBS) ++ set(BUILD_STATIC_LIBS OFF) ++endif () ++ + include(TestBigEndian) + test_big_endian(SNAPPY_IS_BIG_ENDIAN) + +@@ -213,19 +219,28 @@ + "snappy-stubs-public.h.in" + "${PROJECT_BINARY_DIR}/snappy-stubs-public.h") + ++# When BUILD_SHARED_LIBS is: ++# ON it will generate a SHARED library ++# OFF it will generate a STATIC library + add_library(snappy "") +-target_sources(snappy +- PRIVATE ++ ++# Used to generate both lib types ++if (BUILD_SHARED_LIBS AND BUILD_STATIC_LIBS) ++ add_library(snappy_static STATIC "") ++ set_target_properties(snappy_static PROPERTIES OUTPUT_NAME snappy) ++ install(TARGETS snappy_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++endif () ++ ++set(SNAPPY_SOURCE_PRIVATE + "snappy-internal.h" + "snappy-stubs-internal.h" + "snappy-c.cc" + "snappy-sinksource.cc" + "snappy-stubs-internal.cc" + "snappy.cc" +- "${PROJECT_BINARY_DIR}/config.h" ++ "${PROJECT_BINARY_DIR}/config.h") + +- # Only CMake 3.3+ supports PUBLIC sources in targets exported by "install". +- $<$:PUBLIC> ++set(SNAPPY_SOURCE_PUBLIC + $ + $ + $ +@@ -233,18 +248,32 @@ + $ + $ + $ +- $ +-) +-target_include_directories(snappy +- PUBLIC ++ $) ++ ++set(SNAPPY_INCLUDE_DIRS + $ + $ +- $ +-) ++ $) ++ ++# Only CMake 3.3+ supports PUBLIC sources in targets exported by "install". ++target_sources(snappy PRIVATE ${SNAPPY_SOURCE_PRIVATE} ++ $<$:PUBLIC> ${SNAPPY_SOURCE_PUBLIC}) ++ ++target_include_directories(snappy PUBLIC ${SNAPPY_INCLUDE_DIRS}) ++ ++target_compile_definitions(snappy PRIVATE -DHAVE_CONFIG_H) ++ ++# Only CMake 3.3+ supports PUBLIC sources in targets exported by "install". ++target_sources(snappy_static PRIVATE ${SNAPPY_SOURCE_PRIVATE} ++ $<$:PUBLIC> ${SNAPPY_SOURCE_PUBLIC}) ++ ++target_include_directories(snappy_static PUBLIC ${SNAPPY_INCLUDE_DIRS}) ++ ++target_compile_definitions(snappy_static PRIVATE -DHAVE_CONFIG_H) ++ + set_target_properties(snappy + PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR}) + +-target_compile_definitions(snappy PRIVATE -DHAVE_CONFIG_H) + if(BUILD_SHARED_LIBS) + set_target_properties(snappy PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) + endif(BUILD_SHARED_LIBS) diff --git a/extra/snappy/fix-inline.patch b/extra/snappy/fix-inline.patch new file mode 100644 index 0000000..96484e0 --- /dev/null +++ b/extra/snappy/fix-inline.patch @@ -0,0 +1,13 @@ +Patch-Source: https://github.com/google/snappy/pull/128 + +--- a/snappy.cc ++++ b/snappy.cc +@@ -1014,7 +1014,7 @@ + } + + SNAPPY_ATTRIBUTE_ALWAYS_INLINE +-size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) { ++inline size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) { + const uint8_t*& ip = *ip_p; + // This section is crucial for the throughput of the decompression loop. + // The latency of an iteration is fundamentally constrained by the diff --git a/extra/snappy/rtti.patch b/extra/snappy/rtti.patch new file mode 100644 index 0000000..77b8178 --- /dev/null +++ b/extra/snappy/rtti.patch @@ -0,0 +1 @@ +Too Many Requests \ No newline at end of file -- cgit v1.2.1