diff options
author | Dave Cobbley <david.j.cobbley@linux.intel.com> | 2018-08-14 10:05:37 -0700 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-22 21:26:31 -0400 |
commit | eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch) | |
tree | de291a73dc37168da6370e2cf16c347d1eba9df8 /meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb | |
parent | 9c3cf826d853102535ead04cebc2d6023eff3032 (diff) | |
download | blackbird-openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.gz blackbird-openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.zip |
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers
content to the top level.
Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f
Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb')
11 files changed, 458 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch b/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch new file mode 100644 index 000000000..5da34480e --- /dev/null +++ b/meta-openembedded/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-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Tell-scons-to-use-build-settings-from-environment-va.patch b/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Tell-scons-to-use-build-settings-from-environment-va.patch new file mode 100644 index 000000000..aa01e954f --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Tell-scons-to-use-build-settings-from-environment-va.patch @@ -0,0 +1,64 @@ +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(-) + +Index: git/SConstruct +=================================================================== +--- git.orig/SConstruct ++++ git/SConstruct +@@ -548,6 +548,7 @@ def variable_arch_converter(val): + 'amd64': 'x86_64', + 'emt64': 'x86_64', + 'x86': 'i386', ++ 'aarch64': 'arm64', + } + val = val.lower() + +@@ -627,7 +628,8 @@ env_vars.Add( + ) + + 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', +@@ -647,7 +649,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', +@@ -895,6 +898,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') +Index: git/src/mongo/util/SConscript +=================================================================== +--- git.orig/src/mongo/util/SConscript ++++ git/src/mongo/util/SConscript +@@ -274,6 +274,8 @@ if env['MONGO_ALLOCATOR'] == 'tcmalloc': + 'MONGO_HAVE_GPERFTOOLS_SIZE_CLASS_STATS' + ] + ) ++ if not use_system_version_of_library('valgrind'): ++ tcmspEnv.InjectThirdPartyIncludePaths('valgrind') + + if not use_system_version_of_library('valgrind'): + # Include valgrind since tcmalloc disables itself while running under valgrind diff --git a/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch b/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch new file mode 100644 index 000000000..f8c419d8a --- /dev/null +++ b/meta-openembedded/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-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-long-long-instead-of-int64_t.patch b/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-long-long-instead-of-int64_t.patch new file mode 100644 index 000000000..389b302c3 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-long-long-instead-of-int64_t.patch @@ -0,0 +1,64 @@ +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(-) + +Index: git/src/mongo/util/procparser.cpp +=================================================================== +--- git.orig/src/mongo/util/procparser.cpp ++++ git/src/mongo/util/procparser.cpp +@@ -260,7 +260,7 @@ Status parseProcStat(const std::vector<S + + 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<S + } 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::vecto + + 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::vec + 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::vec + + StringData stringValue((*partIt).begin(), (*partIt).end()); + +- uint64_t value; ++ long long value; + + if (!parseNumberFromString(stringValue, &value).isOK()) { + value = 0; diff --git a/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-strerror_r-only-on-glibc-systems.patch b/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-strerror_r-only-on-glibc-systems.patch new file mode 100644 index 000000000..0334d994e --- /dev/null +++ b/meta-openembedded/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-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch b/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch new file mode 100644 index 000000000..098306f50 --- /dev/null +++ b/meta-openembedded/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-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0002-d_state.cpp-Add-missing-dependenncy-on-local_shardin.patch b/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0002-d_state.cpp-Add-missing-dependenncy-on-local_shardin.patch new file mode 100644 index 000000000..dc488ad7e --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0002-d_state.cpp-Add-missing-dependenncy-on-local_shardin.patch @@ -0,0 +1,25 @@ +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(+) + +Index: git/src/mongo/s/SConscript +=================================================================== +--- git.orig/src/mongo/s/SConscript ++++ git/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", + ], + ) diff --git a/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0003-Conditionalize-glibc-specific-strerror_r.patch b/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0003-Conditionalize-glibc-specific-strerror_r.patch new file mode 100644 index 000000000..1591f94c9 --- /dev/null +++ b/meta-openembedded/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-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0004-wiredtiger-Disable-strtouq-on-musl.patch b/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0004-wiredtiger-Disable-strtouq-on-musl.patch new file mode 100644 index 000000000..e871f2ba9 --- /dev/null +++ b/meta-openembedded/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-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/arm64-support.patch b/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/arm64-support.patch new file mode 100644 index 000000000..9046bb2f4 --- /dev/null +++ b/meta-openembedded/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-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/disable-hw-crc32-on-arm64-s390x.patch b/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/disable-hw-crc32-on-arm64-s390x.patch new file mode 100644 index 000000000..5c5c20ce3 --- /dev/null +++ b/meta-openembedded/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 + |