diff options
-rw-r--r-- | meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Add-check-for-atomic-support.patch | 4 | ||||
-rw-r--r-- | meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Use-exported-target-for-bz2.patch | 11 | ||||
-rw-r--r-- | meta-oe/recipes-dbs/rocksdb/files/0001-folly-Use-SYS_futex-for-syscall.patch | 42 | ||||
-rw-r--r-- | meta-oe/recipes-dbs/rocksdb/files/0001-jemalloc_helper-Limit-the-mm_malloc.h-hack-to-glibc-.patch | 23 | ||||
-rw-r--r-- | meta-oe/recipes-dbs/rocksdb/files/0001-range_tree-Implement-toku_time_now-for-rv32-rv64-in-.patch | 44 | ||||
-rw-r--r-- | meta-oe/recipes-dbs/rocksdb/files/arm.patch | 2 | ||||
-rw-r--r-- | meta-oe/recipes-dbs/rocksdb/files/mips.patch | 9 | ||||
-rw-r--r-- | meta-oe/recipes-dbs/rocksdb/files/ppc64.patch | 6 | ||||
-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 8bdd27ff25..2906100dee 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 d3054759a7..139312a298 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 9c70d4f6a6..0000000000 --- a/meta-oe/recipes-dbs/rocksdb/files/0001-folly-Use-SYS_futex-for-syscall.patch +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | From ddcc8a9f7e0f0bfee96f2f0a0c10f21f9fa9b05d Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sun, 15 Nov 2020 15:02:28 -0800 | ||
4 | Subject: [PATCH] folly: Use SYS_futex for syscall | ||
5 | |||
6 | glibc defines SYS_futex and on newer 32bit CPUs like RISCV-32, arc there | ||
7 | is no 32bit time_t therefore define SYS_futex in terms of SYS_futex_time64 | ||
8 | |||
9 | Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/7676] | ||
10 | Signed-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 dbb0dda221..0000000000 --- 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 @@ | |||
1 | From 1a69d4cc3f97e348dba9714c7ec60da1a8650664 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 15 Jun 2021 22:05:36 -0700 | ||
4 | Subject: [PATCH] jemalloc_helper: Limit the mm_malloc.h hack to glibc on linux | ||
5 | |||
6 | Musl does not need this hack | ||
7 | |||
8 | Signed-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 86c1bffea6..0000000000 --- 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 @@ | |||
1 | From 89c032a9b4011385c0b504ea61e5df0db71f0ff5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 16 Jun 2021 19:06:02 -0700 | ||
4 | Subject: [PATCH] range_tree: Implement toku_time_now for rv32/rv64 in asm | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | Signed-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 | |||
12 | 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 | ||
13 | index 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 | -- | ||
43 | 2.32.0 | ||
44 | |||
diff --git a/meta-oe/recipes-dbs/rocksdb/files/arm.patch b/meta-oe/recipes-dbs/rocksdb/files/arm.patch index d428a6624a..573767797d 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 | |||
3 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 3 | Signed-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 db2305d296..0104d54347 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 | |||
3 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 3 | Signed-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 bc40f1b1e7..45deef338c 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 2ad2d38a53..d4f0346ee1 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 | ||
9 | SRCREV = "8608d75d85f8e1b3b64b73a4fb6d19baec61ba5c" | 9 | SRCREV = "540d5aae516265170564ec27b3e67a54a11b7045" |
10 | SRCBRANCH = "6.20.fb" | 10 | SRCBRANCH = "7.5.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://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 \ |