diff mbox series

[oe,meta-oe,6/6] rocksdb: Fix build with clang

Message ID 20190213173118.44597-6-raj.khem@gmail.com
State Accepted
Commit c06db080f2331d98fb5877531baf7d0da95fba55
Headers show
Series [oe,meta-multimedia,1/6] liboil: Fix build with clang | expand

Commit Message

Khem Raj Feb. 13, 2019, 5:31 p.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 ...and-do-not-mark-default-copy-constru.patch | 57 +++++++++++++++++++
 meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb    |  1 +
 2 files changed, 58 insertions(+)
 create mode 100644 meta-oe/recipes-dbs/rocksdb/files/0001-Disable-Wshadow-and-do-not-mark-default-copy-constru.patch

-- 
2.20.1

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
diff mbox series

Patch

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 0000000000..eccaa3a37a
--- /dev/null
+++ b/meta-oe/recipes-dbs/rocksdb/files/0001-Disable-Wshadow-and-do-not-mark-default-copy-constru.patch
@@ -0,0 +1,57 @@ 
+From ee728434124b9b7d17abbd060a62aac79a9b79c0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 12 Feb 2019 14:31:24 -0800
+Subject: [PATCH] Disable -Wshadow and do not mark default copy constructors
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ CMakeLists.txt                                     | 2 +-
+ utilities/persistent_cache/block_cache_tier.h      | 4 ++--
+ utilities/persistent_cache/block_cache_tier_file.h | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 98e2e1973..3a24a075b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -254,7 +254,7 @@ if(FAIL_ON_WARNINGS)
+   if(MSVC)
+     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")
+   else() # assume GCC
+-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
++    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wno-error=shadow")
+   endif()
+ endif()
+ 
+diff --git a/utilities/persistent_cache/block_cache_tier.h b/utilities/persistent_cache/block_cache_tier.h
+index 2b2c0ef4f..96d0540a4 100644
+--- a/utilities/persistent_cache/block_cache_tier.h
++++ b/utilities/persistent_cache/block_cache_tier.h
+@@ -91,9 +91,9 @@ class BlockCacheTier : public PersistentCacheTier {
+         : key_(std::move(key)), data_(data) {}
+     ~InsertOp() {}
+ 
+-    InsertOp() = delete;
++    InsertOp() = default;
+     InsertOp(InsertOp&& /*rhs*/) = default;
+-    InsertOp& operator=(InsertOp&& rhs) = default;
++    InsertOp& operator=(InsertOp&& rhs) = delete;
+ 
+     // used for estimating size by bounded queue
+     size_t Size() { return data_.size() + key_.size(); }
+diff --git a/utilities/persistent_cache/block_cache_tier_file.h b/utilities/persistent_cache/block_cache_tier_file.h
+index e38b6c9a1..d9b89a4f7 100644
+--- a/utilities/persistent_cache/block_cache_tier_file.h
++++ b/utilities/persistent_cache/block_cache_tier_file.h
+@@ -262,7 +262,7 @@ class ThreadedWriter : public Writer {
+         : file_(file), buf_(buf), file_off_(file_off), callback_(callback) {}
+ 
+     IO(const IO&) = default;
+-    IO& operator=(const IO&) = default;
++    IO& operator=(const IO&) = delete;
+     size_t Size() const { return sizeof(IO); }
+ 
+     WritableFile* file_ = nullptr;           // File to write to
+-- 
+2.20.1
+
diff --git a/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb b/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb
index ebe50a58ec..78520f99b0 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"
 PV = "5.18.2"
 
 SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH} \
+           file://0001-Disable-Wshadow-and-do-not-mark-default-copy-constru.patch \
           "
 
 S = "${WORKDIR}/git"