summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-dbs
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2024-04-07 18:13:24 +0800
committerKhem Raj <raj.khem@gmail.com>2024-04-07 08:30:16 -0700
commita73f3bd661ff9bae82c8ae04a338b47094d4bb30 (patch)
treef1e4845e75a1b635c4fb58de35655473c4c702cf /meta-oe/recipes-dbs
parent5a02b76b82d1f48986212c33dddf7986385c79ef (diff)
downloadmeta-openembedded-a73f3bd661ff9bae82c8ae04a338b47094d4bb30.tar.gz
rocksdb: fix build error for multilib
Fix declaration scope of LE_LOAD32 in crc32c when building lib32-rocksdb: util/crc32c.cc: In function 'void rocksdb::crc32c::DefaultCRC32(uint64_t*, const uint8_t**)': util/crc32c.cc:267:53: error: 'LE_LOAD32' was not declared in this scope 267 | *l = _mm_crc32_u32(static_cast<unsigned int>(*l), LE_LOAD32(*p)); | ^~~~~~~~~ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-dbs')
-rw-r--r--meta-oe/recipes-dbs/rocksdb/files/0007-Fix-declaration-scope-of-LE_LOAD32-in-crc32c.patch39
-rw-r--r--meta-oe/recipes-dbs/rocksdb/rocksdb_9.0.0.bb1
2 files changed, 40 insertions, 0 deletions
diff --git a/meta-oe/recipes-dbs/rocksdb/files/0007-Fix-declaration-scope-of-LE_LOAD32-in-crc32c.patch b/meta-oe/recipes-dbs/rocksdb/files/0007-Fix-declaration-scope-of-LE_LOAD32-in-crc32c.patch
new file mode 100644
index 000000000..9ba34450b
--- /dev/null
+++ b/meta-oe/recipes-dbs/rocksdb/files/0007-Fix-declaration-scope-of-LE_LOAD32-in-crc32c.patch
@@ -0,0 +1,39 @@
1From ed549d43c8b691cd7891c7e5c76df189feb04b4f Mon Sep 17 00:00:00 2001
2From: Yi Zhao <yi.zhao@windriver.com>
3Date: Sun, 7 Apr 2024 17:16:53 +0800
4Subject: [PATCH] Fix declaration scope of LE_LOAD32 in crc32c
5
6Fix build error when __SSE4_2__ is defined:
7util/crc32c.cc: In function 'void rocksdb::crc32c::DefaultCRC32(uint64_t*, const uint8_t**)':
8util/crc32c.cc:267:53: error: 'LE_LOAD32' was not declared in this scope
9 267 | *l = _mm_crc32_u32(static_cast<unsigned int>(*l), LE_LOAD32(*p));
10 | ^~~~~~~~~
11
12Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/12515]
13
14Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
15---
16 util/crc32c.cc | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19diff --git a/util/crc32c.cc b/util/crc32c.cc
20index 38a69bb50..aa13ad882 100644
21--- a/util/crc32c.cc
22+++ b/util/crc32c.cc
23@@ -242,12 +242,12 @@ static const uint32_t table3_[256] = {
24 0xc747336e, 0x1a0299d6, 0x782010ef, 0xa565ba57, 0xbc65029d, 0x6120a825,
25 0x0302211c, 0xde478ba4, 0x31035088, 0xec46fa30, 0x8e647309, 0x5321d9b1,
26 0x4a21617b, 0x9764cbc3, 0xf54642fa, 0x2803e842};
27+#endif // !__SSE4_2__
28
29 // Used to fetch a naturally-aligned 32-bit word in little endian byte-order
30 static inline uint32_t LE_LOAD32(const uint8_t* p) {
31 return DecodeFixed32(reinterpret_cast<const char*>(p));
32 }
33-#endif // !__SSE4_2__
34
35 static inline void DefaultCRC32(uint64_t* l, uint8_t const** p) {
36 #ifndef __SSE4_2__
37--
382.25.1
39
diff --git a/meta-oe/recipes-dbs/rocksdb/rocksdb_9.0.0.bb b/meta-oe/recipes-dbs/rocksdb/rocksdb_9.0.0.bb
index ee007acfa..444351dbb 100644
--- a/meta-oe/recipes-dbs/rocksdb/rocksdb_9.0.0.bb
+++ b/meta-oe/recipes-dbs/rocksdb/rocksdb_9.0.0.bb
@@ -16,6 +16,7 @@ SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH};protocol=htt
16 file://0004-Implement-support-for-musl-ppc64.patch \ 16 file://0004-Implement-support-for-musl-ppc64.patch \
17 file://0005-Implement-timer-implementation-for-mips-platform.patch \ 17 file://0005-Implement-timer-implementation-for-mips-platform.patch \
18 file://0006-Implement-timer-for-arm-v6.patch \ 18 file://0006-Implement-timer-for-arm-v6.patch \
19 file://0007-Fix-declaration-scope-of-LE_LOAD32-in-crc32c.patch \
19 " 20 "
20 21
21SRC_URI:append:riscv32 = " file://0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch" 22SRC_URI:append:riscv32 = " file://0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch"