diff options
author | Yi Zhao <yi.zhao@windriver.com> | 2024-03-21 20:02:21 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2024-03-21 08:46:06 -0700 |
commit | d200b61e2441a303a6de4be04459d61aa51f3005 (patch) | |
tree | 9fdb6c09676ee686090d747fb63948fe3f5761d6 /meta-oe | |
parent | 8f9b4e04b156e64f68171bf1ce5eeeb82ca2a9b0 (diff) | |
download | meta-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')
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 @@ | |||
1 | From 6e376601c990abaa5e261d1311f92acb3b370b8f Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 24 Jan 2023 21:40:43 -0800 | ||
4 | Subject: [PATCH] Add missing includes <cstdint> and <cstdio> | ||
5 | |||
6 | This is needed with GCC 13 and newer [1] | ||
7 | |||
8 | [1] https://www.gnu.org/software/gcc/gcc-13/porting_to.html | ||
9 | |||
10 | Upstream-Status: Backport [https://github.com/facebook/rocksdb/commit/88edfbfb5e1cac228f7cc31fbec24bb637fe54b1] | ||
11 | Signed-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 @@ | |||
1 | From cf168ae0b7bceab8432d096719b331f18428fe39 Mon Sep 17 00:00:00 2001 | 1 | From 034a9c4ce2ae61cfcffa977f1eb8e6f68947f480 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Wed, 18 Mar 2020 15:10:37 -0700 | 3 | Date: Wed, 18 Mar 2020 15:10:37 -0700 |
4 | Subject: [PATCH] cmake: Add check for atomic support | 4 | Subject: [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 | ||
20 | Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/6555] | 20 | Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/6555] |
21 | |||
21 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 22 | Signed-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 | ||
29 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
30 | index 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 "") |
46 | diff --git a/cmake/modules/CheckAtomic.cmake b/cmake/modules/CheckAtomic.cmake | ||
47 | new file mode 100644 | ||
48 | index 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 | -- | ||
122 | 2.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 @@ | |||
1 | From 114c42fba3fc86119710e8dd1bb2b7a9e39e3064 Mon Sep 17 00:00:00 2001 | 1 | From 1ba84e1b8d4c9a3ad85dc443b0df4d79c89cca4b Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Thu, 17 Jun 2021 19:35:01 -0700 | 3 | Date: Thu, 17 Jun 2021 19:35:01 -0700 |
4 | Subject: [PATCH] replace old sync with new atomic builtin equivalents | 4 | Subject: [PATCH] replace old sync with new atomic builtin equivalents |
@@ -6,13 +6,15 @@ Subject: [PATCH] replace old sync with new atomic builtin equivalents | |||
6 | Helps compiling with gcc on newer arches e.g. riscv32 where these | 6 | Helps 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 | ||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | Upstream-Status: Pending | 9 | Upstream-Status: Pending |
12 | 10 | ||
11 | Signed-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 | ||
16 | diff --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 | ||
17 | index 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 | -- | ||
65 | 2.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 @@ | |||
1 | From 46a4e585175cac8d76bd0b64f0fc27c9e22f04a1 Mon Sep 17 00:00:00 2001 | 1 | From bb3fc86f87a9acc64628e1cb32f5c8a1cfbeb880 Mon Sep 17 00:00:00 2001 |
2 | From: Pascal Bach <pascal.bach@nextrem.ch> | 2 | From: Pascal Bach <pascal.bach@nextrem.ch> |
3 | Date: Mon, 12 Oct 2020 21:22:46 +0200 | 3 | Date: Mon, 12 Oct 2020 21:22:46 +0200 |
4 | Subject: [PATCH] cmake: Use exported target for bz2 | 4 | Subject: [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 | ||
9 | Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/7541] | 9 | Upstream-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 | ||
14 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
15 | index 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 | -- | ||
33 | 2.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 @@ | |||
1 | From cedc84a8db468d0b6652e78a8a6667e655586b53 Mon Sep 17 00:00:00 2001 | 1 | From bb10f55eb77be7b7eee94cb3506c9cbef8e24099 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Thu, 26 Jan 2023 13:00:43 -0800 | 3 | Date: Thu, 26 Jan 2023 13:00:43 -0800 |
4 | Subject: [PATCH] cmake: Do not add -msse4.2 -mpclmul on clang | 4 | Subject: [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 | ||
18 | diff --git a/CMakeLists.txt b/CMakeLists.txt | 18 | diff --git a/CMakeLists.txt b/CMakeLists.txt |
19 | index dbef059028..981545a4e0 100644 | 19 | index 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 | -- |
32 | 2.39.1 | 32 | 2.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 @@ | |||
1 | Upstream-Status: Pending | 1 | From c6accd34e8169d7a6b92fc89dce5d4309978e39e Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 21 Mar 2024 14:11:09 +0800 | ||
4 | Subject: [PATCH] Implement support for musl/ppc64 | ||
2 | 5 | ||
3 | implement support for musl/ppc64 | 6 | Upstream-Status: Pending |
4 | 7 | ||
5 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 8 | Signed-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 | |||
13 | diff --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 | ||
14 | index 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 | -- | ||
41 | 2.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 @@ | |||
1 | From 2ebc0ff33e41d23e4d3aec1a86f3d8bd4be410e7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 21 Mar 2024 14:14:58 +0800 | ||
4 | Subject: [PATCH] Implement timer implementation for mips platform | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-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 | |||
13 | diff --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 | ||
14 | index 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 | -- | ||
31 | 2.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 @@ | |||
1 | Upstream-Status: Pending | 1 | From 9e274ba2762724f353227b5a3a6e4433f706468a Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 21 Mar 2024 14:16:08 +0800 | ||
4 | Subject: [PATCH] Implement timer for arm >= v6 | ||
2 | 5 | ||
3 | implement timer for arm >= v6 | 6 | Upstream-Status: Pending |
4 | 7 | ||
5 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 8 | Signed-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 | |||
13 | diff --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 | ||
14 | index 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 | -- | ||
39 | 2.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 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | implement timer implementation for mips platform | ||
4 | |||
5 | Signed-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 | ||
9 | SRCREV = "444b3f4845dd01b0d127c4b420fdd3b50ad56682" | 9 | SRCREV = "f4441966592636253fd5ab0bb9ed44fc2697fc53" |
10 | SRCBRANCH = "7.9.fb" | 10 | SRCBRANCH = "9.0.fb" |
11 | 11 | ||
12 | SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH};protocol=https \ | 12 | SRC_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 | ||
22 | SRC_URI:append:riscv32 = " file://0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch" | 21 | SRC_URI:append:riscv32 = " file://0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch" |
@@ -46,12 +45,10 @@ EXTRA_OECMAKE = "\ | |||
46 | " | 45 | " |
47 | 46 | ||
48 | do_install:append() { | 47 | do_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 | ||
53 | LDFLAGS: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 |
57 | COMPATIBLE_HOST:libc-musl:powerpc = "null" | 54 | COMPATIBLE_HOST:libc-musl:powerpc = "null" |