summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-dbs
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2022-09-11 10:46:23 -0700
committerKhem Raj <raj.khem@gmail.com>2022-09-11 20:42:05 -0700
commit514610e78d8032f9161b0871bc0c5752f2471942 (patch)
tree6f86c1da35b593ca87e43549c69e119b41bf0cdd /meta-oe/recipes-dbs
parent46167832040c7f31e1b0534d18cf97706a315148 (diff)
downloadmeta-openembedded-514610e78d8032f9161b0871bc0c5752f2471942.tar.gz
rocksdb: Upgrade to 7.5.3 release
Drop upstreamed patches and forward port existing ones 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/0001-cmake-Add-check-for-atomic-support.patch4
-rw-r--r--meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Use-exported-target-for-bz2.patch11
-rw-r--r--meta-oe/recipes-dbs/rocksdb/files/0001-folly-Use-SYS_futex-for-syscall.patch42
-rw-r--r--meta-oe/recipes-dbs/rocksdb/files/0001-jemalloc_helper-Limit-the-mm_malloc.h-hack-to-glibc-.patch23
-rw-r--r--meta-oe/recipes-dbs/rocksdb/files/0001-range_tree-Implement-toku_time_now-for-rv32-rv64-in-.patch44
-rw-r--r--meta-oe/recipes-dbs/rocksdb/files/arm.patch2
-rw-r--r--meta-oe/recipes-dbs/rocksdb/files/mips.patch9
-rw-r--r--meta-oe/recipes-dbs/rocksdb/files/ppc64.patch6
-rw-r--r--meta-oe/recipes-dbs/rocksdb/rocksdb_7.5.3.bb (renamed from meta-oe/recipes-dbs/rocksdb/rocksdb_6.20.3.bb)7
9 files changed, 13 insertions, 135 deletions
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 8bdd27ff2..2906100de 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
@@ -27,7 +27,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
27 27
28--- a/CMakeLists.txt 28--- a/CMakeLists.txt
29+++ b/CMakeLists.txt 29+++ b/CMakeLists.txt
30@@ -935,7 +935,12 @@ endif() 30@@ -1000,7 +1000,12 @@ option(ROCKSDB_BUILD_SHARED "Build share
31 if(WIN32) 31 if(WIN32)
32 set(SYSTEM_LIBS ${SYSTEM_LIBS} shlwapi.lib rpcrt4.lib) 32 set(SYSTEM_LIBS ${SYSTEM_LIBS} shlwapi.lib rpcrt4.lib)
33 else() 33 else()
@@ -39,7 +39,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
39+ endif() 39+ endif()
40 endif() 40 endif()
41 41
42 add_library(${ROCKSDB_STATIC_LIB} STATIC ${SOURCES} ${BUILD_VERSION_CC}) 42 set(ROCKSDB_PLUGIN_EXTERNS "")
43--- /dev/null 43--- /dev/null
44+++ b/cmake/modules/CheckAtomic.cmake 44+++ b/cmake/modules/CheckAtomic.cmake
45@@ -0,0 +1,69 @@ 45@@ -0,0 +1,69 @@
diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Use-exported-target-for-bz2.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Use-exported-target-for-bz2.patch
index d3054759a..139312a29 100644
--- a/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Use-exported-target-for-bz2.patch
+++ b/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Use-exported-target-for-bz2.patch
@@ -13,16 +13,7 @@ Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/7541]
13 13
14--- a/CMakeLists.txt 14--- a/CMakeLists.txt
15+++ b/CMakeLists.txt 15+++ b/CMakeLists.txt
16@@ -32,7 +32,7 @@ 16@@ -153,12 +153,7 @@ else()
17 # 3. cmake ..
18 # 4. make -j
19
20-cmake_minimum_required(VERSION 3.5.1)
21+cmake_minimum_required(VERSION 3.7.2)
22
23 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/modules/")
24 include(ReadVersion)
25@@ -152,12 +152,7 @@ else()
26 if(WITH_BZ2) 17 if(WITH_BZ2)
27 find_package(BZip2 REQUIRED) 18 find_package(BZip2 REQUIRED)
28 add_definitions(-DBZIP2) 19 add_definitions(-DBZIP2)
diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-folly-Use-SYS_futex-for-syscall.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-folly-Use-SYS_futex-for-syscall.patch
deleted file mode 100644
index 9c70d4f6a..000000000
--- a/meta-oe/recipes-dbs/rocksdb/files/0001-folly-Use-SYS_futex-for-syscall.patch
+++ /dev/null
@@ -1,42 +0,0 @@
1From ddcc8a9f7e0f0bfee96f2f0a0c10f21f9fa9b05d Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 15 Nov 2020 15:02:28 -0800
4Subject: [PATCH] folly: Use SYS_futex for syscall
5
6glibc defines SYS_futex and on newer 32bit CPUs like RISCV-32, arc there
7is no 32bit time_t therefore define SYS_futex in terms of SYS_futex_time64
8
9Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/7676]
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 third-party/folly/folly/detail/Futex.cpp | 10 ++++++++--
13 1 file changed, 8 insertions(+), 2 deletions(-)
14
15--- a/third-party/folly/folly/detail/Futex.cpp
16+++ b/third-party/folly/folly/detail/Futex.cpp
17@@ -48,9 +48,15 @@ namespace {
18 #define FUTEX_CLOCK_REALTIME 256
19 #endif
20
21+/// Newer 32bit CPUs eg. RISCV-32 are defaulting to 64bit time_t from get go and
22+/// therefore do not define __NR_futex
23+#if !defined(SYS_futex) && defined(SYS_futex_time64)
24+# define SYS_futex SYS_futex_time64
25+#endif
26+
27 int nativeFutexWake(const void* addr, int count, uint32_t wakeMask) {
28 long rv = syscall(
29- __NR_futex,
30+ SYS_futex,
31 addr, /* addr1 */
32 FUTEX_WAKE_BITSET | FUTEX_PRIVATE_FLAG, /* op */
33 count, /* val */
34@@ -112,7 +118,7 @@ FutexResult nativeFutexWaitImpl(
35 // Unlike FUTEX_WAIT, FUTEX_WAIT_BITSET requires an absolute timeout
36 // value - http://locklessinc.com/articles/futex_cheat_sheet/
37 long rv = syscall(
38- __NR_futex,
39+ SYS_futex,
40 addr, /* addr1 */
41 op, /* op */
42 expected, /* val */
diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-jemalloc_helper-Limit-the-mm_malloc.h-hack-to-glibc-.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-jemalloc_helper-Limit-the-mm_malloc.h-hack-to-glibc-.patch
deleted file mode 100644
index dbb0dda22..000000000
--- a/meta-oe/recipes-dbs/rocksdb/files/0001-jemalloc_helper-Limit-the-mm_malloc.h-hack-to-glibc-.patch
+++ /dev/null
@@ -1,23 +0,0 @@
1From 1a69d4cc3f97e348dba9714c7ec60da1a8650664 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 15 Jun 2021 22:05:36 -0700
4Subject: [PATCH] jemalloc_helper: Limit the mm_malloc.h hack to glibc on linux
5
6Musl does not need this hack
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 port/jemalloc_helper.h | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13--- a/port/jemalloc_helper.h
14+++ b/port/jemalloc_helper.h
15@@ -5,7 +5,7 @@
16
17 #pragma once
18
19-#if defined(__clang__)
20+#if defined(__clang__) && defined(__GLIBC__)
21 // glibc's `posix_memalign()` declaration specifies `throw()` while clang's
22 // declaration does not. There is a hack in clang to make its re-declaration
23 // compatible with glibc's if they are declared consecutively. That hack breaks
diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-range_tree-Implement-toku_time_now-for-rv32-rv64-in-.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-range_tree-Implement-toku_time_now-for-rv32-rv64-in-.patch
deleted file mode 100644
index 86c1bffea..000000000
--- a/meta-oe/recipes-dbs/rocksdb/files/0001-range_tree-Implement-toku_time_now-for-rv32-rv64-in-.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1From 89c032a9b4011385c0b504ea61e5df0db71f0ff5 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 16 Jun 2021 19:06:02 -0700
4Subject: [PATCH] range_tree: Implement toku_time_now for rv32/rv64 in asm
5
6Upstream-Status: Pending
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8---
9 .../range_tree/lib/portability/toku_time.h | 19 +++++++++++++++++++
10 1 file changed, 19 insertions(+)
11
12diff --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
13index 4425a4a2e..4ac964f85 100644
14--- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
15+++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
16@@ -133,6 +133,25 @@ static inline tokutime_t toku_time_now(void) {
17 return result;
18 #elif defined(__powerpc__)
19 return __ppc_get_timebase();
20+#elif defined(__riscv) // RISC-V
21+#if __riscv_xlen == 32
22+ uint32_t lo, hi0, hi1;
23+ __asm __volatile__(
24+ "rdcycleh %0\n"
25+ "rdcycle %1\n"
26+ "rdcycleh %2\n"
27+ "sub %0, %0, %2\n"
28+ "seqz %0, %0\n"
29+ "sub %0, zero, %0\n"
30+ "and %1, %1, %0\n"
31+ : "=r"(hi0), "=r"(lo), "=r"(hi1));
32+ return ((uint64_t)hi1 << 32) | lo;
33+#else
34+ uint64_t result;
35+ __asm __volatile__("rdcycle %0" : "=r"(result));
36+ return result;
37+#endif
38+
39 #else
40 #error No timer implementation for this platform
41 #endif
42--
432.32.0
44
diff --git a/meta-oe/recipes-dbs/rocksdb/files/arm.patch b/meta-oe/recipes-dbs/rocksdb/files/arm.patch
index d428a6624..573767797 100644
--- a/meta-oe/recipes-dbs/rocksdb/files/arm.patch
+++ b/meta-oe/recipes-dbs/rocksdb/files/arm.patch
@@ -3,7 +3,7 @@ implement timer for arm >= v6
3Signed-off-by: Khem Raj <raj.khem@gmail.com> 3Signed-off-by: Khem Raj <raj.khem@gmail.com>
4--- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h 4--- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
5+++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h 5+++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
6@@ -161,6 +161,20 @@ static inline tokutime_t toku_time_now(v 6@@ -164,6 +164,20 @@ static inline tokutime_t toku_time_now(v
7 struct timeval tv; 7 struct timeval tv;
8 gettimeofday(&tv, nullptr); 8 gettimeofday(&tv, nullptr);
9 return (uint64_t)tv.tv_sec * 1000000 + tv.tv_usec; 9 return (uint64_t)tv.tv_sec * 1000000 + tv.tv_usec;
diff --git a/meta-oe/recipes-dbs/rocksdb/files/mips.patch b/meta-oe/recipes-dbs/rocksdb/files/mips.patch
index db2305d29..0104d5434 100644
--- a/meta-oe/recipes-dbs/rocksdb/files/mips.patch
+++ b/meta-oe/recipes-dbs/rocksdb/files/mips.patch
@@ -3,11 +3,10 @@ implement timer implementation for mips platform
3Signed-off-by: Khem Raj <raj.khem@gmail.com> 3Signed-off-by: Khem Raj <raj.khem@gmail.com>
4--- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h 4--- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
5+++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h 5+++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
6@@ -155,7 +155,12 @@ static inline tokutime_t toku_time_now(v 6@@ -158,6 +158,12 @@ static inline tokutime_t toku_time_now(v
7 __asm __volatile__("rdcycle %0" : "=r"(result)); 7 uint64_t cycles;
8 return result; 8 asm volatile("rdcycle %0" : "=r"(cycles));
9 #endif 9 return cycles;
10-
11+#elif defined(__mips__) 10+#elif defined(__mips__)
12+ // mips apparently only allows rdtsc for superusers, so we fall 11+ // mips apparently only allows rdtsc for superusers, so we fall
13+ // back to gettimeofday. It's possible clock_gettime would be better. 12+ // back to gettimeofday. It's possible clock_gettime would be better.
diff --git a/meta-oe/recipes-dbs/rocksdb/files/ppc64.patch b/meta-oe/recipes-dbs/rocksdb/files/ppc64.patch
index bc40f1b1e..45deef338 100644
--- a/meta-oe/recipes-dbs/rocksdb/files/ppc64.patch
+++ b/meta-oe/recipes-dbs/rocksdb/files/ppc64.patch
@@ -23,6 +23,6 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
23+ uint64_t result; 23+ uint64_t result;
24+ asm volatile("mfspr %0, 268" : "=r"(result)); 24+ asm volatile("mfspr %0, 268" : "=r"(result));
25+ return result; 25+ return result;
26 #elif defined(__riscv) // RISC-V 26 #elif defined(__s390x__)
27 #if __riscv_xlen == 32 27 uint64_t result;
28 uint32_t lo, hi0, hi1; 28 asm volatile("stckf %0" : "=Q"(result) : : "cc");
diff --git a/meta-oe/recipes-dbs/rocksdb/rocksdb_6.20.3.bb b/meta-oe/recipes-dbs/rocksdb/rocksdb_7.5.3.bb
index 2ad2d38a5..d4f0346ee 100644
--- a/meta-oe/recipes-dbs/rocksdb/rocksdb_6.20.3.bb
+++ b/meta-oe/recipes-dbs/rocksdb/rocksdb_7.5.3.bb
@@ -6,15 +6,12 @@ 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 = "8608d75d85f8e1b3b64b73a4fb6d19baec61ba5c" 9SRCREV = "540d5aae516265170564ec27b3e67a54a11b7045"
10SRCBRANCH = "6.20.fb" 10SRCBRANCH = "7.5.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://0001-cmake-Use-exported-target-for-bz2.patch \
15 file://0001-folly-Use-SYS_futex-for-syscall.patch \
16 file://0001-jemalloc_helper-Limit-the-mm_malloc.h-hack-to-glibc-.patch \
17 file://0001-range_tree-Implement-toku_time_now-for-rv32-rv64-in-.patch \
18 file://ppc64.patch \ 15 file://ppc64.patch \
19 file://mips.patch \ 16 file://mips.patch \
20 file://arm.patch \ 17 file://arm.patch \