mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-04 14:39:54 +00:00
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>
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
From ba0a0e54d9544babbd3963891f4e3200dd5583f5 Mon Sep 17 00:00:00 2001
|
From cf168ae0b7bceab8432d096719b331f18428fe39 Mon Sep 17 00:00:00 2001
|
||||||
From: Khem Raj <raj.khem@gmail.com>
|
From: Khem Raj <raj.khem@gmail.com>
|
||||||
Date: Wed, 18 Mar 2020 15:10:37 -0700
|
Date: Wed, 18 Mar 2020 15:10:37 -0700
|
||||||
Subject: [PATCH] cmake: Add check for atomic support
|
Subject: [PATCH] cmake: Add check for atomic support
|
||||||
@@ -20,27 +20,31 @@ Fixes
|
|||||||
Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/6555]
|
Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/6555]
|
||||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||||
---
|
---
|
||||||
CMakeLists.txt | 6 +++
|
CMakeLists.txt | 5 +++
|
||||||
cmake/modules/CheckAtomic.cmake | 69 +++++++++++++++++++++++++++++++++
|
cmake/modules/CheckAtomic.cmake | 69 +++++++++++++++++++++++++++++++++
|
||||||
2 files changed, 75 insertions(+)
|
2 files changed, 74 insertions(+)
|
||||||
create mode 100644 cmake/modules/CheckAtomic.cmake
|
create mode 100644 cmake/modules/CheckAtomic.cmake
|
||||||
|
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index f9c8f3346..4d604004b 100644
|
||||||
--- a/CMakeLists.txt
|
--- a/CMakeLists.txt
|
||||||
+++ b/CMakeLists.txt
|
+++ b/CMakeLists.txt
|
||||||
@@ -780,7 +780,13 @@ if(WIN32)
|
@@ -852,7 +852,12 @@ endif()
|
||||||
|
if(WIN32)
|
||||||
set(SYSTEM_LIBS ${SYSTEM_LIBS} shlwapi.lib rpcrt4.lib)
|
set(SYSTEM_LIBS ${SYSTEM_LIBS} shlwapi.lib rpcrt4.lib)
|
||||||
set(LIBS ${ROCKSDB_STATIC_LIB} ${THIRDPARTY_LIBS} ${SYSTEM_LIBS})
|
|
||||||
else()
|
else()
|
||||||
+ # check if linking against libatomic is necessary
|
+ # check if linking against libatomic is necessary
|
||||||
+ include(CheckAtomic)
|
+ include(CheckAtomic)
|
||||||
+
|
|
||||||
set(SYSTEM_LIBS ${CMAKE_THREAD_LIBS_INIT})
|
set(SYSTEM_LIBS ${CMAKE_THREAD_LIBS_INIT})
|
||||||
+ if(HAVE_CXX_ATOMIC_WITH_LIB OR HAVE_CXX_ATOMICS64_WITH_LIB)
|
+ if(HAVE_CXX_ATOMIC_WITH_LIB OR HAVE_CXX_ATOMICS64_WITH_LIB)
|
||||||
+ set(SYSTEM_LIBS ${SYSTEM_LIBS} atomic)
|
+ set(SYSTEM_LIBS ${SYSTEM_LIBS} atomic)
|
||||||
+ endif()
|
+ endif()
|
||||||
set(LIBS ${ROCKSDB_SHARED_LIB} ${THIRDPARTY_LIBS} ${SYSTEM_LIBS})
|
endif()
|
||||||
|
|
||||||
add_library(${ROCKSDB_SHARED_LIB} SHARED ${SOURCES})
|
add_library(${ROCKSDB_STATIC_LIB} STATIC ${SOURCES})
|
||||||
|
diff --git a/cmake/modules/CheckAtomic.cmake b/cmake/modules/CheckAtomic.cmake
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000..8b7dc8a37
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/cmake/modules/CheckAtomic.cmake
|
+++ b/cmake/modules/CheckAtomic.cmake
|
||||||
@@ -0,0 +1,69 @@
|
@@ -0,0 +1,69 @@
|
||||||
@@ -113,3 +117,6 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|||||||
+ endif()
|
+ endif()
|
||||||
+endif()
|
+endif()
|
||||||
+
|
+
|
||||||
|
--
|
||||||
|
2.28.0
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
From 46a4e585175cac8d76bd0b64f0fc27c9e22f04a1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pascal Bach <pascal.bach@nextrem.ch>
|
||||||
|
Date: Mon, 12 Oct 2020 21:22:46 +0200
|
||||||
|
Subject: [PATCH] cmake: Use exported target for bz2
|
||||||
|
|
||||||
|
Without this change, CMake puts the entire path into the generated file.
|
||||||
|
This is not portable and makes it fail in environment like Yocto.
|
||||||
|
|
||||||
|
Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/7541]
|
||||||
|
---
|
||||||
|
CMakeLists.txt | 9 ++-------
|
||||||
|
1 file changed, 2 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 676192913..801586c30 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -32,7 +32,7 @@
|
||||||
|
# 3. cmake ..
|
||||||
|
# 4. make -j
|
||||||
|
|
||||||
|
-cmake_minimum_required(VERSION 3.5.1)
|
||||||
|
+cmake_minimum_required(VERSION 3.7.2)
|
||||||
|
|
||||||
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/modules/")
|
||||||
|
include(ReadVersion)
|
||||||
|
@@ -148,12 +148,7 @@ else()
|
||||||
|
if(WITH_BZ2)
|
||||||
|
find_package(BZip2 REQUIRED)
|
||||||
|
add_definitions(-DBZIP2)
|
||||||
|
- if(BZIP2_INCLUDE_DIRS)
|
||||||
|
- include_directories(${BZIP2_INCLUDE_DIRS})
|
||||||
|
- else()
|
||||||
|
- include_directories(${BZIP2_INCLUDE_DIR})
|
||||||
|
- endif()
|
||||||
|
- list(APPEND THIRDPARTY_LIBS ${BZIP2_LIBRARIES})
|
||||||
|
+ list(APPEND THIRDPARTY_LIBS BZip2::BZip2)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(WITH_LZ4)
|
||||||
|
--
|
||||||
|
2.28.0
|
||||||
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
From 49dcd22dcf1aae5995c42eac0fda68516fc1cd43 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Robert Yang <liezhi.yang@windriver.com>
|
|
||||||
Date: Wed, 19 Jun 2019 17:57:24 +0800
|
|
||||||
Subject: [PATCH] db/write_thread.cc: Initialize state
|
|
||||||
|
|
||||||
Fixed an error when compiled without -O2:
|
|
||||||
db/write_thread.cc:183:14: error: 'state' may be used uninitialized in this function [-Werror=maybe-uninitialized]
|
|
||||||
|
|
||||||
Upstream-Status: Pending
|
|
||||||
|
|
||||||
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
|
|
||||||
---
|
|
||||||
db/write_thread.cc | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/db/write_thread.cc b/db/write_thread.cc
|
|
||||||
index 835992c..6f99a11 100644
|
|
||||||
--- a/db/write_thread.cc
|
|
||||||
+++ b/db/write_thread.cc
|
|
||||||
@@ -59,7 +59,7 @@ uint8_t WriteThread::BlockingAwaitState(Writer* w, uint8_t goal_mask) {
|
|
||||||
|
|
||||||
uint8_t WriteThread::AwaitState(Writer* w, uint8_t goal_mask,
|
|
||||||
AdaptationContext* ctx) {
|
|
||||||
- uint8_t state;
|
|
||||||
+ uint8_t state = 0;
|
|
||||||
|
|
||||||
// 1. Busy loop using "pause" for 1 micro sec
|
|
||||||
// 2. Else SOMETIMES busy loop using "yield" for 100 micro sec (default)
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
||||||
@@ -6,13 +6,13 @@ LIC_FILES_CHKSUM = "file://LICENSE.Apache;md5=3b83ef96387f14655fc854ddc3c6bd57 \
|
|||||||
file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
|
file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
|
||||||
file://LICENSE.leveldb;md5=fb04ff57a14f308f2eed4a9b87d45837"
|
file://LICENSE.leveldb;md5=fb04ff57a14f308f2eed4a9b87d45837"
|
||||||
|
|
||||||
SRCREV = "551a110918493a19d11243f53408b97485de1411"
|
SRCREV = "48bfca38f6f175435052a59791922a1a453d9609"
|
||||||
SRCBRANCH = "6.6.fb"
|
SRCBRANCH = "6.11.fb"
|
||||||
PV = "6.6.4"
|
PV = "6.11.4"
|
||||||
|
|
||||||
SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH} \
|
SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH} \
|
||||||
file://0001-db-write_thread.cc-Initialize-state.patch \
|
|
||||||
file://0001-cmake-Add-check-for-atomic-support.patch \
|
file://0001-cmake-Add-check-for-atomic-support.patch \
|
||||||
|
file://0001-cmake-Use-exported-target-for-bz2.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
S = "${WORKDIR}/git"
|
||||||
@@ -31,6 +31,7 @@ PACKAGECONFIG[gflags] = "-DWITH_GFLAGS=ON,-DWITH_GFLAGS=OFF,gflags"
|
|||||||
EXTRA_OECMAKE = "\
|
EXTRA_OECMAKE = "\
|
||||||
-DPORTABLE=ON \
|
-DPORTABLE=ON \
|
||||||
-DWITH_TESTS=OFF \
|
-DWITH_TESTS=OFF \
|
||||||
|
-DWITH_BENCHMARK_TOOLS=OFF \
|
||||||
-DWITH_TOOLS=OFF \
|
-DWITH_TOOLS=OFF \
|
||||||
-DFAIL_ON_WARNINGS=OFF \
|
-DFAIL_ON_WARNINGS=OFF \
|
||||||
"
|
"
|
||||||
|
|||||||
Reference in New Issue
Block a user