diff options
Diffstat (limited to 'meta-oe/dynamic-layers/meta-python/recipes-dbs')
13 files changed, 537 insertions, 0 deletions
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch new file mode 100644 index 000000000..e636adc55 --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 97914aeab52b4d0ea0ab9e5ff985a1c5cddb0fa1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Vincent Prince <vincent.prince.fr@gmail.com> | ||
3 | Date: Mon, 16 Sep 2019 13:41:39 +0200 | ||
4 | Subject: [PATCH 06/10] IntelRDFPMathLib20U1: Check for __DEFINED_wchar_t | ||
5 | |||
6 | This is defined by musl if wchar_t is already defined | ||
7 | |||
8 | avoids errors like | ||
9 | |||
10 | src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h:46:15: error: typedef redefinition with different types | ||
11 | ('int' vs 'unsigned int') | ||
12 | typedef int wchar_t; | ||
13 | |||
14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
15 | Signed-off-by: Vincent Prince <vincent.prince.fr@gmail.com> | ||
16 | --- | ||
17 | src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h | 2 +- | ||
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h b/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h | ||
21 | index 56775bc..be96a85 100755 | ||
22 | --- a/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h | ||
23 | +++ b/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h | ||
24 | @@ -43,7 +43,7 @@ | ||
25 | |||
26 | #if 0 // MongoDB Modification -- just `#include <stddef.h>` | ||
27 | // Fix system header issue on Sun solaris and define required type by ourselves | ||
28 | -#if !defined(_WCHAR_T) && !defined(_WCHAR_T_DEFINED) && !defined(__QNX__) | ||
29 | +#if !defined(_WCHAR_T) && !defined(_WCHAR_T_DEFINED) && !defined(__QNX__) && !defined(__DEFINED_wchar_t) | ||
30 | typedef int wchar_t; | ||
31 | #endif | ||
32 | #else | ||
33 | -- | ||
34 | 2.7.4 | ||
35 | |||
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Mark-one-of-strerror_r-implementation-glibc-specific.patch b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Mark-one-of-strerror_r-implementation-glibc-specific.patch new file mode 100644 index 000000000..5337fcdbf --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Mark-one-of-strerror_r-implementation-glibc-specific.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From ca004968b8d2149f72d4edcfe029489a8c5e10ca Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 23 Sep 2019 12:31:31 -0700 | ||
4 | Subject: [PATCH] Mark one of strerror_r implementation glibc specific | ||
5 | |||
6 | glibc has two incompatible strerror_r definitions, one of them is | ||
7 | specific to glibc, mark this one so | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | src/mongo/util/errno_util.cpp | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/src/mongo/util/errno_util.cpp b/src/mongo/util/errno_util.cpp | ||
17 | index 564c0071ea..4f7e1d3a38 100644 | ||
18 | --- a/src/mongo/util/errno_util.cpp | ||
19 | +++ b/src/mongo/util/errno_util.cpp | ||
20 | @@ -61,7 +61,7 @@ std::string errnoWithDescription(int errNumber) { | ||
21 | char buf[kBuflen]; | ||
22 | char* msg{nullptr}; | ||
23 | |||
24 | -#if defined(__GNUC__) && defined(_GNU_SOURCE) && \ | ||
25 | +#if defined(__GNUC__) && defined(_GNU_SOURCE) && defined(__GLIBC__) && \ | ||
26 | (!defined(__ANDROID_API__) || !(__ANDROID_API__ <= 22)) && !defined(EMSCRIPTEN) | ||
27 | msg = strerror_r(errNumber, buf, kBuflen); | ||
28 | #elif defined(_WIN32) | ||
29 | -- | ||
30 | 2.23.0 | ||
31 | |||
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Support-deprecated-resolver-functions.patch b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Support-deprecated-resolver-functions.patch new file mode 100644 index 000000000..3d949c873 --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Support-deprecated-resolver-functions.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 8d035e84c2edb44461ef4df9cdef0a6dfce0a1d7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 24 Aug 2018 12:56:22 -0700 | ||
4 | Subject: [PATCH 07/10] Support deprecated resolver functions | ||
5 | |||
6 | Needed for musl libc | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | src/mongo/util/dns_query_posix-impl.h | 6 ++++++ | ||
12 | 1 file changed, 6 insertions(+) | ||
13 | |||
14 | diff --git a/src/mongo/util/dns_query_posix-impl.h b/src/mongo/util/dns_query_posix-impl.h | ||
15 | index a5e3629..fb29d2d 100644 | ||
16 | --- a/src/mongo/util/dns_query_posix-impl.h | ||
17 | +++ b/src/mongo/util/dns_query_posix-impl.h | ||
18 | @@ -54,6 +54,12 @@ | ||
19 | |||
20 | #include <boost/noncopyable.hpp> | ||
21 | |||
22 | +#ifndef res_ninit | ||
23 | +#define res_nclose(arg) | ||
24 | +#define res_ninit(arg) res_init() | ||
25 | +#define res_nsearch(sta, nam, clas, typ, ans, alen) res_search(nam, clas, typ, ans, alen) | ||
26 | +#endif | ||
27 | + | ||
28 | namespace mongo { | ||
29 | namespace dns { | ||
30 | // The anonymous namespace is safe, in this header, as it is not really a header. It is only used | ||
31 | -- | ||
32 | 2.7.4 | ||
33 | |||
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Tell-scons-to-use-build-settings-from-environment-va.patch b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Tell-scons-to-use-build-settings-from-environment-va.patch new file mode 100644 index 000000000..190884624 --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Tell-scons-to-use-build-settings-from-environment-va.patch | |||
@@ -0,0 +1,56 @@ | |||
1 | From 1b2e24e14ee72e54e466be2512c78272f62d60b4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Vincent Prince <vincent.prince.fr@gmail.com> | ||
3 | Date: Mon, 16 Sep 2019 13:21:44 +0200 | ||
4 | Subject: [PATCH 01/10] Tell scons to use build settings from environment | ||
5 | variables | ||
6 | |||
7 | Signed-off-by: Sven Ebenfeld <sven.ebenfeld@gmail.com> | ||
8 | Signed-off-by: Vincent Prince <vincent.prince.fr@gmail.com> | ||
9 | --- | ||
10 | SConstruct | 8 ++++++-- | ||
11 | 1 files changed, 8 insertions(+), 2 deletions(-) | ||
12 | |||
13 | diff --git a/SConstruct b/SConstruct | ||
14 | index 7ebbcbc..e63cf15 100644 | ||
15 | --- a/SConstruct | ||
16 | +++ b/SConstruct | ||
17 | @@ -608,6 +608,7 @@ def variable_arch_converter(val): | ||
18 | 'amd64': 'x86_64', | ||
19 | 'emt64': 'x86_64', | ||
20 | 'x86': 'i386', | ||
21 | + 'aarch64': 'arm64', | ||
22 | } | ||
23 | val = val.lower() | ||
24 | |||
25 | @@ -695,7 +696,8 @@ env_vars.Add( | ||
26 | ) | ||
27 | |||
28 | env_vars.Add('CC', | ||
29 | - help='Select the C compiler to use') | ||
30 | + help='Select the C compiler to use', | ||
31 | + default=os.getenv('CC')) | ||
32 | |||
33 | env_vars.Add('CCFLAGS', | ||
34 | help='Sets flags for the C and C++ compiler', | ||
35 | @@ -715,7 +717,8 @@ env_vars.Add('CPPPATH', | ||
36 | converter=variable_shlex_converter) | ||
37 | |||
38 | env_vars.Add('CXX', | ||
39 | - help='Select the C++ compiler to use') | ||
40 | + help='Select the C++ compiler to use', | ||
41 | + default=os.getenv('CXX')) | ||
42 | |||
43 | env_vars.Add('CXXFLAGS', | ||
44 | help='Sets flags for the C++ compiler', | ||
45 | @@ -1018,6 +1021,7 @@ envDict = dict(BUILD_ROOT=buildDir, | ||
46 | ) | ||
47 | |||
48 | env = Environment(variables=env_vars, **envDict) | ||
49 | +env.PrependENVPath('PATH', os.getenv('PATH')) | ||
50 | del envDict | ||
51 | |||
52 | for var in ['CC', 'CXX']: | ||
53 | |||
54 | -- | ||
55 | 2.7.4 | ||
56 | |||
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch new file mode 100644 index 000000000..d98fa56cb --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From d701ceeb15662038435b80ba556a80c17f76d2dc Mon Sep 17 00:00:00 2001 | ||
2 | From: Vincent Prince <vincent.prince.fr@gmail.com> | ||
3 | Date: Mon, 16 Sep 2019 13:30:13 +0200 | ||
4 | Subject: [PATCH 03/10] Use __GLIBC__ to control use of gnu_get_libc_version | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | Signed-off-by: Vincent Prince <vincent.prince.fr@gmail.com> | ||
8 | --- | ||
9 | src/mongo/util/processinfo_linux.cpp | 8 ++++---- | ||
10 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
11 | |||
12 | diff --git a/src/mongo/util/processinfo_linux.cpp b/src/mongo/util/processinfo_linux.cpp | ||
13 | index cccb91c..45c4b7d 100644 | ||
14 | --- a/src/mongo/util/processinfo_linux.cpp | ||
15 | +++ b/src/mongo/util/processinfo_linux.cpp | ||
16 | @@ -44,10 +44,10 @@ | ||
17 | #include <unistd.h> | ||
18 | #ifdef __BIONIC__ | ||
19 | #include <android/api-level.h> | ||
20 | -#elif __UCLIBC__ | ||
21 | -#include <features.h> | ||
22 | -#else | ||
23 | +#elif defined(__GLIBC__) && !defined(__UCLIBC__) | ||
24 | #include <gnu/libc-version.h> | ||
25 | +#else | ||
26 | +#include <features.h> | ||
27 | #endif | ||
28 | |||
29 | #include <boost/filesystem.hpp> | ||
30 | @@ -546,7 +546,7 @@ void ProcessInfo::SystemInfo::collectSystemInfo() { | ||
31 | std::stringstream ss; | ||
32 | ss << "uClibc-" << __UCLIBC_MAJOR__ << "." << __UCLIBC_MINOR__ << "." << __UCLIBC_SUBLEVEL__; | ||
33 | bExtra.append("libcVersion", ss.str()); | ||
34 | -#else | ||
35 | +#elif defined(__GLIBC__) | ||
36 | bExtra.append("libcVersion", gnu_get_libc_version()); | ||
37 | #endif | ||
38 | if (!verSig.empty()) | ||
39 | -- | ||
40 | 2.7.4 | ||
41 | |||
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Use-long-long-instead-of-int64_t.patch b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Use-long-long-instead-of-int64_t.patch new file mode 100644 index 000000000..b9c670407 --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Use-long-long-instead-of-int64_t.patch | |||
@@ -0,0 +1,66 @@ | |||
1 | From 20fcbf2a05ee6542aba942f6006d149db70fb9ce Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 2 Sep 2017 10:03:37 -0700 | ||
4 | Subject: [PATCH 02/10] Use long long instead of int64_t | ||
5 | |||
6 | Fixes | ||
7 | error: call to member function 'appendNumber' is ambiguous | ||
8 | since this function expects long long as parameter and not int64_t | ||
9 | |||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | src/mongo/util/procparser.cpp | 10 +++++----- | ||
13 | 1 file changed, 5 insertions(+), 5 deletions(-) | ||
14 | |||
15 | diff --git a/src/mongo/util/procparser.cpp b/src/mongo/util/procparser.cpp | ||
16 | index c574a3f..5ea66b7 100644 | ||
17 | --- a/src/mongo/util/procparser.cpp | ||
18 | +++ b/src/mongo/util/procparser.cpp | ||
19 | @@ -261,7 +261,7 @@ Status parseProcStat(const std::vector<StringData>& keys, | ||
20 | |||
21 | StringData stringValue((*partIt).begin(), (*partIt).end() - (*partIt).begin()); | ||
22 | |||
23 | - uint64_t value; | ||
24 | + long long value; | ||
25 | |||
26 | if (!parseNumberFromString(stringValue, &value).isOK()) { | ||
27 | value = 0; | ||
28 | @@ -273,7 +273,7 @@ Status parseProcStat(const std::vector<StringData>& keys, | ||
29 | } else { | ||
30 | StringData stringValue((*partIt).begin(), (*partIt).end() - (*partIt).begin()); | ||
31 | |||
32 | - uint64_t value; | ||
33 | + long long value; | ||
34 | |||
35 | if (!parseNumberFromString(stringValue, &value).isOK()) { | ||
36 | value = 0; | ||
37 | @@ -366,7 +366,7 @@ Status parseProcMemInfo(const std::vector<StringData>& keys, | ||
38 | |||
39 | StringData stringValue((*partIt).begin(), (*partIt).end()); | ||
40 | |||
41 | - uint64_t value; | ||
42 | + long long value; | ||
43 | |||
44 | if (!parseNumberFromString(stringValue, &value).isOK()) { | ||
45 | value = 0; | ||
46 | @@ -522,7 +522,7 @@ Status parseProcDiskStats(const std::vector<StringData>& disks, | ||
47 | StringData data, | ||
48 | BSONObjBuilder* builder) { | ||
49 | bool foundKeys = false; | ||
50 | - std::vector<uint64_t> stats; | ||
51 | + std::vector<long long> stats; | ||
52 | stats.reserve(kDiskFieldCount); | ||
53 | |||
54 | using string_split_iterator = boost::split_iterator<StringData::const_iterator>; | ||
55 | @@ -597,7 +597,7 @@ Status parseProcDiskStats(const std::vector<StringData>& disks, | ||
56 | |||
57 | StringData stringValue((*partIt).begin(), (*partIt).end()); | ||
58 | |||
59 | - uint64_t value; | ||
60 | + long long value; | ||
61 | |||
62 | if (!parseNumberFromString(stringValue, &value).isOK()) { | ||
63 | value = 0; | ||
64 | -- | ||
65 | 2.7.4 | ||
66 | |||
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-asio-Dont-use-experimental-with-clang.patch b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-asio-Dont-use-experimental-with-clang.patch new file mode 100644 index 000000000..e726933f5 --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-asio-Dont-use-experimental-with-clang.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 097e8a66930cfa28ac8bfa35f62d0a9ee3b74488 Mon Sep 17 00:00:00 2001 | ||
2 | From: Vincent Prince <vincent.prince.fr@gmail.com> | ||
3 | Date: Mon, 16 Sep 2019 13:46:52 +0200 | ||
4 | Subject: [PATCH 10/10] asio: Dont use experimental with clang | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | Signed-off-by: Vincent Prince <vincent.prince.fr@gmail.com> | ||
8 | --- | ||
9 | src/third_party/asio-master/asio/include/asio/detail/string_view.hpp | 4 ++-- | ||
10 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
11 | |||
12 | diff --git a/src/third_party/asio-master/asio/include/asio/detail/string_view.hpp b/src/third_party/asio-master/asio/include/asio/detail/string_view.hpp | ||
13 | index f09cebc..fa307b5 100644 | ||
14 | --- a/src/third_party/asio-master/asio/include/asio/detail/string_view.hpp | ||
15 | +++ b/src/third_party/asio-master/asio/include/asio/detail/string_view.hpp | ||
16 | @@ -33,8 +33,8 @@ namespace asio { | ||
17 | using std::basic_string_view; | ||
18 | using std::string_view; | ||
19 | #elif defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW) | ||
20 | -using std::experimental::basic_string_view; | ||
21 | -using std::experimental::string_view; | ||
22 | +using std::basic_string_view; | ||
23 | +using std::string_view; | ||
24 | #endif // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW) | ||
25 | |||
26 | } // namespace asio | ||
27 | -- | ||
28 | 2.7.4 | ||
29 | |||
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch new file mode 100644 index 000000000..869d2849d --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 73c6374ceb0c062e91210cc9ef3e0e9fa30ee514 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 2 Sep 2017 12:42:30 -0700 | ||
4 | Subject: [PATCH 04/10] Add a definition for the macro __ELF_NATIVE_CLASS | ||
5 | |||
6 | It depends on the native arch's word size. | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | --- | ||
10 | src/mongo/util/stacktrace_posix.cpp | 9 +++++++++ | ||
11 | 1 file changed, 9 insertions(+) | ||
12 | |||
13 | diff --git a/src/mongo/util/stacktrace_posix.cpp b/src/mongo/util/stacktrace_posix.cpp | ||
14 | index 1d7b3d7..f81e329 100644 | ||
15 | --- a/src/mongo/util/stacktrace_posix.cpp | ||
16 | +++ b/src/mongo/util/stacktrace_posix.cpp | ||
17 | @@ -39,6 +39,15 @@ | ||
18 | #include <string> | ||
19 | #include <sys/utsname.h> | ||
20 | |||
21 | +#if !defined(__GLIBC__) | ||
22 | +#if defined __x86_64__ && !defined __ILP32__ | ||
23 | +# define __WORDSIZE 64 | ||
24 | +#else | ||
25 | +# define __WORDSIZE 32 | ||
26 | +#endif | ||
27 | +#define __ELF_NATIVE_CLASS __WORDSIZE | ||
28 | +#endif | ||
29 | + | ||
30 | #include "mongo/base/init.h" | ||
31 | #include "mongo/config.h" | ||
32 | #include "mongo/db/jsobj.h" | ||
33 | -- | ||
34 | 2.7.4 | ||
35 | |||
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0002-Fix-default-stack-size-to-256K.patch b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0002-Fix-default-stack-size-to-256K.patch new file mode 100644 index 000000000..59066b260 --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0002-Fix-default-stack-size-to-256K.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From ffe6045b190b735601cd209d3e7ac121604c5a4e Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 24 Aug 2018 13:07:01 -0700 | ||
4 | Subject: [PATCH 08/10] Fix default stack size to 256K | ||
5 | |||
6 | On musl default stack size is ~80K which is too low | ||
7 | for mongodb | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | src/mongo/platform/stack_locator_pthread_getattr_np.cpp | 10 ++++++++++ | ||
14 | 1 file changed, 10 insertions(+) | ||
15 | |||
16 | diff --git a/src/mongo/platform/stack_locator_pthread_getattr_np.cpp b/src/mongo/platform/stack_locator_pthread_getattr_np.cpp | ||
17 | index 4f3044c..68e47e3 100644 | ||
18 | --- a/src/mongo/platform/stack_locator_pthread_getattr_np.cpp | ||
19 | +++ b/src/mongo/platform/stack_locator_pthread_getattr_np.cpp | ||
20 | @@ -36,6 +36,16 @@ | ||
21 | #include "mongo/util/assert_util.h" | ||
22 | #include "mongo/util/scopeguard.h" | ||
23 | |||
24 | +__attribute__((constructor)) | ||
25 | +static void set_default_stack_size(void) | ||
26 | +{ | ||
27 | + pthread_attr_t attr; | ||
28 | + invariant(pthread_attr_init(&attr) == 0); | ||
29 | + invariant(pthread_attr_setstacksize(&attr, 256*1024) == 0); | ||
30 | + pthread_setattr_default_np(&attr); | ||
31 | + invariant(pthread_attr_destroy(&attr) == 0); | ||
32 | +} | ||
33 | + | ||
34 | namespace mongo { | ||
35 | |||
36 | StackLocator::StackLocator() { | ||
37 | -- | ||
38 | 2.7.4 | ||
39 | |||
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0003-Fix-unknown-prefix-env.patch b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0003-Fix-unknown-prefix-env.patch new file mode 100644 index 000000000..3a27aacfe --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0003-Fix-unknown-prefix-env.patch | |||
@@ -0,0 +1,19 @@ | |||
1 | Index: git/SConstruct | ||
2 | =================================================================== | ||
3 | --- git.orig/SConstruct | ||
4 | +++ git/SConstruct | ||
5 | @@ -884,6 +884,14 @@ env_vars.Add('WINDOWS_OPENSSL_BIN', | ||
6 | help='Sets the path to the openssl binaries for packaging', | ||
7 | default='c:/openssl/bin') | ||
8 | |||
9 | +env_vars.Add('PREFIX', | ||
10 | + help='installation prefix') | ||
11 | + | ||
12 | +env_vars.Add('prefix', | ||
13 | + help='installation prefix') | ||
14 | + | ||
15 | + | ||
16 | + | ||
17 | # -- Validate user provided options -- | ||
18 | |||
19 | # A dummy environment that should *only* have the variables we have set. In practice it has | ||
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0004-wiredtiger-Disable-strtouq-on-musl.patch b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0004-wiredtiger-Disable-strtouq-on-musl.patch new file mode 100644 index 000000000..2cea9bc31 --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0004-wiredtiger-Disable-strtouq-on-musl.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | From cc95a8878fa581b164dee8fb1f07b05b9d919ef0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 2 Sep 2017 13:13:15 -0700 | ||
4 | Subject: [PATCH 09/10] wiredtiger: Disable strtouq on musl | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | --- | ||
8 | src/third_party/wiredtiger/build_linux/wiredtiger_config.h | 2 +- | ||
9 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
10 | |||
11 | diff --git a/src/third_party/wiredtiger/build_linux/wiredtiger_config.h b/src/third_party/wiredtiger/build_linux/wiredtiger_config.h | ||
12 | index 82e9994..0399a67 100644 | ||
13 | --- a/src/third_party/wiredtiger/build_linux/wiredtiger_config.h | ||
14 | +++ b/src/third_party/wiredtiger/build_linux/wiredtiger_config.h | ||
15 | @@ -104,7 +104,7 @@ | ||
16 | #define HAVE_STRING_H 1 | ||
17 | |||
18 | /* Define to 1 if you have the `strtouq' function. */ | ||
19 | -#define HAVE_STRTOUQ 1 | ||
20 | +/* #undef HAVE_STRTOUQ 1 */ | ||
21 | |||
22 | /* Define to 1 if you have the `sync_file_range' function. */ | ||
23 | /* #undef HAVE_SYNC_FILE_RANGE */ | ||
24 | -- | ||
25 | 2.7.4 | ||
26 | |||
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/arm64-support.patch b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/arm64-support.patch new file mode 100644 index 000000000..15bd7da70 --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/arm64-support.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | From c9fc9e9a44b0fb764ce86a5e57f17d3c5bbfd8cd Mon Sep 17 00:00:00 2001 | ||
2 | From: Vincent Prince <vincent.prince.fr@gmail.com> | ||
3 | Date: Mon, 16 Sep 2019 13:37:10 +0200 | ||
4 | Subject: [PATCH 05/10] Add alises for arm64 which is same as aarch64 | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | Signed-off-by: Vincent Prince <vincent.prince.fr@gmail.com> | ||
8 | --- | ||
9 | SConstruct | 1 + | ||
10 | src/third_party/IntelRDFPMathLib20U1/SConscript | 2 +- | ||
11 | src/third_party/wiredtiger/SConscript | 2 +- | ||
12 | 3 files changed, 3 insertions(+), 2 deletions(-) | ||
13 | |||
14 | diff --git a/SConstruct b/SConstruct | ||
15 | index e63cf15..5593c78 100644 | ||
16 | --- a/SConstruct | ||
17 | +++ b/SConstruct | ||
18 | @@ -1129,6 +1129,7 @@ elif endian == "big": | ||
19 | processor_macros = { | ||
20 | 'arm' : { 'endian': 'little', 'defines': ('__arm__',) }, | ||
21 | 'aarch64' : { 'endian': 'little', 'defines': ('__arm64__', '__aarch64__')}, | ||
22 | + 'arm64' : { 'endian': 'little', 'defines': ('__arm64__', '__aarch64__')}, | ||
23 | 'i386' : { 'endian': 'little', 'defines': ('__i386', '_M_IX86')}, | ||
24 | 'ppc64le' : { 'endian': 'little', 'defines': ('__powerpc64__',)}, | ||
25 | 's390x' : { 'endian': 'big', 'defines': ('__s390x__',)}, | ||
26 | diff --git a/src/third_party/IntelRDFPMathLib20U1/SConscript b/src/third_party/IntelRDFPMathLib20U1/SConscript | ||
27 | index f23c071..fb82cd6 100644 | ||
28 | --- a/src/third_party/IntelRDFPMathLib20U1/SConscript | ||
29 | +++ b/src/third_party/IntelRDFPMathLib20U1/SConscript | ||
30 | @@ -308,7 +308,7 @@ if processor == 'i386' or processor == 'emscripten': | ||
31 | elif processor == 'arm': | ||
32 | cpp_defines['IA32'] = '1' | ||
33 | cpp_defines['ia32'] = '1' | ||
34 | -elif processor == "aarch64": | ||
35 | +elif processor == "aarch64" or processor == 'arm64': | ||
36 | cpp_defines['efi2'] = '1' | ||
37 | cpp_defines['EFI2'] = '1' | ||
38 | # Using 64 bit little endian | ||
39 | diff --git a/src/third_party/wiredtiger/SConscript b/src/third_party/wiredtiger/SConscript | ||
40 | index cdd090b..97a1b3b 100644 | ||
41 | --- a/src/third_party/wiredtiger/SConscript | ||
42 | +++ b/src/third_party/wiredtiger/SConscript | ||
43 | @@ -152,7 +152,7 @@ condition_map = { | ||
44 | 'POSIX_HOST' : not env.TargetOSIs('windows'), | ||
45 | 'WINDOWS_HOST' : env.TargetOSIs('windows'), | ||
46 | |||
47 | - 'ARM64_HOST' : env['TARGET_ARCH'] == 'aarch64', | ||
48 | + 'ARM64_HOST' : env['TARGET_ARCH'] in ('aarch64', 'arm64'), | ||
49 | 'POWERPC_HOST' : env['TARGET_ARCH'] == 'ppc64le', | ||
50 | 'X86_HOST' : env['TARGET_ARCH'] == 'x86_64', | ||
51 | 'ZSERIES_HOST' : env['TARGET_ARCH'] == 's390x', | ||
52 | -- | ||
53 | 2.7.4 | ||
54 | |||
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb new file mode 100644 index 000000000..6f460bf76 --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb | |||
@@ -0,0 +1,73 @@ | |||
1 | SUMMARY = "mongodb" | ||
2 | LICENSE = "SSPL-1 & Apache-2.0 & Zlib" | ||
3 | LIC_FILES_CHKSUM = "file://LICENSE-Community.txt;md5=3a865f27f11f43ecbe542d9ea387dcf1 \ | ||
4 | file://APACHE-2.0.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" | ||
5 | |||
6 | DEPENDS = "openssl libpcap zlib boost curl python3 \ | ||
7 | python3-setuptools-native \ | ||
8 | python3-pyyaml-native python3-cheetah-native \ | ||
9 | python3-psutil-native python3-regex-native \ | ||
10 | " | ||
11 | |||
12 | inherit scons dos2unix siteinfo python3native | ||
13 | |||
14 | PV = "4.2.2" | ||
15 | #v4.2.2 | ||
16 | SRCREV = "a0bbbff6ada159e19298d37946ac8dc4b497eadf" | ||
17 | SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.2 \ | ||
18 | file://0001-Tell-scons-to-use-build-settings-from-environment-va.patch \ | ||
19 | file://0001-Use-long-long-instead-of-int64_t.patch \ | ||
20 | file://0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch \ | ||
21 | file://0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch \ | ||
22 | file://arm64-support.patch \ | ||
23 | file://0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch \ | ||
24 | file://0001-Support-deprecated-resolver-functions.patch \ | ||
25 | file://0003-Fix-unknown-prefix-env.patch \ | ||
26 | " | ||
27 | SRC_URI_append_libc-musl ="\ | ||
28 | file://0001-Mark-one-of-strerror_r-implementation-glibc-specific.patch \ | ||
29 | file://0002-Fix-default-stack-size-to-256K.patch \ | ||
30 | file://0004-wiredtiger-Disable-strtouq-on-musl.patch \ | ||
31 | " | ||
32 | |||
33 | SRC_URI_append_toolchain-clang = "\ | ||
34 | file://0001-asio-Dont-use-experimental-with-clang.patch \ | ||
35 | " | ||
36 | |||
37 | S = "${WORKDIR}/git" | ||
38 | |||
39 | COMPATIBLE_HOST ?= '(x86_64|powerpc64|aarch64).*-linux' | ||
40 | |||
41 | PACKAGECONFIG ??= "tcmalloc system-pcre" | ||
42 | # gperftools compilation fails for arm below v7 because of missing support of | ||
43 | # dmb operation. So we use system-allocator instead of tcmalloc | ||
44 | PACKAGECONFIG_remove_armv6 = "tcmalloc" | ||
45 | PACKAGECONFIG_remove_libc-musl = "tcmalloc" | ||
46 | |||
47 | PACKAGECONFIG[tcmalloc] = "--use-system-tcmalloc,--allocator=system,gperftools," | ||
48 | PACKAGECONFIG[shell] = ",--js-engine=none,," | ||
49 | PACKAGECONFIG[system-pcre] = "--use-system-pcre,,libpcre," | ||
50 | |||
51 | EXTRA_OESCONS = "--prefix=${D}${prefix} \ | ||
52 | LIBPATH=${STAGING_LIBDIR} \ | ||
53 | LINKFLAGS='${LDFLAGS}' \ | ||
54 | CXXFLAGS='${CXXFLAGS}' \ | ||
55 | TARGET_ARCH=${TARGET_ARCH} \ | ||
56 | --ssl \ | ||
57 | --disable-warnings-as-errors \ | ||
58 | --use-system-zlib \ | ||
59 | --nostrip \ | ||
60 | --endian=${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \ | ||
61 | --wiredtiger=${@['off','on'][d.getVar('SITEINFO_BITS') != '32']} \ | ||
62 | ${PACKAGECONFIG_CONFARGS} \ | ||
63 | core" | ||
64 | |||
65 | scons_do_compile() { | ||
66 | ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} ${EXTRA_OESCONS} || \ | ||
67 | die "scons build execution failed." | ||
68 | } | ||
69 | |||
70 | scons_do_install() { | ||
71 | ${STAGING_BINDIR_NATIVE}/scons install ${EXTRA_OESCONS}|| \ | ||
72 | die "scons install execution failed." | ||
73 | } | ||