summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-dbs
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-02-12 15:12:08 -0800
committerKhem Raj <raj.khem@gmail.com>2019-02-13 09:27:22 -0800
commitc06db080f2331d98fb5877531baf7d0da95fba55 (patch)
treef489ec0e2bedd6a5d0a8df423aed834e3b8d886b /meta-oe/recipes-dbs
parent8005771517d445d99914bf06ec5af305ca0d406c (diff)
downloadmeta-openembedded-c06db080f2331d98fb5877531baf7d0da95fba55.tar.gz
rocksdb: Fix build with clang
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-Disable-Wshadow-and-do-not-mark-default-copy-constru.patch57
-rw-r--r--meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb1
2 files changed, 58 insertions, 0 deletions
diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-Disable-Wshadow-and-do-not-mark-default-copy-constru.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-Disable-Wshadow-and-do-not-mark-default-copy-constru.patch
new file mode 100644
index 000000000..eccaa3a37
--- /dev/null
+++ b/meta-oe/recipes-dbs/rocksdb/files/0001-Disable-Wshadow-and-do-not-mark-default-copy-constru.patch
@@ -0,0 +1,57 @@
1From ee728434124b9b7d17abbd060a62aac79a9b79c0 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 12 Feb 2019 14:31:24 -0800
4Subject: [PATCH] Disable -Wshadow and do not mark default copy constructors
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8 CMakeLists.txt | 2 +-
9 utilities/persistent_cache/block_cache_tier.h | 4 ++--
10 utilities/persistent_cache/block_cache_tier_file.h | 2 +-
11 3 files changed, 4 insertions(+), 4 deletions(-)
12
13diff --git a/CMakeLists.txt b/CMakeLists.txt
14index 98e2e1973..3a24a075b 100644
15--- a/CMakeLists.txt
16+++ b/CMakeLists.txt
17@@ -254,7 +254,7 @@ if(FAIL_ON_WARNINGS)
18 if(MSVC)
19 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")
20 else() # assume GCC
21- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
22+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wno-error=shadow")
23 endif()
24 endif()
25
26diff --git a/utilities/persistent_cache/block_cache_tier.h b/utilities/persistent_cache/block_cache_tier.h
27index 2b2c0ef4f..96d0540a4 100644
28--- a/utilities/persistent_cache/block_cache_tier.h
29+++ b/utilities/persistent_cache/block_cache_tier.h
30@@ -91,9 +91,9 @@ class BlockCacheTier : public PersistentCacheTier {
31 : key_(std::move(key)), data_(data) {}
32 ~InsertOp() {}
33
34- InsertOp() = delete;
35+ InsertOp() = default;
36 InsertOp(InsertOp&& /*rhs*/) = default;
37- InsertOp& operator=(InsertOp&& rhs) = default;
38+ InsertOp& operator=(InsertOp&& rhs) = delete;
39
40 // used for estimating size by bounded queue
41 size_t Size() { return data_.size() + key_.size(); }
42diff --git a/utilities/persistent_cache/block_cache_tier_file.h b/utilities/persistent_cache/block_cache_tier_file.h
43index e38b6c9a1..d9b89a4f7 100644
44--- a/utilities/persistent_cache/block_cache_tier_file.h
45+++ b/utilities/persistent_cache/block_cache_tier_file.h
46@@ -262,7 +262,7 @@ class ThreadedWriter : public Writer {
47 : file_(file), buf_(buf), file_off_(file_off), callback_(callback) {}
48
49 IO(const IO&) = default;
50- IO& operator=(const IO&) = default;
51+ IO& operator=(const IO&) = delete;
52 size_t Size() const { return sizeof(IO); }
53
54 WritableFile* file_ = nullptr; // File to write to
55--
562.20.1
57
diff --git a/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb b/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb
index ebe50a58e..78520f99b 100644
--- a/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb
+++ b/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb
@@ -11,6 +11,7 @@ SRCBRANCH = "5.18.fb"
11PV = "5.18.2" 11PV = "5.18.2"
12 12
13SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH} \ 13SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH} \
14 file://0001-Disable-Wshadow-and-do-not-mark-default-copy-constru.patch \
14 " 15 "
15 16
16S = "${WORKDIR}/git" 17S = "${WORKDIR}/git"