summaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2024-03-21 20:02:21 +0800
committerKhem Raj <raj.khem@gmail.com>2024-03-21 08:46:06 -0700
commitd200b61e2441a303a6de4be04459d61aa51f3005 (patch)
tree9fdb6c09676ee686090d747fb63948fe3f5761d6 /meta-oe
parent8f9b4e04b156e64f68171bf1ce5eeeb82ca2a9b0 (diff)
downloadmeta-openembedded-d200b61e2441a303a6de4be04459d61aa51f3005.tar.gz
rocksdb: upgrade 7.9.2 -> 9.0.0
ChangeLog: https://github.com/facebook/rocksdb/releases/tag/v9.0.0 * Refresh patches. * Drop backport patch. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-dbs/rocksdb/files/0001-Add-missing-includes-cstdint-and-cstdio.patch70
-rw-r--r--meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Add-check-for-atomic-support.patch13
-rw-r--r--meta-oe/recipes-dbs/rocksdb/files/0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch11
-rw-r--r--meta-oe/recipes-dbs/rocksdb/files/0002-cmake-Use-exported-target-for-bz2.patch (renamed from meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Use-exported-target-for-bz2.patch)13
-rw-r--r--meta-oe/recipes-dbs/rocksdb/files/0003-cmake-Do-not-add-msse4.2-mpclmul-on-clang.patch (renamed from meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Do-not-add-msse4.2-mpclmul-on-clang.patch)8
-rw-r--r--meta-oe/recipes-dbs/rocksdb/files/0004-Implement-support-for-musl-ppc64.patch (renamed from meta-oe/recipes-dbs/rocksdb/files/ppc64.patch)20
-rw-r--r--meta-oe/recipes-dbs/rocksdb/files/0005-Implement-timer-implementation-for-mips-platform.patch32
-rw-r--r--meta-oe/recipes-dbs/rocksdb/files/0006-Implement-timer-for-arm-v6.patch (renamed from meta-oe/recipes-dbs/rocksdb/files/arm.patch)18
-rw-r--r--meta-oe/recipes-dbs/rocksdb/files/mips.patch20
-rw-r--r--meta-oe/recipes-dbs/rocksdb/rocksdb_9.0.0.bb (renamed from meta-oe/recipes-dbs/rocksdb/rocksdb_7.9.2.bb)19
10 files changed, 103 insertions, 121 deletions
diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-Add-missing-includes-cstdint-and-cstdio.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-Add-missing-includes-cstdint-and-cstdio.patch
deleted file mode 100644
index a177ce28b..000000000
--- a/meta-oe/recipes-dbs/rocksdb/files/0001-Add-missing-includes-cstdint-and-cstdio.patch
+++ /dev/null
@@ -1,70 +0,0 @@
1From 6e376601c990abaa5e261d1311f92acb3b370b8f Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 24 Jan 2023 21:40:43 -0800
4Subject: [PATCH] Add missing includes <cstdint> and <cstdio>
5
6This is needed with GCC 13 and newer [1]
7
8[1] https://www.gnu.org/software/gcc/gcc-13/porting_to.html
9
10Upstream-Status: Backport [https://github.com/facebook/rocksdb/commit/88edfbfb5e1cac228f7cc31fbec24bb637fe54b1]
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 .../rocksdb/rocksdb/db/compaction/compaction_iteration_stats.h | 1 +
14 storage/rocksdb/rocksdb/include/rocksdb/utilities/checkpoint.h | 1 +
15 .../rocksdb/rocksdb/table/block_based/data_block_hash_index.h | 1 +
16 storage/rocksdb/rocksdb/util/slice.cc | 1 +
17 storage/rocksdb/rocksdb/util/string_util.h | 1 +
18 tpool/aio_linux.cc | 1 +
19 6 files changed, 6 insertions(+)
20
21--- a/db/compaction/compaction_iteration_stats.h
22+++ b/db/compaction/compaction_iteration_stats.h
23@@ -7,6 +7,7 @@
24
25 #include <cstdint>
26
27+#include <cstdint>
28 #include "rocksdb/rocksdb_namespace.h"
29
30 namespace ROCKSDB_NAMESPACE {
31--- a/include/rocksdb/utilities/checkpoint.h
32+++ b/include/rocksdb/utilities/checkpoint.h
33@@ -8,6 +8,7 @@
34 #pragma once
35 #ifndef ROCKSDB_LITE
36
37+#include <cstdint>
38 #include <string>
39 #include <vector>
40
41--- a/table/block_based/data_block_hash_index.h
42+++ b/table/block_based/data_block_hash_index.h
43@@ -5,6 +5,7 @@
44
45 #pragma once
46
47+#include <cstdint>
48 #include <string>
49 #include <vector>
50
51--- a/util/slice.cc
52+++ b/util/slice.cc
53@@ -12,6 +12,7 @@
54 #include <stdio.h>
55
56 #include <algorithm>
57+#include <cstdint>
58
59 #include "rocksdb/convenience.h"
60 #include "rocksdb/slice_transform.h"
61--- a/util/string_util.h
62+++ b/util/string_util.h
63@@ -6,6 +6,7 @@
64
65 #pragma once
66
67+#include <cstdint>
68 #include <sstream>
69 #include <string>
70 #include <unordered_map>
diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Add-check-for-atomic-support.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Add-check-for-atomic-support.patch
index 0fe9c1276..ba6a2d4fb 100644
--- a/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Add-check-for-atomic-support.patch
+++ b/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Add-check-for-atomic-support.patch
@@ -1,4 +1,4 @@
1From cf168ae0b7bceab8432d096719b331f18428fe39 Mon Sep 17 00:00:00 2001 1From 034a9c4ce2ae61cfcffa977f1eb8e6f68947f480 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 18 Mar 2020 15:10:37 -0700 3Date: Wed, 18 Mar 2020 15:10:37 -0700
4Subject: [PATCH] cmake: Add check for atomic support 4Subject: [PATCH] cmake: Add check for atomic support
@@ -18,6 +18,7 @@ Fixes
18| /mnt/b/yoe/build/tmp/work/mips32r2-yoe-linux/rocksdb/6.6.4-r0/recipe-sysroot-native/usr/bin/mips-yoe-linux/mips-yoe-linux-ld: librocksdb.so.6.6.4: undefined reference to `__atomic_fetch_add_8' 18| /mnt/b/yoe/build/tmp/work/mips32r2-yoe-linux/rocksdb/6.6.4-r0/recipe-sysroot-native/usr/bin/mips-yoe-linux/mips-yoe-linux-ld: librocksdb.so.6.6.4: undefined reference to `__atomic_fetch_add_8'
19 19
20Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/6555] 20Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/6555]
21
21Signed-off-by: Khem Raj <raj.khem@gmail.com> 22Signed-off-by: Khem Raj <raj.khem@gmail.com>
22--- 23---
23 CMakeLists.txt | 5 +++ 24 CMakeLists.txt | 5 +++
@@ -25,9 +26,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
25 2 files changed, 74 insertions(+) 26 2 files changed, 74 insertions(+)
26 create mode 100644 cmake/modules/CheckAtomic.cmake 27 create mode 100644 cmake/modules/CheckAtomic.cmake
27 28
29diff --git a/CMakeLists.txt b/CMakeLists.txt
30index 5cfc1b4803..0a7f820a22 100644
28--- a/CMakeLists.txt 31--- a/CMakeLists.txt
29+++ b/CMakeLists.txt 32+++ b/CMakeLists.txt
30@@ -1057,7 +1057,12 @@ set(ROCKSDB_SHARED_LIB rocksdb-shared${A 33@@ -1038,7 +1038,12 @@ set(ROCKSDB_SHARED_LIB rocksdb-shared${ARTIFACT_SUFFIX})
31 if(WIN32) 34 if(WIN32)
32 set(SYSTEM_LIBS ${SYSTEM_LIBS} shlwapi.lib rpcrt4.lib) 35 set(SYSTEM_LIBS ${SYSTEM_LIBS} shlwapi.lib rpcrt4.lib)
33 else() 36 else()
@@ -40,6 +43,9 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
40 endif() 43 endif()
41 44
42 set(ROCKSDB_PLUGIN_EXTERNS "") 45 set(ROCKSDB_PLUGIN_EXTERNS "")
46diff --git a/cmake/modules/CheckAtomic.cmake b/cmake/modules/CheckAtomic.cmake
47new file mode 100644
48index 0000000000..8b7dc8a377
43--- /dev/null 49--- /dev/null
44+++ b/cmake/modules/CheckAtomic.cmake 50+++ b/cmake/modules/CheckAtomic.cmake
45@@ -0,0 +1,69 @@ 51@@ -0,0 +1,69 @@
@@ -112,3 +118,6 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
112+ endif() 118+ endif()
113+endif() 119+endif()
114+ 120+
121--
1222.25.1
123
diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch
index c98623360..342964cf2 100644
--- a/meta-oe/recipes-dbs/rocksdb/files/0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch
+++ b/meta-oe/recipes-dbs/rocksdb/files/0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch
@@ -1,4 +1,4 @@
1From 114c42fba3fc86119710e8dd1bb2b7a9e39e3064 Mon Sep 17 00:00:00 2001 1From 1ba84e1b8d4c9a3ad85dc443b0df4d79c89cca4b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 17 Jun 2021 19:35:01 -0700 3Date: Thu, 17 Jun 2021 19:35:01 -0700
4Subject: [PATCH] replace old sync with new atomic builtin equivalents 4Subject: [PATCH] replace old sync with new atomic builtin equivalents
@@ -6,13 +6,15 @@ Subject: [PATCH] replace old sync with new atomic builtin equivalents
6Helps compiling with gcc on newer arches e.g. riscv32 where these 6Helps compiling with gcc on newer arches e.g. riscv32 where these
7__sync* builtins are not implemented atleast for 64bit values 7__sync* builtins are not implemented atleast for 64bit values
8 8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11Upstream-Status: Pending 9Upstream-Status: Pending
12 10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 .../range/range_tree/lib/portability/toku_atomic.h | 12 ++++++------ 13 .../range/range_tree/lib/portability/toku_atomic.h | 12 ++++++------
14 1 file changed, 6 insertions(+), 6 deletions(-) 14 1 file changed, 6 insertions(+), 6 deletions(-)
15 15
16diff --git a/utilities/transactions/lock/range/range_tree/lib/portability/toku_atomic.h b/utilities/transactions/lock/range/range_tree/lib/portability/toku_atomic.h
17index aaa2298faf..9385902808 100644
16--- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_atomic.h 18--- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_atomic.h
17+++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_atomic.h 19+++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_atomic.h
18@@ -77,37 +77,37 @@ template <typename T, typename U> 20@@ -77,37 +77,37 @@ template <typename T, typename U>
@@ -59,3 +61,6 @@ Upstream-Status: Pending
59 } 61 }
60 62
61 // in case you include this but not toku_portability.h 63 // in case you include this but not toku_portability.h
64--
652.25.1
66
diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Use-exported-target-for-bz2.patch b/meta-oe/recipes-dbs/rocksdb/files/0002-cmake-Use-exported-target-for-bz2.patch
index 706e0868e..6b46a1f30 100644
--- a/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Use-exported-target-for-bz2.patch
+++ b/meta-oe/recipes-dbs/rocksdb/files/0002-cmake-Use-exported-target-for-bz2.patch
@@ -1,4 +1,4 @@
1From 46a4e585175cac8d76bd0b64f0fc27c9e22f04a1 Mon Sep 17 00:00:00 2001 1From bb3fc86f87a9acc64628e1cb32f5c8a1cfbeb880 Mon Sep 17 00:00:00 2001
2From: Pascal Bach <pascal.bach@nextrem.ch> 2From: Pascal Bach <pascal.bach@nextrem.ch>
3Date: Mon, 12 Oct 2020 21:22:46 +0200 3Date: Mon, 12 Oct 2020 21:22:46 +0200
4Subject: [PATCH] cmake: Use exported target for bz2 4Subject: [PATCH] cmake: Use exported target for bz2
@@ -8,12 +8,14 @@ This is not portable and makes it fail in environment like Yocto.
8 8
9Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/7541] 9Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/7541]
10--- 10---
11 CMakeLists.txt | 9 ++------- 11 CMakeLists.txt | 7 +------
12 1 file changed, 2 insertions(+), 7 deletions(-) 12 1 file changed, 1 insertion(+), 6 deletions(-)
13 13
14diff --git a/CMakeLists.txt b/CMakeLists.txt
15index 0a7f820a22..be80edb955 100644
14--- a/CMakeLists.txt 16--- a/CMakeLists.txt
15+++ b/CMakeLists.txt 17+++ b/CMakeLists.txt
16@@ -154,12 +154,7 @@ else() 18@@ -149,12 +149,7 @@ else()
17 if(WITH_BZ2) 19 if(WITH_BZ2)
18 find_package(BZip2 REQUIRED) 20 find_package(BZip2 REQUIRED)
19 add_definitions(-DBZIP2) 21 add_definitions(-DBZIP2)
@@ -27,3 +29,6 @@ Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/7541]
27 endif() 29 endif()
28 30
29 if(WITH_LZ4) 31 if(WITH_LZ4)
32--
332.25.1
34
diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Do-not-add-msse4.2-mpclmul-on-clang.patch b/meta-oe/recipes-dbs/rocksdb/files/0003-cmake-Do-not-add-msse4.2-mpclmul-on-clang.patch
index e52185443..e2f785d7c 100644
--- a/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Do-not-add-msse4.2-mpclmul-on-clang.patch
+++ b/meta-oe/recipes-dbs/rocksdb/files/0003-cmake-Do-not-add-msse4.2-mpclmul-on-clang.patch
@@ -1,4 +1,4 @@
1From cedc84a8db468d0b6652e78a8a6667e655586b53 Mon Sep 17 00:00:00 2001 1From bb10f55eb77be7b7eee94cb3506c9cbef8e24099 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 26 Jan 2023 13:00:43 -0800 3Date: Thu, 26 Jan 2023 13:00:43 -0800
4Subject: [PATCH] cmake: Do not add -msse4.2 -mpclmul on clang 4Subject: [PATCH] cmake: Do not add -msse4.2 -mpclmul on clang
@@ -16,10 +16,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
16 1 file changed, 1 insertion(+), 1 deletion(-) 16 1 file changed, 1 insertion(+), 1 deletion(-)
17 17
18diff --git a/CMakeLists.txt b/CMakeLists.txt 18diff --git a/CMakeLists.txt b/CMakeLists.txt
19index dbef059028..981545a4e0 100644 19index be80edb955..a1bbade81a 100644
20--- a/CMakeLists.txt 20--- a/CMakeLists.txt
21+++ b/CMakeLists.txt 21+++ b/CMakeLists.txt
22@@ -290,7 +290,7 @@ endif() 22@@ -279,7 +279,7 @@ endif()
23 23
24 include(CheckCXXSourceCompiles) 24 include(CheckCXXSourceCompiles)
25 set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) 25 set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
@@ -29,5 +29,5 @@ index dbef059028..981545a4e0 100644
29 endif() 29 endif()
30 30
31-- 31--
322.39.1 322.25.1
33 33
diff --git a/meta-oe/recipes-dbs/rocksdb/files/ppc64.patch b/meta-oe/recipes-dbs/rocksdb/files/0004-Implement-support-for-musl-ppc64.patch
index 273b8fe2e..5fcf1f7da 100644
--- a/meta-oe/recipes-dbs/rocksdb/files/ppc64.patch
+++ b/meta-oe/recipes-dbs/rocksdb/files/0004-Implement-support-for-musl-ppc64.patch
@@ -1,11 +1,20 @@
1Upstream-Status: Pending 1From c6accd34e8169d7a6b92fc89dce5d4309978e39e Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 21 Mar 2024 14:11:09 +0800
4Subject: [PATCH] Implement support for musl/ppc64
2 5
3implement support for musl/ppc64 6Upstream-Status: Pending
4 7
5Signed-off-by: Khem Raj <raj.khem@gmail.com> 8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 .../lock/range/range_tree/lib/portability/toku_time.h | 8 ++++++--
11 1 file changed, 6 insertions(+), 2 deletions(-)
12
13diff --git a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
14index 9b83c53511..0a7488c397 100644
6--- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h 15--- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
7+++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h 16+++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
8@@ -58,7 +58,7 @@ Copyright (c) 2006, 2015, Percona and/or 17@@ -58,7 +58,7 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
9 #include <stdint.h> 18 #include <stdint.h>
10 #include <sys/time.h> 19 #include <sys/time.h>
11 #include <time.h> 20 #include <time.h>
@@ -14,7 +23,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
14 #include <sys/platform/ppc.h> 23 #include <sys/platform/ppc.h>
15 #endif 24 #endif
16 25
17@@ -131,8 +131,12 @@ static inline tokutime_t toku_time_now(v 26@@ -131,8 +131,12 @@ static inline tokutime_t toku_time_now(void) {
18 uint64_t result; 27 uint64_t result;
19 __asm __volatile__("mrs %[rt], cntvct_el0" : [rt] "=r"(result)); 28 __asm __volatile__("mrs %[rt], cntvct_el0" : [rt] "=r"(result));
20 return result; 29 return result;
@@ -28,3 +37,6 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
28 #elif defined(__s390x__) 37 #elif defined(__s390x__)
29 uint64_t result; 38 uint64_t result;
30 asm volatile("stckf %0" : "=Q"(result) : : "cc"); 39 asm volatile("stckf %0" : "=Q"(result) : : "cc");
40--
412.25.1
42
diff --git a/meta-oe/recipes-dbs/rocksdb/files/0005-Implement-timer-implementation-for-mips-platform.patch b/meta-oe/recipes-dbs/rocksdb/files/0005-Implement-timer-implementation-for-mips-platform.patch
new file mode 100644
index 000000000..2979b73d2
--- /dev/null
+++ b/meta-oe/recipes-dbs/rocksdb/files/0005-Implement-timer-implementation-for-mips-platform.patch
@@ -0,0 +1,32 @@
1From 2ebc0ff33e41d23e4d3aec1a86f3d8bd4be410e7 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 21 Mar 2024 14:14:58 +0800
4Subject: [PATCH] Implement timer implementation for mips platform
5
6Upstream-Status: Pending
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 .../lock/range/range_tree/lib/portability/toku_time.h | 6 ++++++
11 1 file changed, 6 insertions(+)
12
13diff --git a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
14index 0a7488c397..ad7d9f2124 100644
15--- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
16+++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
17@@ -162,6 +162,12 @@ static inline tokutime_t toku_time_now(void) {
18 unsigned long result;
19 asm volatile ("rdtime.d\t%0,$r0" : "=r" (result));
20 return result;
21+#elif defined(__mips__)
22+ // mips apparently only allows rdtsc for superusers, so we fall
23+ // back to gettimeofday. It's possible clock_gettime would be better.
24+ struct timeval tv;
25+ gettimeofday(&tv, nullptr);
26+ return (uint64_t)tv.tv_sec * 1000000 + tv.tv_usec;
27 #else
28 #error No timer implementation for this platform
29 #endif
30--
312.25.1
32
diff --git a/meta-oe/recipes-dbs/rocksdb/files/arm.patch b/meta-oe/recipes-dbs/rocksdb/files/0006-Implement-timer-for-arm-v6.patch
index 3066aa827..0ae673c42 100644
--- a/meta-oe/recipes-dbs/rocksdb/files/arm.patch
+++ b/meta-oe/recipes-dbs/rocksdb/files/0006-Implement-timer-for-arm-v6.patch
@@ -1,11 +1,20 @@
1Upstream-Status: Pending 1From 9e274ba2762724f353227b5a3a6e4433f706468a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 21 Mar 2024 14:16:08 +0800
4Subject: [PATCH] Implement timer for arm >= v6
2 5
3implement timer for arm >= v6 6Upstream-Status: Pending
4 7
5Signed-off-by: Khem Raj <raj.khem@gmail.com> 8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 .../range/range_tree/lib/portability/toku_time.h | 14 ++++++++++++++
11 1 file changed, 14 insertions(+)
12
13diff --git a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
14index ad7d9f2124..bcb795b7e7 100644
6--- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h 15--- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
7+++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h 16+++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
8@@ -164,6 +164,20 @@ static inline tokutime_t toku_time_now(v 17@@ -168,6 +168,20 @@ static inline tokutime_t toku_time_now(void) {
9 struct timeval tv; 18 struct timeval tv;
10 gettimeofday(&tv, nullptr); 19 gettimeofday(&tv, nullptr);
11 return (uint64_t)tv.tv_sec * 1000000 + tv.tv_usec; 20 return (uint64_t)tv.tv_sec * 1000000 + tv.tv_usec;
@@ -26,3 +35,6 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
26 #else 35 #else
27 #error No timer implementation for this platform 36 #error No timer implementation for this platform
28 #endif 37 #endif
38--
392.25.1
40
diff --git a/meta-oe/recipes-dbs/rocksdb/files/mips.patch b/meta-oe/recipes-dbs/rocksdb/files/mips.patch
deleted file mode 100644
index cea70352d..000000000
--- a/meta-oe/recipes-dbs/rocksdb/files/mips.patch
+++ /dev/null
@@ -1,20 +0,0 @@
1Upstream-Status: Pending
2
3implement timer implementation for mips platform
4
5Signed-off-by: Khem Raj <raj.khem@gmail.com>
6--- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
7+++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
8@@ -158,6 +158,12 @@ static inline tokutime_t toku_time_now(v
9 uint64_t cycles;
10 asm volatile("rdcycle %0" : "=r"(cycles));
11 return cycles;
12+#elif defined(__mips__)
13+ // mips apparently only allows rdtsc for superusers, so we fall
14+ // back to gettimeofday. It's possible clock_gettime would be better.
15+ struct timeval tv;
16+ gettimeofday(&tv, nullptr);
17+ return (uint64_t)tv.tv_sec * 1000000 + tv.tv_usec;
18 #else
19 #error No timer implementation for this platform
20 #endif
diff --git a/meta-oe/recipes-dbs/rocksdb/rocksdb_7.9.2.bb b/meta-oe/recipes-dbs/rocksdb/rocksdb_9.0.0.bb
index 8faaee40f..76d75f2b5 100644
--- a/meta-oe/recipes-dbs/rocksdb/rocksdb_7.9.2.bb
+++ b/meta-oe/recipes-dbs/rocksdb/rocksdb_9.0.0.bb
@@ -6,17 +6,16 @@ LIC_FILES_CHKSUM = "file://LICENSE.Apache;md5=3b83ef96387f14655fc854ddc3c6bd57 \
6 file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ 6 file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
7 file://LICENSE.leveldb;md5=fb04ff57a14f308f2eed4a9b87d45837" 7 file://LICENSE.leveldb;md5=fb04ff57a14f308f2eed4a9b87d45837"
8 8
9SRCREV = "444b3f4845dd01b0d127c4b420fdd3b50ad56682" 9SRCREV = "f4441966592636253fd5ab0bb9ed44fc2697fc53"
10SRCBRANCH = "7.9.fb" 10SRCBRANCH = "9.0.fb"
11 11
12SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH};protocol=https \ 12SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH};protocol=https \
13 file://0001-cmake-Add-check-for-atomic-support.patch \ 13 file://0001-cmake-Add-check-for-atomic-support.patch \
14 file://0001-cmake-Use-exported-target-for-bz2.patch \ 14 file://0002-cmake-Use-exported-target-for-bz2.patch \
15 file://0001-Add-missing-includes-cstdint-and-cstdio.patch \ 15 file://0003-cmake-Do-not-add-msse4.2-mpclmul-on-clang.patch \
16 file://0001-cmake-Do-not-add-msse4.2-mpclmul-on-clang.patch \ 16 file://0004-Implement-support-for-musl-ppc64.patch \
17 file://ppc64.patch \ 17 file://0005-Implement-timer-implementation-for-mips-platform.patch \
18 file://mips.patch \ 18 file://0006-Implement-timer-for-arm-v6.patch \
19 file://arm.patch \
20 " 19 "
21 20
22SRC_URI:append:riscv32 = " file://0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch" 21SRC_URI:append:riscv32 = " file://0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch"
@@ -46,12 +45,10 @@ EXTRA_OECMAKE = "\
46" 45"
47 46
48do_install:append() { 47do_install:append() {
49 # fix for qa check buildpaths 48 # Fix for qa check buildpaths
50 sed -i "s#${RECIPE_SYSROOT}##g" ${D}${libdir}/cmake/rocksdb/RocksDBTargets.cmake 49 sed -i "s#${RECIPE_SYSROOT}##g" ${D}${libdir}/cmake/rocksdb/RocksDBTargets.cmake
51} 50}
52 51
53LDFLAGS:append:riscv64 = " -pthread"
54
55# Need toku_time_now() implemented for ppc/musl 52# Need toku_time_now() implemented for ppc/musl
56# see utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h 53# see utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
57COMPATIBLE_HOST:libc-musl:powerpc = "null" 54COMPATIBLE_HOST:libc-musl:powerpc = "null"