diff --git a/0001-Use-high-performance-FindMatchLength-to-Optimize-Sna.patch b/0001-Use-high-performance-FindMatchLength-to-Optimize-Sna.patch new file mode 100644 index 0000000000000000000000000000000000000000..881a6495629a4111902e8ed88ebe7cab1ae6863b --- /dev/null +++ b/0001-Use-high-performance-FindMatchLength-to-Optimize-Sna.patch @@ -0,0 +1,26 @@ +From 47d6e8ed6837aabefb2f4d439f9eb4ebd899d453 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=E9=83=91=E7=B4=AB=E9=98=B310295048?= + +Date: Fri, 1 Aug 2025 15:38:44 +0800 +Subject: [PATCH] Use-high-performance-FindMatchLength-to-Optimize-Snappy + +--- + snappy-internal.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/snappy-internal.h b/snappy-internal.h +index 0923f39..6ad81b6 100644 +--- a/snappy-internal.h ++++ b/snappy-internal.h +@@ -172,7 +172,7 @@ char* CompressFragment(const char* input, + // Separate implementation for 64-bit, little-endian cpus. + #if !SNAPPY_IS_BIG_ENDIAN && \ + (defined(__x86_64__) || defined(_M_X64) || defined(ARCH_PPC) || \ +- defined(ARCH_ARM)) ++ defined(ARCH_ARM) || defined(__riscv)) + static inline std::pair FindMatchLength(const char* s1, + const char* s2, + const char* s2_limit, +-- +2.21.0.windows.1 + diff --git a/snappy.spec b/snappy.spec index b45de6a89ea0bd6a1272c95f216a1f08ddda4515..3300c92624f0ffced404e8d2a41b9211e6e64383 100644 --- a/snappy.spec +++ b/snappy.spec @@ -1,6 +1,6 @@ Name: snappy Version: 1.1.10 -Release: 2 +Release: 3 Summary: A fast compressor/decompressor License: BSD URL: https://github.com/google/snappy @@ -9,6 +9,8 @@ Source1: snappy.pc Patch0: remove-dependency-on-google-benchmark-and-gmock.patch Patch2: add-option-to-enable-rtti-set-default-to-current-ben.patch +Patch3: 0001-Use-high-performance-FindMatchLength-to-Optimize-Sna.patch + BuildRequires: gcc-c++ make gtest-devel cmake @@ -69,6 +71,9 @@ make test %doc NEWS README.md %changelog +* Fri Aug 1 2025 liuqingtao -1.1.10-3 +- Use-high-performance-FindMatchLength-to-Optimize for RV + * Fri Jan 12 2024 zhoupengcheng -1.1.10-2 - Build with C++14 instead of C++11; gtest 1.13.0 requires it