aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-dbs
diff options
context:
space:
mode:
authorArmin Kuster <akuster808@gmail.com>2017-10-26 13:39:03 -0700
committerArmin Kuster <akuster808@gmail.com>2018-03-01 16:10:36 -0800
commitd53c8097f1dd19b63da6f1e696d79d96f73f81c5 (patch)
treee1d0bfcea0c1b7988bd2d22569b651ca8e4e0fda /meta-oe/recipes-dbs
parent6aa73bc881b0d52220e5a5869cc911dd974bab1e (diff)
downloadmeta-openembedded-contrib-d53c8097f1dd19b63da6f1e696d79d96f73f81c5.tar.gz
mongodb: move to recipes-dbs
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-oe/recipes-dbs')
-rw-r--r--meta-oe/recipes-dbs/mongodb/mongodb/0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch36
-rw-r--r--meta-oe/recipes-dbs/mongodb/mongodb/0001-Tell-scons-to-use-build-settings-from-environment-va.patch67
-rw-r--r--meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch50
-rw-r--r--meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-long-long-instead-of-int64_t.patch67
-rw-r--r--meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-strerror_r-only-on-glibc-systems.patch26
-rw-r--r--meta-oe/recipes-dbs/mongodb/mongodb/0001-mongo-Add-using-std-string.patch72
-rw-r--r--meta-oe/recipes-dbs/mongodb/mongodb/0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch35
-rw-r--r--meta-oe/recipes-dbs/mongodb/mongodb/0002-d_state.cpp-Add-missing-dependenncy-on-local_shardin.patch28
-rw-r--r--meta-oe/recipes-dbs/mongodb/mongodb/0003-Conditionalize-glibc-specific-strerror_r.patch39
-rw-r--r--meta-oe/recipes-dbs/mongodb/mongodb/0004-wiredtiger-Disable-strtouq-on-musl.patch26
-rw-r--r--meta-oe/recipes-dbs/mongodb/mongodb/arm64-support.patch43
-rw-r--r--meta-oe/recipes-dbs/mongodb/mongodb/disable-hw-crc32-on-arm64-s390x.patch50
-rw-r--r--meta-oe/recipes-dbs/mongodb/mongodb_git.bb77
13 files changed, 616 insertions, 0 deletions
diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch b/meta-oe/recipes-dbs/mongodb/mongodb/0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch
new file mode 100644
index 0000000000..5da34480e7
--- /dev/null
+++ b/meta-oe/recipes-dbs/mongodb/mongodb/0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch
@@ -0,0 +1,36 @@
+From fbfceebce2121831904f2f7115252dd03b413a6d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 19 Sep 2017 18:52:53 -0700
+Subject: [PATCH] IntelRDFPMathLib20U1: Check for __DEFINED_wchar_t
+
+This is defined by musl if wchar_t is already defined
+
+avoids errors like
+
+src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h:46:15: error: typedef redefinition with different types
+ ('int' vs 'unsigned int')
+typedef int wchar_t;
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h b/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h
+index 2b3f76db86..cc80305775 100755
+--- a/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h
++++ b/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h
+@@ -42,7 +42,7 @@
+ #include <ctype.h>
+
+ // Fix system header issue on Sun solaris and define required type by ourselves
+-#if !defined(_WCHAR_T) && !defined(_WCHAR_T_DEFINED) && !defined(__QNX__)
++#if !defined(_WCHAR_T) && !defined(_WCHAR_T_DEFINED) && !defined(__QNX__) && !defined(__DEFINED_wchar_t)
+ typedef int wchar_t;
+ #endif
+
+--
+2.14.1
+
diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/0001-Tell-scons-to-use-build-settings-from-environment-va.patch b/meta-oe/recipes-dbs/mongodb/mongodb/0001-Tell-scons-to-use-build-settings-from-environment-va.patch
new file mode 100644
index 0000000000..09d49d28cd
--- /dev/null
+++ b/meta-oe/recipes-dbs/mongodb/mongodb/0001-Tell-scons-to-use-build-settings-from-environment-va.patch
@@ -0,0 +1,67 @@
+From 53368d3f4adc09dd84234a9af31771bcd8ca2757 Mon Sep 17 00:00:00 2001
+From: Sven Ebenfeld <sven.ebenfeld@gmail.com>
+Date: Fri, 15 Jan 2016 22:41:28 +0100
+Subject: [PATCH] Tell scons to use build settings from environment variables
+
+Signed-off-by: Sven Ebenfeld <sven.ebenfeld@gmail.com>
+---
+ SConstruct | 8 ++++++--
+ src/mongo/util/SConscript | 2 ++
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/SConstruct b/SConstruct
+index 5082a4b..3370f70 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -507,6 +507,7 @@ def variable_arch_converter(val):
+ 'amd64': 'x86_64',
+ 'emt64': 'x86_64',
+ 'x86': 'i386',
++ 'aarch64': 'arm64',
+ }
+ val = val.lower()
+
+@@ -568,7 +569,8 @@ env_vars.Add('ARFLAGS',
+ converter=variable_shlex_converter)
+
+ env_vars.Add('CC',
+- help='Select the C compiler to use')
++ help='Select the C compiler to use',
++ default=os.getenv('CC'))
+
+ env_vars.Add('CCFLAGS',
+ help='Sets flags for the C and C++ compiler',
+@@ -588,7 +590,8 @@ env_vars.Add('CPPPATH',
+ converter=variable_shlex_converter)
+
+ env_vars.Add('CXX',
+- help='Select the C++ compiler to use')
++ help='Select the C++ compiler to use',
++ default=os.getenv('CXX'))
+
+ env_vars.Add('CXXFLAGS',
+ help='Sets flags for the C++ compiler',
+@@ -818,6 +821,7 @@ envDict = dict(BUILD_ROOT=buildDir,
+ )
+
+ env = Environment(variables=env_vars, **envDict)
++env.PrependENVPath('PATH', os.getenv('PATH'))
+ del envDict
+
+ env.AddMethod(env_os_is_wrapper, 'TargetOSIs')
+diff --git a/src/mongo/util/SConscript b/src/mongo/util/SConscript
+index 6add602..8d05a62 100644
+--- a/src/mongo/util/SConscript
++++ b/src/mongo/util/SConscript
+@@ -251,6 +251,8 @@ if get_option('allocator') == 'tcmalloc':
+ 'MONGO_HAVE_GPERFTOOLS_GET_THREAD_CACHE_SIZE'
+ ]
+ )
++ if not use_system_version_of_library('valgrind'):
++ tcmspEnv.InjectThirdPartyIncludePaths('valgrind')
+
+ tcmspEnv.Library(
+ target='tcmalloc_set_parameter',
+--
+1.9.1
+
diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch b/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch
new file mode 100644
index 0000000000..f8c419d8a3
--- /dev/null
+++ b/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch
@@ -0,0 +1,50 @@
+From 3eed8388b49d5d3cbc2db74fee1b017eb4b40d0a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 2 Sep 2017 10:06:24 -0700
+Subject: [PATCH] Use __GLIBC__ to control use of gnu_get_libc_version
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+ src/mongo/util/processinfo_linux.cpp | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/mongo/util/processinfo_linux.cpp b/src/mongo/util/processinfo_linux.cpp
+index 910015215e..bf8c1ffd15 100644
+--- a/src/mongo/util/processinfo_linux.cpp
++++ b/src/mongo/util/processinfo_linux.cpp
+@@ -40,7 +40,7 @@
+ #include <sys/mman.h>
+ #include <sys/utsname.h>
+ #include <unistd.h>
+-#ifdef __UCLIBC__
++#ifndef __GLIBC__
+ #include <features.h>
+ #else
+ #include <gnu/libc-version.h>
+@@ -451,11 +451,13 @@ double ProcessInfo::getSystemMemoryPressurePercentage() {
+ }
+
+ void ProcessInfo::getExtraInfo(BSONObjBuilder& info) {
++#if defined(__GLIBC__)
+ LinuxProc p(_pid);
+ if (p._maj_flt <= std::numeric_limits<long long>::max())
+ info.appendNumber("page_faults", static_cast<long long>(p._maj_flt));
+ else
+ info.appendNumber("page_faults", static_cast<double>(p._maj_flt));
++#endif
+ }
+
+ /**
+@@ -491,7 +493,7 @@ void ProcessInfo::SystemInfo::collectSystemInfo() {
+ stringstream ss;
+ ss << "uClibc-" << __UCLIBC_MAJOR__ << "." << __UCLIBC_MINOR__ << "." << __UCLIBC_SUBLEVEL__;
+ bExtra.append("libcVersion", ss.str());
+-#else
++#elif defined(__GLIBC__)
+ bExtra.append("libcVersion", gnu_get_libc_version());
+ #endif
+ if (!verSig.empty())
+--
+2.14.1
+
diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-long-long-instead-of-int64_t.patch b/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-long-long-instead-of-int64_t.patch
new file mode 100644
index 0000000000..c43beb4c12
--- /dev/null
+++ b/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-long-long-instead-of-int64_t.patch
@@ -0,0 +1,67 @@
+From a4951489d649c2b609cbb80f6cfb49fdcad8bd43 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 2 Sep 2017 10:03:37 -0700
+Subject: [PATCH] Use long long instead of int64_t
+
+Fixes
+error: call to member function 'appendNumber' is ambiguous
+since this function expects long long as parameter and not int64_t
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+ src/mongo/util/procparser.cpp | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/mongo/util/procparser.cpp b/src/mongo/util/procparser.cpp
+index 36f2ae0254..2c164bcbf3 100644
+--- a/src/mongo/util/procparser.cpp
++++ b/src/mongo/util/procparser.cpp
+@@ -260,7 +260,7 @@ Status parseProcStat(const std::vector<StringData>& keys,
+
+ StringData stringValue((*partIt).begin(), (*partIt).end() - (*partIt).begin());
+
+- uint64_t value;
++ long long value;
+
+ if (!parseNumberFromString(stringValue, &value).isOK()) {
+ value = 0;
+@@ -272,7 +272,7 @@ Status parseProcStat(const std::vector<StringData>& keys,
+ } else {
+ StringData stringValue((*partIt).begin(), (*partIt).end() - (*partIt).begin());
+
+- uint64_t value;
++ long long value;
+
+ if (!parseNumberFromString(stringValue, &value).isOK()) {
+ value = 0;
+@@ -365,7 +365,7 @@ Status parseProcMemInfo(const std::vector<StringData>& keys,
+
+ StringData stringValue((*partIt).begin(), (*partIt).end());
+
+- uint64_t value;
++ long long value;
+
+ if (!parseNumberFromString(stringValue, &value).isOK()) {
+ value = 0;
+@@ -426,7 +426,7 @@ Status parseProcDiskStats(const std::vector<StringData>& disks,
+ StringData data,
+ BSONObjBuilder* builder) {
+ bool foundKeys = false;
+- std::vector<uint64_t> stats;
++ std::vector<long long> stats;
+ stats.reserve(kDiskFieldCount);
+
+ using string_split_iterator = boost::split_iterator<StringData::const_iterator>;
+@@ -501,7 +501,7 @@ Status parseProcDiskStats(const std::vector<StringData>& disks,
+
+ StringData stringValue((*partIt).begin(), (*partIt).end());
+
+- uint64_t value;
++ long long value;
+
+ if (!parseNumberFromString(stringValue, &value).isOK()) {
+ value = 0;
+--
+2.14.1
+
diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-strerror_r-only-on-glibc-systems.patch b/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-strerror_r-only-on-glibc-systems.patch
new file mode 100644
index 0000000000..0334d994e4
--- /dev/null
+++ b/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-strerror_r-only-on-glibc-systems.patch
@@ -0,0 +1,26 @@
+From a4dfc92ff342e59596ab64267a8d4f22f173c23b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 2 Sep 2017 12:40:41 -0700
+Subject: [PATCH 1/4] Use strerror_r only on glibc systems
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/mongo/util/log.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/mongo/util/log.cpp b/src/mongo/util/log.cpp
+index 1957eb4791..ddf3908818 100644
+--- a/src/mongo/util/log.cpp
++++ b/src/mongo/util/log.cpp
+@@ -101,7 +101,7 @@ string errnoWithDescription(int errNumber) {
+ char buf[kBuflen];
+ char* msg{nullptr};
+
+-#if defined(__GNUC__) && defined(_GNU_SOURCE)
++#if defined(__GNUC__) && defined(_GNU_SOURCE) && defined(__GLIBC__)
+ msg = strerror_r(errNumber, buf, kBuflen);
+ #elif defined(_WIN32)
+
+--
+2.14.1
+
diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/0001-mongo-Add-using-std-string.patch b/meta-oe/recipes-dbs/mongodb/mongodb/0001-mongo-Add-using-std-string.patch
new file mode 100644
index 0000000000..e517d53d10
--- /dev/null
+++ b/meta-oe/recipes-dbs/mongodb/mongodb/0001-mongo-Add-using-std-string.patch
@@ -0,0 +1,72 @@
+From 5fdec9592285f5976345fbccb3d07fae1245ab53 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 2 Aug 2017 15:41:22 -0700
+Subject: [PATCH] mongo: Add using std::string
+
+This is needed with latest clang
+Fixes
+src/mongo/db/dbwebserver.cpp:206:23: error: use of undeclared identifier 'string'; did you mean 'String'?
+ static vector<string> commands;
+ ^~~~~~
+ String
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/mongo/db/dbwebserver.cpp | 1 +
+ src/mongo/db/matcher/expression_leaf.cpp | 2 ++
+ src/mongo/db/repl/master_slave.cpp | 1 +
+ src/mongo/util/net/miniwebserver.cpp | 1 +
+ 4 files changed, 5 insertions(+)
+
+diff --git a/src/mongo/db/dbwebserver.cpp b/src/mongo/db/dbwebserver.cpp
+index b202e0500b..0255613524 100644
+--- a/src/mongo/db/dbwebserver.cpp
++++ b/src/mongo/db/dbwebserver.cpp
+@@ -67,6 +67,7 @@ namespace mongo {
+ using std::map;
+ using std::stringstream;
+ using std::vector;
++using std::string;
+
+ using namespace html;
+
+diff --git a/src/mongo/db/matcher/expression_leaf.cpp b/src/mongo/db/matcher/expression_leaf.cpp
+index d562bff141..4d931985e2 100644
+--- a/src/mongo/db/matcher/expression_leaf.cpp
++++ b/src/mongo/db/matcher/expression_leaf.cpp
+@@ -44,6 +44,8 @@
+ #include "mongo/stdx/memory.h"
+ #include "mongo/util/mongoutils/str.h"
+
++using std::string;
++
+ namespace mongo {
+
+ Status LeafMatchExpression::setPath(StringData path) {
+diff --git a/src/mongo/db/repl/master_slave.cpp b/src/mongo/db/repl/master_slave.cpp
+index 05faad1259..ea25d7151b 100644
+--- a/src/mongo/db/repl/master_slave.cpp
++++ b/src/mongo/db/repl/master_slave.cpp
+@@ -78,6 +78,7 @@ using std::endl;
+ using std::max;
+ using std::min;
+ using std::set;
++using std::string;
+ using std::stringstream;
+ using std::unique_ptr;
+ using std::vector;
+diff --git a/src/mongo/util/net/miniwebserver.cpp b/src/mongo/util/net/miniwebserver.cpp
+index 5f4165d42f..239720c349 100644
+--- a/src/mongo/util/net/miniwebserver.cpp
++++ b/src/mongo/util/net/miniwebserver.cpp
+@@ -46,6 +46,7 @@ namespace mongo {
+
+ using std::shared_ptr;
+ using std::stringstream;
++using std::string;
+ using std::vector;
+
+ MiniWebServer::MiniWebServer(const string& name, const string& ip, int port, ServiceContext* ctx)
+--
+2.13.3
+
diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch b/meta-oe/recipes-dbs/mongodb/mongodb/0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch
new file mode 100644
index 0000000000..098306f500
--- /dev/null
+++ b/meta-oe/recipes-dbs/mongodb/mongodb/0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch
@@ -0,0 +1,35 @@
+From df7ef16afcc6ab55daa686e4f15c16e3d1280337 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 2 Sep 2017 12:42:30 -0700
+Subject: [PATCH 2/4] Add a definition for the macro __ELF_NATIVE_CLASS
+
+It depends on the native arch's word size.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/mongo/util/stacktrace_posix.cpp | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/src/mongo/util/stacktrace_posix.cpp b/src/mongo/util/stacktrace_posix.cpp
+index 53ab85f56f..7c458e7ef2 100644
+--- a/src/mongo/util/stacktrace_posix.cpp
++++ b/src/mongo/util/stacktrace_posix.cpp
+@@ -37,6 +37,15 @@
+ #include <string>
+ #include <sys/utsname.h>
+
++#if !defined(__GLIBC__)
++#if defined __x86_64__ && !defined __ILP32__
++# define __WORDSIZE 64
++#else
++# define __WORDSIZE 32
++#endif
++#define __ELF_NATIVE_CLASS __WORDSIZE
++#endif
++
+ #include "mongo/base/init.h"
+ #include "mongo/config.h"
+ #include "mongo/db/jsobj.h"
+--
+2.14.1
+
diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/0002-d_state.cpp-Add-missing-dependenncy-on-local_shardin.patch b/meta-oe/recipes-dbs/mongodb/mongodb/0002-d_state.cpp-Add-missing-dependenncy-on-local_shardin.patch
new file mode 100644
index 0000000000..95f9c1c1c6
--- /dev/null
+++ b/meta-oe/recipes-dbs/mongodb/mongodb/0002-d_state.cpp-Add-missing-dependenncy-on-local_shardin.patch
@@ -0,0 +1,28 @@
+From 5759878e5d278f11a1063e8fccd1e6b7b54caadf Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 2 Aug 2017 16:25:37 -0700
+Subject: [PATCH 2/2] d_state.cpp: Add missing dependenncy on
+ local_sharding_info
+
+Fixes
+| src/mongo/s/d_state.cpp:81: error: undefined reference to 'mongo::enableLocalShardingInfo(mongo::ServiceContext*, std::function<bool (mongo::OperationContext*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)>)'
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/mongo/s/SConscript | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/mongo/s/SConscript b/src/mongo/s/SConscript
+index 71720be517..51bd199127 100644
+--- a/src/mongo/s/SConscript
++++ b/src/mongo/s/SConscript
+@@ -317,5 +317,6 @@ env.Library(
+ "$BUILD_DIR/mongo/db/s/sharding",
+ "$BUILD_DIR/mongo/executor/network_interface_factory",
+ "$BUILD_DIR/mongo/s/client/shard_local",
++ "$BUILD_DIR/mongo/s/local_sharding_info",
+ ],
+ )
+--
+2.13.3
+
diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/0003-Conditionalize-glibc-specific-strerror_r.patch b/meta-oe/recipes-dbs/mongodb/mongodb/0003-Conditionalize-glibc-specific-strerror_r.patch
new file mode 100644
index 0000000000..1591f94c96
--- /dev/null
+++ b/meta-oe/recipes-dbs/mongodb/mongodb/0003-Conditionalize-glibc-specific-strerror_r.patch
@@ -0,0 +1,39 @@
+From 458f80f482a201b427a1c92235804d0c3f98fd51 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 2 Sep 2017 13:01:11 -0700
+Subject: [PATCH 3/4] Conditionalize glibc specific strerror_r
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ .../asio-asio-1-11-0/asio/include/asio/impl/error_code.ipp | 11 ++++-------
+ 1 file changed, 4 insertions(+), 7 deletions(-)
+
+diff --git a/src/third_party/asio-asio-1-11-0/asio/include/asio/impl/error_code.ipp b/src/third_party/asio-asio-1-11-0/asio/include/asio/impl/error_code.ipp
+index 4e7badb14a..0eeae884e2 100644
+--- a/src/third_party/asio-asio-1-11-0/asio/include/asio/impl/error_code.ipp
++++ b/src/third_party/asio-asio-1-11-0/asio/include/asio/impl/error_code.ipp
+@@ -97,17 +97,14 @@ public:
+ #if defined(__sun) || defined(__QNX__) || defined(__SYMBIAN32__)
+ using namespace std;
+ return strerror(value);
+-#elif defined(__MACH__) && defined(__APPLE__) \
+- || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) \
+- || defined(_AIX) || defined(__hpux) || defined(__osf__) \
+- || defined(__ANDROID__)
++#elif defined(__GLIBC__) && defined(_GNU_SOURCE)
++ char buf[256] = "";
++ return strerror_r(value, buf, sizeof(buf));
++#else
+ char buf[256] = "";
+ using namespace std;
+ strerror_r(value, buf, sizeof(buf));
+ return buf;
+-#else
+- char buf[256] = "";
+- return strerror_r(value, buf, sizeof(buf));
+ #endif
+ #endif // defined(ASIO_WINDOWS)
+ }
+--
+2.14.1
+
diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/0004-wiredtiger-Disable-strtouq-on-musl.patch b/meta-oe/recipes-dbs/mongodb/mongodb/0004-wiredtiger-Disable-strtouq-on-musl.patch
new file mode 100644
index 0000000000..e871f2ba90
--- /dev/null
+++ b/meta-oe/recipes-dbs/mongodb/mongodb/0004-wiredtiger-Disable-strtouq-on-musl.patch
@@ -0,0 +1,26 @@
+From a1c77702926eb8546ff96b00b5b994f7478dabae Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 2 Sep 2017 13:13:15 -0700
+Subject: [PATCH 4/4] wiredtiger: Disable strtouq on musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/third_party/wiredtiger/build_linux/wiredtiger_config.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/third_party/wiredtiger/build_linux/wiredtiger_config.h b/src/third_party/wiredtiger/build_linux/wiredtiger_config.h
+index 1122e1e319..fdfd48687b 100644
+--- a/src/third_party/wiredtiger/build_linux/wiredtiger_config.h
++++ b/src/third_party/wiredtiger/build_linux/wiredtiger_config.h
+@@ -101,7 +101,7 @@
+ #define HAVE_STRING_H 1
+
+ /* Define to 1 if you have the `strtouq' function. */
+-#define HAVE_STRTOUQ 1
++/* #undef HAVE_STRTOUQ 1 */
+
+ /* Define to 1 if you have the `sync_file_range' function. */
+ /* #undef HAVE_SYNC_FILE_RANGE */
+--
+2.14.1
+
diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/arm64-support.patch b/meta-oe/recipes-dbs/mongodb/mongodb/arm64-support.patch
new file mode 100644
index 0000000000..9046bb2f45
--- /dev/null
+++ b/meta-oe/recipes-dbs/mongodb/mongodb/arm64-support.patch
@@ -0,0 +1,43 @@
+Add alises for arm64 which is same as aarch64
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+Index: git/SConstruct
+===================================================================
+--- git.orig/SConstruct
++++ git/SConstruct
+@@ -990,6 +990,7 @@ elif endian == "big":
+ processor_macros = {
+ 'arm' : { 'endian': 'little', 'defines': ('__arm__',) },
+ 'aarch64' : { 'endian': 'little', 'defines': ('__arm64__', '__aarch64__')},
++ 'arm64' : { 'endian': 'little', 'defines': ('__arm64__', '__aarch64__')},
+ 'i386' : { 'endian': 'little', 'defines': ('__i386', '_M_IX86')},
+ 'ppc64le' : { 'endian': 'little', 'defines': ('__powerpc64__',)},
+ 's390x' : { 'endian': 'big', 'defines': ('__s390x__',)},
+Index: git/src/third_party/IntelRDFPMathLib20U1/SConscript
+===================================================================
+--- git.orig/src/third_party/IntelRDFPMathLib20U1/SConscript
++++ git/src/third_party/IntelRDFPMathLib20U1/SConscript
+@@ -301,7 +301,7 @@ if processor == 'i386':
+ elif processor == 'arm':
+ cpp_defines['IA32'] = '1'
+ cpp_defines['ia32'] = '1'
+-elif processor == "aarch64":
++elif processor == "aarch64" or processor == 'arm64':
+ cpp_defines['efi2'] = '1'
+ cpp_defines['EFI2'] = '1'
+ # Using 64 bit little endian
+Index: git/src/third_party/wiredtiger/SConscript
+===================================================================
+--- git.orig/src/third_party/wiredtiger/SConscript
++++ git/src/third_party/wiredtiger/SConscript
+@@ -139,7 +139,7 @@ condition_map = {
+ 'POSIX_HOST' : not env.TargetOSIs('windows'),
+ 'WINDOWS_HOST' : env.TargetOSIs('windows'),
+
+- 'ARM64_HOST' : env['TARGET_ARCH'] == 'aarch64',
++ 'ARM64_HOST' : env['TARGET_ARCH'] in ('aarch64', 'arm64'),
+ 'POWERPC_HOST' : env['TARGET_ARCH'] == 'ppc64le',
+ 'X86_HOST' : env['TARGET_ARCH'] == 'x86_64',
+ 'ZSERIES_HOST' : env['TARGET_ARCH'] == 's390x',
diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/disable-hw-crc32-on-arm64-s390x.patch b/meta-oe/recipes-dbs/mongodb/mongodb/disable-hw-crc32-on-arm64-s390x.patch
new file mode 100644
index 0000000000..5c5c20ce34
--- /dev/null
+++ b/meta-oe/recipes-dbs/mongodb/mongodb/disable-hw-crc32-on-arm64-s390x.patch
@@ -0,0 +1,50 @@
+imported from debian
+
+Upstream-Status: Pending
+Index: git/src/third_party/wiredtiger/SConscript
+===================================================================
+--- git.orig/src/third_party/wiredtiger/SConscript
++++ git/src/third_party/wiredtiger/SConscript
+@@ -169,7 +169,9 @@ if useSnappy:
+ # If not available at runtime, we fall back to software in some cases.
+ #
+ # On zSeries we may disable because SLES 11 kernel doe not support the instructions.
+-if not (env['TARGET_ARCH'] == 's390x' and get_option("use-s390x-crc32") == "off"):
++# Debian: disable hardware-assisted crc32 on s390x and arm64, as at least the
++# buildd's do not support the instructions.
++if env['TARGET_ARCH'] not in ('s390x', 'arm64', 'aarch64'):
+ env.Append(CPPDEFINES=["HAVE_CRC32_HARDWARE"])
+
+ wtlib = env.Library(
+Index: git/src/third_party/wiredtiger/dist/filelist
+===================================================================
+--- git.orig/src/third_party/wiredtiger/dist/filelist
++++ git/src/third_party/wiredtiger/dist/filelist
+@@ -54,7 +54,6 @@ src/checksum/power8/crc32_wrapper.c POWE
+ src/checksum/software/checksum.c
+ src/checksum/x86/crc32-x86.c X86_HOST
+ src/checksum/zseries/crc32-s390x.c ZSERIES_HOST
+-src/checksum/zseries/crc32le-vx.sx ZSERIES_HOST
+ src/config/config.c
+ src/config/config_api.c
+ src/config/config_check.c
+Index: git/src/third_party/wiredtiger/src/checksum/zseries/crc32-s390x.c
+===================================================================
+--- git.orig/src/third_party/wiredtiger/src/checksum/zseries/crc32-s390x.c
++++ git/src/third_party/wiredtiger/src/checksum/zseries/crc32-s390x.c
+@@ -78,6 +78,7 @@ unsigned int __wt_crc32c_le(unsigned int
+ return crc; \
+ }
+
++#if defined(HAVE_CRC32_HARDWARE)
+ /* Main CRC-32 functions */
+ DEFINE_CRC32_VX(__wt_crc32c_le_vx, __wt_crc32c_le_vgfm_16, __wt_crc32c_le)
+
+@@ -90,6 +91,7 @@ __wt_checksum_hw(const void *chunk, size
+ {
+ return (~__wt_crc32c_le_vx(0xffffffff, chunk, len));
+ }
++#endif
+
+ #endif
+
diff --git a/meta-oe/recipes-dbs/mongodb/mongodb_git.bb b/meta-oe/recipes-dbs/mongodb/mongodb_git.bb
new file mode 100644
index 0000000000..8acbf071b4
--- /dev/null
+++ b/meta-oe/recipes-dbs/mongodb/mongodb_git.bb
@@ -0,0 +1,77 @@
+SUMMARY = "mongodb"
+LICENSE = "AGPL-3.0 & Apache-2.0 & Zlib"
+LIC_FILES_CHKSUM = "file://GNU-AGPL-3.0.txt;md5=73f1eb20517c55bf9493b7dd6e480788 \
+ file://APACHE-2.0.txt;md5=3b83ef96387f14655fc854ddc3c6bd57"
+
+DEPENDS = "openssl libpcre libpcap zlib python boost"
+
+inherit scons dos2unix siteinfo
+
+PV = "3.4.6+git${SRCPV}"
+SRCREV = "c55eb86ef46ee7aede3b1e2a5d184a7df4bfb5b5"
+SRC_URI = "git://github.com/mongodb/mongo.git;branch=v3.4 \
+ file://0001-Tell-scons-to-use-build-settings-from-environment-va.patch \
+ file://0001-mongo-Add-using-std-string.patch \
+ file://0002-d_state.cpp-Add-missing-dependenncy-on-local_shardin.patch \
+ file://0001-Use-long-long-instead-of-int64_t.patch \
+ file://0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch \
+ file://0001-Use-strerror_r-only-on-glibc-systems.patch \
+ file://0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch \
+ file://0003-Conditionalize-glibc-specific-strerror_r.patch \
+ file://arm64-support.patch \
+ file://0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch \
+ file://disable-hw-crc32-on-arm64-s390x.patch \
+ "
+SRC_URI_append_libc-musl ="\
+ file://0004-wiredtiger-Disable-strtouq-on-musl.patch \
+ "
+S = "${WORKDIR}/git"
+
+# Wiredtiger supports only 64-bit platforms
+PACKAGECONFIG_x86-64 ??= "tcmalloc wiredtiger"
+PACKAGECONFIG_aarch64 ??= "tcmalloc wiredtiger"
+PACKAGECONFIG ??= "tcmalloc"
+# gperftools compilation fails for arm below v7 because of missing support of
+# dmb operation. So we use system-allocator instead of tcmalloc
+PACKAGECONFIG_remove_armv6 = "tcmalloc"
+PACKAGECONFIG_remove_libc-musl = "tcmalloc"
+
+#std::current_exception is undefined for arm < v6
+COMPATIBLE_MACHINE_armv4 = "(!.*armv4).*"
+COMPATIBLE_MACHINE_armv5 = "(!.*armv5).*"
+COMPATIBLE_MACHINE_armv7a = "(!.*armv7a).*"
+COMPATIBLE_MACHINE_armv7ve = "(!.*armv7ve).*"
+COMPATIBLE_MACHINE_mips64 = "(!.*mips64).*"
+COMPATIBLE_MACHINE_powerpc = "(!.*ppc).*"
+
+PACKAGECONFIG[tcmalloc] = "--use-system-tcmalloc,--allocator=system,gperftools,"
+PACKAGECONFIG[wiredtiger] = "--wiredtiger=on,--wiredtiger=off,,"
+
+EXTRA_OESCONS = "--prefix=${D}${prefix} \
+ LIBPATH=${STAGING_LIBDIR} \
+ LINKFLAGS='${LDFLAGS}' \
+ CXXFLAGS='${CXXFLAGS}' \
+ TARGET_ARCH=${TARGET_ARCH} \
+ --ssl \
+ --disable-warnings-as-errors \
+ --use-system-pcre \
+ --use-system-zlib \
+ --js-engine=none \
+ --nostrip \
+ --endian=${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \
+ ${PACKAGECONFIG_CONFARGS} \
+ mongod mongos"
+
+do_configure_prepend() {
+ # tests use hex floats, not supported in plain C++
+ sed -e 's|-std=c++11|-std=gnu++11|g' -i ${S}/SConstruct
+}
+scons_do_compile() {
+ ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} ${EXTRA_OESCONS} || \
+ die "scons build execution failed."
+}
+
+scons_do_install() {
+ ${STAGING_BINDIR_NATIVE}/scons install ${EXTRA_OESCONS}|| \
+ die "scons install execution failed."
+}