diff options
-rw-r--r-- | meta-oe/recipes-extended/snappy/snappy/0001-Add-inline-with-SNAPPY_ATTRIBUTE_ALWAYS_INLINE.patch | 71 | ||||
-rw-r--r-- | meta-oe/recipes-extended/snappy/snappy/fix-build-on-32bit-arm.patch | 33 | ||||
-rw-r--r-- | meta-oe/recipes-extended/snappy/snappy_1.1.10.bb (renamed from meta-oe/recipes-extended/snappy/snappy_1.1.9.bb) | 8 |
3 files changed, 37 insertions, 75 deletions
diff --git a/meta-oe/recipes-extended/snappy/snappy/0001-Add-inline-with-SNAPPY_ATTRIBUTE_ALWAYS_INLINE.patch b/meta-oe/recipes-extended/snappy/snappy/0001-Add-inline-with-SNAPPY_ATTRIBUTE_ALWAYS_INLINE.patch deleted file mode 100644 index 27357d88aa..0000000000 --- a/meta-oe/recipes-extended/snappy/snappy/0001-Add-inline-with-SNAPPY_ATTRIBUTE_ALWAYS_INLINE.patch +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
1 | From 4728803cc8687431449c8c9fbfabb1da04943400 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Georgi D. Sotirov" <gdsotirov@gmail.com> | ||
3 | Date: Wed, 5 May 2021 14:16:46 +0300 | ||
4 | Subject: [PATCH] Add inline with SNAPPY_ATTRIBUTE_ALWAYS_INLINE | ||
5 | |||
6 | Add inline with SNAPPY_ATTRIBUTE_ALWAYS_INLINE on AdvanceToNextTag to | ||
7 | fix the following compilation errors and a warning with GCC: | ||
8 | |||
9 | [ 2%] Building CXX object CMakeFiles/snappy.dir/snappy.cc.o | ||
10 | /usr/bin/c++ -DHAVE_CONFIG_H -Dsnappy_EXPORTS | ||
11 | -I/tmp/snappy-1.1.9/build -I/tmp/snappy-1.1.9 -O3 | ||
12 | -march=i586 -mtune=i686 -Wall -Wextra -fno-exceptions -fno-rtti -O3 | ||
13 | -DNDEBUG -fPIC -std=c++11 -o CMakeFiles/snappy.dir/snappy.cc.o -c | ||
14 | /tmp/snappy-1.1.9/snappy.cc | ||
15 | /tmp/snappy-1.1.9/snappy.cc:1017:8: warning: always_inline | ||
16 | function might not be inlinable [-Wattributes] | ||
17 | size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) { | ||
18 | ^ | ||
19 | /tmp/snappy-1.1.9/snappy.cc: In function 'std::pair<const | ||
20 | unsigned char*, int> snappy::DecompressBranchless(const uint8_t*, const | ||
21 | uint8_t*, ptrdiff_t, T, ptrdiff_t) [with T = char*; uint8_t = unsigned | ||
22 | char; ptrdiff_t = int]': | ||
23 | /tmp/snappy-1.1.9/snappy.cc:1017:8: error: inlining failed in | ||
24 | call to always_inline 'size_t snappy::AdvanceToNextTag(const uint8_t**, | ||
25 | size_t*)': function body can be overwritten at link time | ||
26 | /tmp/snappy-1.1.9/snappy.cc:1097:53: error: called from here | ||
27 | size_t tag_type = AdvanceToNextTag(&ip, &tag); | ||
28 | ^ | ||
29 | /tmp/snappy-1.1.9/snappy.cc:1017:8: error: inlining failed in | ||
30 | call to always_inline 'size_t snappy::AdvanceToNextTag(const uint8_t**, | ||
31 | size_t*)': function body can be overwritten at link time | ||
32 | size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) { | ||
33 | ^ | ||
34 | /tmp/snappy-1.1.9/snappy.cc:1097:53: error: called from here | ||
35 | size_t tag_type = AdvanceToNextTag(&ip, &tag); | ||
36 | ^ | ||
37 | /tmp/snappy-1.1.9/snappy.cc:1017:8: error: inlining failed in | ||
38 | call to always_inline 'size_t snappy::AdvanceToNextTag(const uint8_t**, | ||
39 | size_t*)': function body can be overwritten at link time | ||
40 | size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) { | ||
41 | ^ | ||
42 | /tmp/snappy-1.1.9/snappy.cc:1097:53: error: called from here | ||
43 | size_t tag_type = AdvanceToNextTag(&ip, &tag); | ||
44 | ^ | ||
45 | CMakeFiles/snappy.dir/build.make:137: recipe for target | ||
46 | 'CMakeFiles/snappy.dir/snappy.cc.o' failed | ||
47 | |||
48 | Just like with other functions using SNAPPY_ATTRIBUTE_ALWAYS_INLINE | ||
49 | macro (i.e. __attribute__((always_inline)) ) it is necessary to use C++ | ||
50 | inline specifier. | ||
51 | |||
52 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
53 | |||
54 | Upstream-Status: Submitted [https://github.com/google/snappy/pull/128] | ||
55 | --- | ||
56 | snappy.cc | 2 +- | ||
57 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
58 | |||
59 | diff --git a/snappy.cc b/snappy.cc | ||
60 | index 79dc0e8..51157be 100644 | ||
61 | --- a/snappy.cc | ||
62 | +++ b/snappy.cc | ||
63 | @@ -1014,7 +1014,7 @@ void MemMove(ptrdiff_t dst, const void* src, size_t size) { | ||
64 | } | ||
65 | |||
66 | SNAPPY_ATTRIBUTE_ALWAYS_INLINE | ||
67 | -size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) { | ||
68 | +inline size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) { | ||
69 | const uint8_t*& ip = *ip_p; | ||
70 | // This section is crucial for the throughput of the decompression loop. | ||
71 | // The latency of an iteration is fundamentally constrained by the | ||
diff --git a/meta-oe/recipes-extended/snappy/snappy/fix-build-on-32bit-arm.patch b/meta-oe/recipes-extended/snappy/snappy/fix-build-on-32bit-arm.patch new file mode 100644 index 0000000000..b6ab149e19 --- /dev/null +++ b/meta-oe/recipes-extended/snappy/snappy/fix-build-on-32bit-arm.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From ecb3bcc283ce740a34d6342cbcda569f3193ade9 Mon Sep 17 00:00:00 2001 | ||
2 | From: David Michael <fedora.dm0@gmail.com> | ||
3 | Date: Mon, 1 May 2023 11:14:32 -0400 | ||
4 | Subject: [PATCH] Specifically check for NEON for ARMv8 CPUs. | ||
5 | |||
6 | The actual NEON implementation uses instructions that are not | ||
7 | supported on 32-bit CPUs. Make the CMake test reflect this so that | ||
8 | ARMv7 builds succeed again. | ||
9 | |||
10 | Upstream-Status: Submitted [https://github.com/google/snappy/pull/169] | ||
11 | |||
12 | Signed-off-by: David Michael <fedora.dm0@gmail.com> | ||
13 | Signed-off-by: Alper Ak <alperyasinak1@gmail.com> | ||
14 | --- | ||
15 | CMakeLists.txt | 4 ++-- | ||
16 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
17 | |||
18 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
19 | index 85afe58e..e8775859 100644 | ||
20 | --- a/CMakeLists.txt | ||
21 | +++ b/CMakeLists.txt | ||
22 | @@ -207,9 +207,9 @@ int main() { | ||
23 | check_cxx_source_compiles(" | ||
24 | #include <arm_neon.h> | ||
25 | int main() { | ||
26 | - uint8_t val = 3, dup[8]; | ||
27 | + uint8_t val = 3; | ||
28 | uint8x16_t v = vld1q_dup_u8(&val); | ||
29 | - vst1q_u8(dup, v); | ||
30 | + val = vmaxvq_u8(v); | ||
31 | return 0; | ||
32 | }" SNAPPY_HAVE_NEON) | ||
33 | |||
diff --git a/meta-oe/recipes-extended/snappy/snappy_1.1.9.bb b/meta-oe/recipes-extended/snappy/snappy_1.1.10.bb index 9e0e43ce8f..bc3bc3aa47 100644 --- a/meta-oe/recipes-extended/snappy/snappy_1.1.9.bb +++ b/meta-oe/recipes-extended/snappy/snappy_1.1.10.bb | |||
@@ -11,11 +11,11 @@ LICENSE = "BSD-3-Clause" | |||
11 | LIC_FILES_CHKSUM = "file://COPYING;md5=f62f3080324a97b3159a7a7e61812d0c" | 11 | LIC_FILES_CHKSUM = "file://COPYING;md5=f62f3080324a97b3159a7a7e61812d0c" |
12 | 12 | ||
13 | SRC_URI = "gitsm://github.com/google/snappy.git;protocol=https;branch=main \ | 13 | SRC_URI = "gitsm://github.com/google/snappy.git;protocol=https;branch=main \ |
14 | file://0001-Add-inline-with-SNAPPY_ATTRIBUTE_ALWAYS_INLINE.patch \ | 14 | file://fix-build-on-32bit-arm.patch" |
15 | " | 15 | |
16 | SRCREV = "2b63814b15a2aaae54b7943f0cd935892fae628f" | 16 | SRCREV = "dc05e026488865bc69313a68bcc03ef2e4ea8e83" |
17 | S = "${WORKDIR}/git" | ||
18 | 17 | ||
18 | S = "${WORKDIR}/git" | ||
19 | 19 | ||
20 | inherit cmake pkgconfig | 20 | inherit cmake pkgconfig |
21 | 21 | ||