diff options
author | Pascal Bach <pascal.bach@siemens.com> | 2020-10-13 09:21:46 +0200 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2020-10-13 10:37:48 -0700 |
commit | 173137b08e8241b4766ca1e3ef5130f55306f7f7 (patch) | |
tree | 14f9d02e3b9f35dc820f18909057c0f836b3a01c /meta-oe | |
parent | 1cd14bf12472970d75df3172a2b9b0dff71da655 (diff) | |
download | meta-openembedded-173137b08e8241b4766ca1e3ef5130f55306f7f7.tar.gz |
rocksdb: 6.6.4 -> 6.11.4
- Thread patch was fixed upstream
- CMake atomic patch is still pending but was refreshed
- Additional patch for proper bz2 support in CMake added.
Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe')
4 files changed, 63 insertions, 43 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 9bfb1f31d..eb9928a0c 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 ba0a0e54d9544babbd3963891f4e3200dd5583f5 Mon Sep 17 00:00:00 2001 | 1 | From cf168ae0b7bceab8432d096719b331f18428fe39 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 |
@@ -20,27 +20,31 @@ Fixes | |||
20 | Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/6555] | 20 | Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/6555] |
21 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 21 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
22 | --- | 22 | --- |
23 | CMakeLists.txt | 6 +++ | 23 | CMakeLists.txt | 5 +++ |
24 | cmake/modules/CheckAtomic.cmake | 69 +++++++++++++++++++++++++++++++++ | 24 | cmake/modules/CheckAtomic.cmake | 69 +++++++++++++++++++++++++++++++++ |
25 | 2 files changed, 75 insertions(+) | 25 | 2 files changed, 74 insertions(+) |
26 | create mode 100644 cmake/modules/CheckAtomic.cmake | 26 | create mode 100644 cmake/modules/CheckAtomic.cmake |
27 | 27 | ||
28 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
29 | index f9c8f3346..4d604004b 100644 | ||
28 | --- a/CMakeLists.txt | 30 | --- a/CMakeLists.txt |
29 | +++ b/CMakeLists.txt | 31 | +++ b/CMakeLists.txt |
30 | @@ -780,7 +780,13 @@ if(WIN32) | 32 | @@ -852,7 +852,12 @@ endif() |
33 | if(WIN32) | ||
31 | set(SYSTEM_LIBS ${SYSTEM_LIBS} shlwapi.lib rpcrt4.lib) | 34 | set(SYSTEM_LIBS ${SYSTEM_LIBS} shlwapi.lib rpcrt4.lib) |
32 | set(LIBS ${ROCKSDB_STATIC_LIB} ${THIRDPARTY_LIBS} ${SYSTEM_LIBS}) | ||
33 | else() | 35 | else() |
34 | + # check if linking against libatomic is necessary | 36 | + # check if linking against libatomic is necessary |
35 | + include(CheckAtomic) | 37 | + include(CheckAtomic) |
36 | + | ||
37 | set(SYSTEM_LIBS ${CMAKE_THREAD_LIBS_INIT}) | 38 | set(SYSTEM_LIBS ${CMAKE_THREAD_LIBS_INIT}) |
38 | + if(HAVE_CXX_ATOMIC_WITH_LIB OR HAVE_CXX_ATOMICS64_WITH_LIB) | 39 | + if(HAVE_CXX_ATOMIC_WITH_LIB OR HAVE_CXX_ATOMICS64_WITH_LIB) |
39 | + set(SYSTEM_LIBS ${SYSTEM_LIBS} atomic) | 40 | + set(SYSTEM_LIBS ${SYSTEM_LIBS} atomic) |
40 | + endif() | 41 | + endif() |
41 | set(LIBS ${ROCKSDB_SHARED_LIB} ${THIRDPARTY_LIBS} ${SYSTEM_LIBS}) | 42 | endif() |
42 | 43 | ||
43 | add_library(${ROCKSDB_SHARED_LIB} SHARED ${SOURCES}) | 44 | add_library(${ROCKSDB_STATIC_LIB} STATIC ${SOURCES}) |
45 | diff --git a/cmake/modules/CheckAtomic.cmake b/cmake/modules/CheckAtomic.cmake | ||
46 | new file mode 100644 | ||
47 | index 000000000..8b7dc8a37 | ||
44 | --- /dev/null | 48 | --- /dev/null |
45 | +++ b/cmake/modules/CheckAtomic.cmake | 49 | +++ b/cmake/modules/CheckAtomic.cmake |
46 | @@ -0,0 +1,69 @@ | 50 | @@ -0,0 +1,69 @@ |
@@ -113,3 +117,6 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
113 | + endif() | 117 | + endif() |
114 | +endif() | 118 | +endif() |
115 | + | 119 | + |
120 | -- | ||
121 | 2.28.0 | ||
122 | |||
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 new file mode 100644 index 000000000..57433b057 --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Use-exported-target-for-bz2.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From 46a4e585175cac8d76bd0b64f0fc27c9e22f04a1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Pascal Bach <pascal.bach@nextrem.ch> | ||
3 | Date: Mon, 12 Oct 2020 21:22:46 +0200 | ||
4 | Subject: [PATCH] cmake: Use exported target for bz2 | ||
5 | |||
6 | Without this change, CMake puts the entire path into the generated file. | ||
7 | This is not portable and makes it fail in environment like Yocto. | ||
8 | |||
9 | Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/7541] | ||
10 | --- | ||
11 | CMakeLists.txt | 9 ++------- | ||
12 | 1 file changed, 2 insertions(+), 7 deletions(-) | ||
13 | |||
14 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
15 | index 676192913..801586c30 100644 | ||
16 | --- a/CMakeLists.txt | ||
17 | +++ b/CMakeLists.txt | ||
18 | @@ -32,7 +32,7 @@ | ||
19 | # 3. cmake .. | ||
20 | # 4. make -j | ||
21 | |||
22 | -cmake_minimum_required(VERSION 3.5.1) | ||
23 | +cmake_minimum_required(VERSION 3.7.2) | ||
24 | |||
25 | list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/modules/") | ||
26 | include(ReadVersion) | ||
27 | @@ -148,12 +148,7 @@ else() | ||
28 | if(WITH_BZ2) | ||
29 | find_package(BZip2 REQUIRED) | ||
30 | add_definitions(-DBZIP2) | ||
31 | - if(BZIP2_INCLUDE_DIRS) | ||
32 | - include_directories(${BZIP2_INCLUDE_DIRS}) | ||
33 | - else() | ||
34 | - include_directories(${BZIP2_INCLUDE_DIR}) | ||
35 | - endif() | ||
36 | - list(APPEND THIRDPARTY_LIBS ${BZIP2_LIBRARIES}) | ||
37 | + list(APPEND THIRDPARTY_LIBS BZip2::BZip2) | ||
38 | endif() | ||
39 | |||
40 | if(WITH_LZ4) | ||
41 | -- | ||
42 | 2.28.0 | ||
43 | |||
diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-db-write_thread.cc-Initialize-state.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-db-write_thread.cc-Initialize-state.patch deleted file mode 100644 index 97ddbce59..000000000 --- a/meta-oe/recipes-dbs/rocksdb/files/0001-db-write_thread.cc-Initialize-state.patch +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | From 49dcd22dcf1aae5995c42eac0fda68516fc1cd43 Mon Sep 17 00:00:00 2001 | ||
2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
3 | Date: Wed, 19 Jun 2019 17:57:24 +0800 | ||
4 | Subject: [PATCH] db/write_thread.cc: Initialize state | ||
5 | |||
6 | Fixed an error when compiled without -O2: | ||
7 | db/write_thread.cc:183:14: error: 'state' may be used uninitialized in this function [-Werror=maybe-uninitialized] | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
12 | --- | ||
13 | db/write_thread.cc | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/db/write_thread.cc b/db/write_thread.cc | ||
17 | index 835992c..6f99a11 100644 | ||
18 | --- a/db/write_thread.cc | ||
19 | +++ b/db/write_thread.cc | ||
20 | @@ -59,7 +59,7 @@ uint8_t WriteThread::BlockingAwaitState(Writer* w, uint8_t goal_mask) { | ||
21 | |||
22 | uint8_t WriteThread::AwaitState(Writer* w, uint8_t goal_mask, | ||
23 | AdaptationContext* ctx) { | ||
24 | - uint8_t state; | ||
25 | + uint8_t state = 0; | ||
26 | |||
27 | // 1. Busy loop using "pause" for 1 micro sec | ||
28 | // 2. Else SOMETIMES busy loop using "yield" for 100 micro sec (default) | ||
29 | -- | ||
30 | 2.7.4 | ||
31 | |||
diff --git a/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb b/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb index b9038df81..7ebc5ab1d 100644 --- a/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb +++ b/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb | |||
@@ -6,13 +6,13 @@ 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 = "551a110918493a19d11243f53408b97485de1411" | 9 | SRCREV = "48bfca38f6f175435052a59791922a1a453d9609" |
10 | SRCBRANCH = "6.6.fb" | 10 | SRCBRANCH = "6.11.fb" |
11 | PV = "6.6.4" | 11 | PV = "6.11.4" |
12 | 12 | ||
13 | SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH} \ | 13 | SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH} \ |
14 | file://0001-db-write_thread.cc-Initialize-state.patch \ | ||
15 | file://0001-cmake-Add-check-for-atomic-support.patch \ | 14 | file://0001-cmake-Add-check-for-atomic-support.patch \ |
15 | file://0001-cmake-Use-exported-target-for-bz2.patch \ | ||
16 | " | 16 | " |
17 | 17 | ||
18 | S = "${WORKDIR}/git" | 18 | S = "${WORKDIR}/git" |
@@ -31,6 +31,7 @@ PACKAGECONFIG[gflags] = "-DWITH_GFLAGS=ON,-DWITH_GFLAGS=OFF,gflags" | |||
31 | EXTRA_OECMAKE = "\ | 31 | EXTRA_OECMAKE = "\ |
32 | -DPORTABLE=ON \ | 32 | -DPORTABLE=ON \ |
33 | -DWITH_TESTS=OFF \ | 33 | -DWITH_TESTS=OFF \ |
34 | -DWITH_BENCHMARK_TOOLS=OFF \ | ||
34 | -DWITH_TOOLS=OFF \ | 35 | -DWITH_TOOLS=OFF \ |
35 | -DFAIL_ON_WARNINGS=OFF \ | 36 | -DFAIL_ON_WARNINGS=OFF \ |
36 | " | 37 | " |