diff options
Diffstat (limited to 'meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb')
12 files changed, 319 insertions, 714 deletions
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Fix-type-mismatch-on-32bit-arches.patch b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Fix-type-mismatch-on-32bit-arches.patch new file mode 100644 index 0000000000..def17995dc --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Fix-type-mismatch-on-32bit-arches.patch @@ -0,0 +1,33 @@ +From 81eabea4e4da55cddfe8bcfcbc3759fa90948254 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 3 Mar 2023 14:13:29 -0800 +Subject: [PATCH] Fix type mismatch on 32bit arches + +std::set::size returns an unsigned integral type. +std::max call therefore gets (unsigned int, unsigned long) here. +Type of both arguments is not same, so its ambigous +and there is no matching std::max implementation for mismatching +arguments. std::max expects both input variables to be of +same type, max(int,int) etc.. + +Fixes +src/mongo/util/processinfo_linux.cpp:424:16: error: no matching function for call to 'max' + return std::max(socketIds.size(), 1ul); + +Upstream-Status: Submitted [https://jira.mongodb.org/browse/SERVER-74633] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/mongo/util/processinfo_linux.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/src/mongo/util/processinfo_linux.cpp ++++ b/src/mongo/util/processinfo_linux.cpp +@@ -421,7 +421,7 @@ public: + + // On ARM64, the "physical id" field is unpopulated, causing there to be 0 sockets found. In + // this case, we default to 1. +- return std::max(socketIds.size(), 1ul); ++ return std::max(static_cast<unsigned long>(socketIds.size()), 1ul); + } + + /** diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-The-std-lib-unary-binary_function-base-classes-are-d.patch b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-The-std-lib-unary-binary_function-base-classes-are-d.patch new file mode 100644 index 0000000000..4594bec81a --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-The-std-lib-unary-binary_function-base-classes-are-d.patch @@ -0,0 +1,40 @@ +From f9b55f5a1fab85bf73c95e6372779d6f50f75e84 Mon Sep 17 00:00:00 2001 +From: jzmaddock <john@johnmaddock.co.uk> +Date: Mon, 11 Jul 2022 18:26:07 +0100 +Subject: [PATCH] The std lib unary/binary_function base classes are + deprecated/removed from libcpp15. Fixes + https://github.com/boostorg/container_hash/issues/24. + +Upstream-Status: Backport [https://github.com/boostorg/config/pull/440/commits/f0af4a9184457939b89110795ae2d293582c5f66] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/third_party/boost-1.70.0/boost/config/stdlib/libcpp.hpp | 9 +++++++++ + 1 file changed, 9 insertions(+) + +--- a/src/third_party/boost-1.70.0/boost/config/stdlib/libcpp.hpp ++++ b/src/third_party/boost-1.70.0/boost/config/stdlib/libcpp.hpp +@@ -140,4 +140,13 @@ + # define BOOST_NO_CXX14_HDR_SHARED_MUTEX + #endif + ++#if _LIBCPP_VERSION >= 15000 ++// ++// Unary function is now deprecated in C++11 and later: ++// ++#if __cplusplus >= 201103L ++#define BOOST_NO_CXX98_FUNCTION_BASE ++#endif ++#endif ++ + // --- end --- +--- a/src/third_party/boost-1.70.0/boost/container_hash/hash.hpp ++++ b/src/third_party/boost-1.70.0/boost/container_hash/hash.hpp +@@ -118,7 +118,7 @@ namespace boost + { + namespace hash_detail + { +-#if defined(_HAS_AUTO_PTR_ETC) && !_HAS_AUTO_PTR_ETC ++#if defined(BOOST_NO_CXX98_FUNCTION_BASE) + template <typename T> + struct hash_base + { diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-add-explict-static_cast-size_t-to-maxMemoryUsageByte.patch b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-add-explict-static_cast-size_t-to-maxMemoryUsageByte.patch new file mode 100644 index 0000000000..de05624429 --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-add-explict-static_cast-size_t-to-maxMemoryUsageByte.patch @@ -0,0 +1,38 @@ +From ad37ee80b32a1f740a3197105174d74dff11e4e8 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 13 Apr 2022 13:56:32 -0700 +Subject: [PATCH] add explict static_cast<size_t> to maxMemoryUsageBytes + +Fixes +src/mongo/db/pipeline/document_source_group.cpp:377:22: error: non-constant-expression cannot be narrowed from type 'long long' to 'size_t' (aka 'unsigned int') in initializer list [-Wc++11-narrowing] + maxMemoryUsageBytes ? *maxMemoryUsageBytes + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src/mongo/db/pipeline/document_source_group.cpp:377:22: note: insert an explicit cast to silence this issue + maxMemoryUsageBytes ? *maxMemoryUsageBytes + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/mongo/db/pipeline/document_source_group.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/mongo/db/pipeline/document_source_group.cpp b/src/mongo/db/pipeline/document_source_group.cpp +index 4a7b48d6cd2..9a6076c6041 100644 +--- a/src/mongo/db/pipeline/document_source_group.cpp ++++ b/src/mongo/db/pipeline/document_source_group.cpp +@@ -374,8 +374,8 @@ DocumentSourceGroup::DocumentSourceGroup(const intrusive_ptr<ExpressionContext>& + _usedDisk(false), + _doingMerge(false), + _memoryTracker{pExpCtx->allowDiskUse && !pExpCtx->inMongos, +- maxMemoryUsageBytes ? *maxMemoryUsageBytes +- : internalDocumentSourceGroupMaxMemoryBytes.load()}, ++ static_cast<size_t>(maxMemoryUsageBytes ? *maxMemoryUsageBytes ++ : internalDocumentSourceGroupMaxMemoryBytes.load())}, + // We spill to disk in debug mode, regardless of allowDiskUse, to stress the system. + _file(!pExpCtx->inMongos && (pExpCtx->allowDiskUse || kDebugBuild) + ? std::make_shared<Sorter<Value, Value>::File>(pExpCtx->tempDir + "/" + +-- +2.35.2 + diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-apply-msvc-workaround-for-clang-16.patch b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-apply-msvc-workaround-for-clang-16.patch new file mode 100644 index 0000000000..096269308d --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-apply-msvc-workaround-for-clang-16.patch @@ -0,0 +1,32 @@ +From 03047c81b2601362bcf79cae67e06d1fba0a6101 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 2 Mar 2023 20:17:57 -0800 +Subject: [PATCH] apply msvc workaround for clang >= 16 + +This avoids a new Werror found with clang16 + +boost-1.70.0/boost/mpl/aux_/integral_wrapper.hpp:73:31: error: integer value -1 is outside the valid range of values [0, 3] for this enumeration type [-Wenum-constexpr-conversion] + typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (value - 1)) ) prior; + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + .../boost-1.70.0/boost/mpl/aux_/integral_wrapper.hpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/third_party/boost-1.70.0/boost/mpl/aux_/integral_wrapper.hpp b/src/third_party/boost-1.70.0/boost/mpl/aux_/integral_wrapper.hpp +index 6bc05f7e96e..6bb8d24c9ce 100644 +--- a/src/third_party/boost-1.70.0/boost/mpl/aux_/integral_wrapper.hpp ++++ b/src/third_party/boost-1.70.0/boost/mpl/aux_/integral_wrapper.hpp +@@ -56,7 +56,7 @@ struct AUX_WRAPPER_NAME + // have to #ifdef here: some compilers don't like the 'N + 1' form (MSVC), + // while some other don't like 'value + 1' (Borland), and some don't like + // either +-#if BOOST_WORKAROUND(__EDG_VERSION__, <= 243) ++#if BOOST_WORKAROUND(__EDG_VERSION__, <= 243) || __clang_major__ > 15 + private: + BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, next_value = BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N + 1))); + BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, prior_value = BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N - 1))); +-- +2.39.2 + diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-free_mon-Include-missing-cstdint.patch b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-free_mon-Include-missing-cstdint.patch new file mode 100644 index 0000000000..1373d1a794 --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-free_mon-Include-missing-cstdint.patch @@ -0,0 +1,26 @@ +From 5d8218b8a1b5bc71e2a0cf543a000e194daba599 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 29 Jan 2023 17:15:30 -0800 +Subject: [PATCH] free_mon: Include missing <cstdint> + +gcc 13 moved some includes around and as a result <cstdint> is no +longer transitively included [1]. Explicitly include it +for uintXX_t. + +[1] https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/mongo/db/free_mon/free_mon_options.h | 1 + + 1 file changed, 1 insertion(+) + +--- a/src/mongo/db/free_mon/free_mon_options.h ++++ b/src/mongo/db/free_mon/free_mon_options.h +@@ -29,6 +29,7 @@ + + #pragma once + ++#include <cstdint> + #include <string> + #include <vector> + diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-include-needed-c-header.patch b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-include-needed-c-header.patch new file mode 100644 index 0000000000..581c2390ec --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-include-needed-c-header.patch @@ -0,0 +1,29 @@ +From 383b1dda4800c2514cb31446cd7478692d7d26cf Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 3 Mar 2021 12:43:16 -0800 +Subject: [PATCH] include needed c++ header + +Fixes +plan_stats.h:214:10: error: 'optional' in namespace 'std' does not name a template type + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/mongo/db/exec/plan_stats.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/mongo/db/exec/plan_stats.h b/src/mongo/db/exec/plan_stats.h +index ea75f673b8..0cc9b4636d 100644 +--- a/src/mongo/db/exec/plan_stats.h ++++ b/src/mongo/db/exec/plan_stats.h +@@ -31,6 +31,7 @@ + + #include <cstdint> + #include <cstdlib> ++#include <optional> + #include <string> + #include <vector> + +-- +2.30.1 + diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-kms-message-bump-libmongocrypto-to-v1.0.4.patch b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-kms-message-bump-libmongocrypto-to-v1.0.4.patch deleted file mode 100644 index df4cee2b42..0000000000 --- a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-kms-message-bump-libmongocrypto-to-v1.0.4.patch +++ /dev/null @@ -1,714 +0,0 @@ -From 44272ce47e768e090263df5cb9cb7ce17e544ad3 Mon Sep 17 00:00:00 2001 -From: Vincent Prince <vincent.prince.external@saftbatteries.com> -Date: Tue, 15 Sep 2020 11:40:15 +0200 -Subject: [PATCH] kms-message: bump libmongocrypto to v1.0.4 - -This fixes compilation with alpinelinux -see https://github.com/mongodb/libmongocrypt/pull/89 - -Upstream-Status: Pending - -Signed-off-by: Vincent Prince <vincent.prince.fr@gmail.com> ---- - .../kms-message/THIRD_PARTY_NOTICES | 2 +- - src/third_party/kms-message/src/hexlify.c | 21 +---- - src/third_party/kms-message/src/hexlify.h | 2 - - .../kms-message/src/kms_crypto_apple.c | 5 + - .../kms-message/src/kms_crypto_libcrypto.c | 94 +++++++++++++++++++ - .../kms-message/src/kms_crypto_none.c | 4 + - .../kms-message/src/kms_crypto_windows.c | 4 + - .../kms-message/src/kms_decrypt_request.c | 2 +- - .../kms-message/src/kms_encrypt_request.c | 2 +- - src/third_party/kms-message/src/kms_kv_list.c | 11 ++- - .../kms-message/src/kms_message/kms_message.h | 2 + - .../src/kms_message/kms_message_defines.h | 10 ++ - src/third_party/kms-message/src/kms_port.c | 33 +++++++ - src/third_party/kms-message/src/kms_port.h | 27 +++--- - src/third_party/kms-message/src/kms_request.c | 41 +++++--- - .../kms-message/src/kms_request_str.c | 13 ++- - .../kms-message/src/kms_request_str.h | 5 - - .../kms-message/src/kms_response_parser.c | 26 ++++- - .../scripts/kms_message_get_sources.sh | 2 +- - 19 files changed, 244 insertions(+), 62 deletions(-) - create mode 100644 src/third_party/kms-message/src/kms_crypto_libcrypto.c - create mode 100644 src/third_party/kms-message/src/kms_port.c - -diff --git a/src/third_party/kms-message/THIRD_PARTY_NOTICES b/src/third_party/kms-message/THIRD_PARTY_NOTICES -index 3fc095170c..4110c1b91e 100644 ---- a/src/third_party/kms-message/THIRD_PARTY_NOTICES -+++ b/src/third_party/kms-message/THIRD_PARTY_NOTICES -@@ -1,4 +1,4 @@ --License notice for common-b64.c -+License notice for kms_b64.c - ------------------------------------------------------------------------------- - - ISC License -diff --git a/src/third_party/kms-message/src/hexlify.c b/src/third_party/kms-message/src/hexlify.c -index be9ee030b9..941fc93d1b 100644 ---- a/src/third_party/kms-message/src/hexlify.c -+++ b/src/third_party/kms-message/src/hexlify.c -@@ -24,6 +24,8 @@ char * - hexlify (const uint8_t *buf, size_t len) - { - char *hex_chars = malloc (len * 2 + 1); -+ KMS_ASSERT (hex_chars); -+ - char *p = hex_chars; - size_t i; - -@@ -35,22 +37,3 @@ hexlify (const uint8_t *buf, size_t len) - - return hex_chars; - } -- --uint8_t * --unhexlify (const char *hex_chars, size_t *len) --{ -- uint8_t *buf; -- uint8_t *pos; -- -- *len = strlen (hex_chars) / 2; -- buf = malloc (*len); -- pos = buf; -- -- while (*hex_chars) { -- KMS_ASSERT (1 == sscanf (hex_chars, "%2hhx", pos)); -- pos++; -- hex_chars += 2; -- } -- -- return buf; --} -diff --git a/src/third_party/kms-message/src/hexlify.h b/src/third_party/kms-message/src/hexlify.h -index e0096eb6ca..a6a504ebe8 100644 ---- a/src/third_party/kms-message/src/hexlify.h -+++ b/src/third_party/kms-message/src/hexlify.h -@@ -19,5 +19,3 @@ - - char * - hexlify (const uint8_t *buf, size_t len); --uint8_t * --unhexlify (const char *hex_chars, size_t *len); -diff --git a/src/third_party/kms-message/src/kms_crypto_apple.c b/src/third_party/kms-message/src/kms_crypto_apple.c -index 61da0a6288..a26e0d65e8 100644 ---- a/src/third_party/kms-message/src/kms_crypto_apple.c -+++ b/src/third_party/kms-message/src/kms_crypto_apple.c -@@ -16,9 +16,12 @@ - - #include "kms_crypto.h" - -+#ifdef KMS_MESSAGE_ENABLE_CRYPTO_COMMON_CRYPTO -+ - #include <CommonCrypto/CommonDigest.h> - #include <CommonCrypto/CommonHMAC.h> - -+ - int - kms_crypto_init () - { -@@ -54,3 +57,5 @@ kms_sha256_hmac (void *unused_ctx, - CCHmac (kCCHmacAlgSHA256, key_input, key_len, input, len, hash_out); - return true; - } -+ -+#endif /* KMS_MESSAGE_ENABLE_CRYPTO_COMMON_CRYPTO */ -diff --git a/src/third_party/kms-message/src/kms_crypto_libcrypto.c b/src/third_party/kms-message/src/kms_crypto_libcrypto.c -new file mode 100644 -index 0000000000..6f25657fdd ---- /dev/null -+++ b/src/third_party/kms-message/src/kms_crypto_libcrypto.c -@@ -0,0 +1,94 @@ -+/* -+ * Copyright 2018-present MongoDB, Inc. -+ * -+ * Licensed under the Apache License, Version 2.0 (the "License"); -+ * you may not use this file except in compliance with the License. -+ * You may obtain a copy of the License at -+ * -+ * http://www.apache.org/licenses/LICENSE-2.0 -+ * -+ * Unless required by applicable law or agreed to in writing, software -+ * distributed under the License is distributed on an "AS IS" BASIS, -+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+ * See the License for the specific language governing permissions and -+ * limitations under the License. -+ */ -+ -+#include "kms_crypto.h" -+ -+#ifdef KMS_MESSAGE_ENABLE_CRYPTO_LIBCRYPTO -+ -+#include <openssl/sha.h> -+#include <openssl/evp.h> -+#include <openssl/hmac.h> -+ -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || \ -+ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) -+static EVP_MD_CTX * -+EVP_MD_CTX_new (void) -+{ -+ return calloc (sizeof (EVP_MD_CTX), 1); -+} -+ -+static void -+EVP_MD_CTX_free (EVP_MD_CTX *ctx) -+{ -+ EVP_MD_CTX_cleanup (ctx); -+ free (ctx); -+} -+#endif -+ -+int -+kms_crypto_init () -+{ -+ return 0; -+} -+ -+void -+kms_crypto_cleanup () -+{ -+} -+ -+bool -+kms_sha256 (void *unused_ctx, -+ const char *input, -+ size_t len, -+ unsigned char *hash_out) -+{ -+ EVP_MD_CTX *digest_ctxp = EVP_MD_CTX_new (); -+ bool rval = false; -+ -+ if (1 != EVP_DigestInit_ex (digest_ctxp, EVP_sha256 (), NULL)) { -+ goto cleanup; -+ } -+ -+ if (1 != EVP_DigestUpdate (digest_ctxp, input, len)) { -+ goto cleanup; -+ } -+ -+ rval = (1 == EVP_DigestFinal_ex (digest_ctxp, hash_out, NULL)); -+ -+cleanup: -+ EVP_MD_CTX_free (digest_ctxp); -+ -+ return rval; -+} -+ -+bool -+kms_sha256_hmac (void *unused_ctx, -+ const char *key_input, -+ size_t key_len, -+ const char *input, -+ size_t len, -+ unsigned char *hash_out) -+{ -+ return HMAC (EVP_sha256 (), -+ key_input, -+ key_len, -+ (unsigned char *) input, -+ len, -+ hash_out, -+ NULL) != NULL; -+} -+ -+#endif /* KMS_MESSAGE_ENABLE_CRYPTO_LIBCRYPTO */ -diff --git a/src/third_party/kms-message/src/kms_crypto_none.c b/src/third_party/kms-message/src/kms_crypto_none.c -index 9ef2147687..94da5abd88 100644 ---- a/src/third_party/kms-message/src/kms_crypto_none.c -+++ b/src/third_party/kms-message/src/kms_crypto_none.c -@@ -16,6 +16,8 @@ - - #include "kms_crypto.h" - -+#ifndef KMS_MESSAGE_ENABLE_CRYPTO -+ - int - kms_crypto_init () - { -@@ -48,3 +50,5 @@ kms_sha256_hmac (void *unused_ctx, - /* only gets called if hooks were mistakenly not set */ - return false; - } -+ -+#endif /* KMS_MESSAGE_ENABLE_CRYPTO */ -diff --git a/src/third_party/kms-message/src/kms_crypto_windows.c b/src/third_party/kms-message/src/kms_crypto_windows.c -index ccdc7e095d..8177b0ddc0 100644 ---- a/src/third_party/kms-message/src/kms_crypto_windows.c -+++ b/src/third_party/kms-message/src/kms_crypto_windows.c -@@ -16,6 +16,8 @@ - - #include "kms_crypto.h" - -+#ifdef KMS_MESSAGE_ENABLE_CRYPTO_CNG -+ - // tell windows.h not to include a bunch of headers we don't need: - #define WIN32_LEAN_AND_MEAN - -@@ -130,3 +132,5 @@ cleanup: - - return status == STATUS_SUCCESS ? 1 : 0; - } -+ -+#endif /* KMS_MESSAGE_ENABLE_CRYPTO_CNG */ -diff --git a/src/third_party/kms-message/src/kms_decrypt_request.c b/src/third_party/kms-message/src/kms_decrypt_request.c -index 06faa43119..f1ca282768 100644 ---- a/src/third_party/kms-message/src/kms_decrypt_request.c -+++ b/src/third_party/kms-message/src/kms_decrypt_request.c -@@ -48,7 +48,7 @@ kms_decrypt_request_new (const uint8_t *ciphertext_blob, - if (!(b64 = malloc (b64_len))) { - KMS_ERROR (request, - "Could not allocate %d bytes for base64-encoding payload", -- b64_len); -+ (int) b64_len); - goto done; - } - -diff --git a/src/third_party/kms-message/src/kms_encrypt_request.c b/src/third_party/kms-message/src/kms_encrypt_request.c -index b5f4d6436e..24b064d95f 100644 ---- a/src/third_party/kms-message/src/kms_encrypt_request.c -+++ b/src/third_party/kms-message/src/kms_encrypt_request.c -@@ -47,7 +47,7 @@ kms_encrypt_request_new (const uint8_t *plaintext, - if (!(b64 = malloc (b64_len))) { - KMS_ERROR (request, - "Could not allocate %d bytes for base64-encoding payload", -- b64_len); -+ (int) b64_len); - goto done; - } - -diff --git a/src/third_party/kms-message/src/kms_kv_list.c b/src/third_party/kms-message/src/kms_kv_list.c -index 2d6845a1aa..0cff3dc2c6 100644 ---- a/src/third_party/kms-message/src/kms_kv_list.c -+++ b/src/third_party/kms-message/src/kms_kv_list.c -@@ -17,6 +17,7 @@ - - #include "kms_kv_list.h" - #include "kms_message/kms_message.h" -+#include "kms_message_private.h" - #include "kms_request_str.h" - #include "kms_port.h" - #include "sort.h" -@@ -39,9 +40,12 @@ kms_kv_list_t * - kms_kv_list_new (void) - { - kms_kv_list_t *lst = malloc (sizeof (kms_kv_list_t)); -+ KMS_ASSERT (lst); - - lst->size = 16; - lst->kvs = malloc (lst->size * sizeof (kms_kv_t)); -+ KMS_ASSERT (lst->kvs); -+ - lst->len = 0; - - return lst; -@@ -72,6 +76,7 @@ kms_kv_list_add (kms_kv_list_t *lst, - if (lst->len == lst->size) { - lst->size *= 2; - lst->kvs = realloc (lst->kvs, lst->size * sizeof (kms_kv_t)); -+ KMS_ASSERT (lst->kvs); - } - - kv_init (&lst->kvs[lst->len], key, value); -@@ -84,7 +89,7 @@ kms_kv_list_find (const kms_kv_list_t *lst, const char *key) - size_t i; - - for (i = 0; i < lst->len; i++) { -- if (0 == strcasecmp (lst->kvs[i].key->str, key)) { -+ if (0 == kms_strcasecmp (lst->kvs[i].key->str, key)) { - return &lst->kvs[i]; - } - } -@@ -119,8 +124,12 @@ kms_kv_list_dup (const kms_kv_list_t *lst) - } - - dup = malloc (sizeof (kms_kv_list_t)); -+ KMS_ASSERT (dup); -+ - dup->size = dup->len = lst->len; - dup->kvs = malloc (lst->len * sizeof (kms_kv_t)); -+ KMS_ASSERT (dup->kvs); -+ - - for (i = 0; i < lst->len; i++) { - kv_init (&dup->kvs[i], lst->kvs[i].key, lst->kvs[i].value); -diff --git a/src/third_party/kms-message/src/kms_message/kms_message.h b/src/third_party/kms-message/src/kms_message/kms_message.h -index 6ea95dd04c..8048528f2e 100644 ---- a/src/third_party/kms-message/src/kms_message/kms_message.h -+++ b/src/third_party/kms-message/src/kms_message/kms_message.h -@@ -17,6 +17,8 @@ - #ifndef KMS_MESSAGE_H - #define KMS_MESSAGE_H - -+#include <sys/types.h> -+ - #include "kms_message_defines.h" - #include "kms_request_opt.h" - #include "kms_request.h" -diff --git a/src/third_party/kms-message/src/kms_message/kms_message_defines.h b/src/third_party/kms-message/src/kms_message/kms_message_defines.h -index a4d019bd77..a539d531ef 100644 ---- a/src/third_party/kms-message/src/kms_message/kms_message_defines.h -+++ b/src/third_party/kms-message/src/kms_message/kms_message_defines.h -@@ -53,4 +53,14 @@ kms_message_cleanup (void); - } /* extern "C" */ - #endif - -+#ifdef _MSC_VER -+#include <basetsd.h> -+#pragma warning(disable : 4142) -+#ifndef _SSIZE_T_DEFINED -+#define _SSIZE_T_DEFINED -+typedef SSIZE_T ssize_t; -+#endif -+#pragma warning(default : 4142) -+#endif -+ - #endif /* KMS_MESSAGE_DEFINES_H */ -diff --git a/src/third_party/kms-message/src/kms_port.c b/src/third_party/kms-message/src/kms_port.c -new file mode 100644 -index 0000000000..ee9e6ed9c9 ---- /dev/null -+++ b/src/third_party/kms-message/src/kms_port.c -@@ -0,0 +1,33 @@ -+/* -+ * Copyright 2020-present MongoDB, Inc. -+ * -+ * Licensed under the Apache License, Version 2.0 (the "License"); -+ * you may not use this file except in compliance with the License. -+ * You may obtain a copy of the License at -+ * -+ * http://www.apache.org/licenses/LICENSE-2.0 -+ * -+ * Unless required by applicable law or agreed to in writing, software -+ * distributed under the License is distributed on an "AS IS" BASIS, -+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+ * See the License for the specific language governing permissions and -+ * limitations under the License. -+ */ -+ -+#include "kms_port.h" -+#if defined(_WIN32) -+#include <stdlib.h> -+#include <string.h> -+char * kms_strndup (const char *src, size_t len) -+{ -+ char *dst = (char *) malloc (len + 1); -+ if (!dst) { -+ return 0; -+ } -+ -+ memcpy (dst, src, len); -+ dst[len] = '\0'; -+ -+ return dst; -+} -+#endif -\ No newline at end of file -diff --git a/src/third_party/kms-message/src/kms_port.h b/src/third_party/kms-message/src/kms_port.h -index c3cbbac369..2123a99dc9 100644 ---- a/src/third_party/kms-message/src/kms_port.h -+++ b/src/third_party/kms-message/src/kms_port.h -@@ -15,21 +15,18 @@ - * limitations under the License. - */ - --#if defined(_WIN32) --#define strcasecmp _stricmp -- --inline char * --strndup (const char *src, size_t len) --{ -- char *dst = (char *) malloc (len + 1); -- if (!dst) { -- return 0; -- } -- -- memcpy (dst, src, len); -- dst[len] = '\0'; -+#ifndef KMS_PORT_H -+#define KMS_PORT_H - -- return dst; --} -+#include <stddef.h> - -+#if defined(_WIN32) -+#define kms_strcasecmp _stricmp -+char * -+kms_strndup (const char *src, size_t len); -+#else -+#define kms_strndup strndup -+#define kms_strcasecmp strcasecmp - #endif -+ -+#endif /* KMS_PORT_H */ -\ No newline at end of file -diff --git a/src/third_party/kms-message/src/kms_request.c b/src/third_party/kms-message/src/kms_request.c -index fa2d487123..ac2b07ea6b 100644 ---- a/src/third_party/kms-message/src/kms_request.c -+++ b/src/third_party/kms-message/src/kms_request.c -@@ -61,6 +61,7 @@ kms_request_new (const char *method, - kms_request_t *request = calloc (1, sizeof (kms_request_t)); - const char *question_mark; - -+ KMS_ASSERT (request); - /* parsing may set failed to true */ - request->failed = false; - -@@ -92,10 +93,14 @@ kms_request_new (const char *method, - request->header_fields = kms_kv_list_new (); - request->auto_content_length = true; - -- kms_request_set_date (request, NULL); -+ if (!kms_request_set_date (request, NULL)) { -+ return request; -+ } - - if (opt && opt->connection_close) { -- kms_request_add_header_field (request, "Connection", "close"); -+ if (!kms_request_add_header_field (request, "Connection", "close")) { -+ return request; -+ } - } - - if (opt && opt->crypto.sha256) { -@@ -164,7 +169,9 @@ kms_request_set_date (kms_request_t *request, const struct tm *tm) - kms_request_str_set_chars (request->date, buf, sizeof "YYYYmmDD" - 1); - kms_request_str_set_chars (request->datetime, buf, sizeof AMZ_DT_FORMAT - 1); - kms_kv_list_del (request->header_fields, "X-Amz-Date"); -- kms_request_add_header_field (request, "X-Amz-Date", buf); -+ if (!kms_request_add_header_field (request, "X-Amz-Date", buf)) { -+ return false; -+ } - - return true; - } -@@ -309,7 +316,8 @@ append_canonical_headers (kms_kv_list_t *lst, kms_request_str_t *str) - * values in headers that have multiple values." */ - for (i = 0; i < lst->len; i++) { - kv = &lst->kvs[i]; -- if (previous_key && 0 == strcasecmp (previous_key->str, kv->key->str)) { -+ if (previous_key && -+ 0 == kms_strcasecmp (previous_key->str, kv->key->str)) { - /* duplicate header */ - kms_request_str_append_char (str, ','); - kms_request_str_append_stripped (str, kv->value); -@@ -339,12 +347,13 @@ append_signed_headers (kms_kv_list_t *lst, kms_request_str_t *str) - - for (i = 0; i < lst->len; i++) { - kv = &lst->kvs[i]; -- if (previous_key && 0 == strcasecmp (previous_key->str, kv->key->str)) { -+ if (previous_key && -+ 0 == kms_strcasecmp (previous_key->str, kv->key->str)) { - /* duplicate header */ - continue; - } - -- if (0 == strcasecmp (kv->key->str, "connection")) { -+ if (0 == kms_strcasecmp (kv->key->str, "connection")) { - continue; - } - -@@ -412,7 +421,8 @@ finalize (kms_request_t *request) - static int - cmp_header_field_names (const void *a, const void *b) - { -- return strcasecmp (((kms_kv_t *) a)->key->str, ((kms_kv_t *) b)->key->str); -+ return kms_strcasecmp (((kms_kv_t *) a)->key->str, -+ ((kms_kv_t *) b)->key->str); - } - - static kms_kv_list_t * -@@ -447,6 +457,7 @@ kms_request_get_canonical (kms_request_t *request) - kms_request_str_append_newline (canonical); - normalized = kms_request_str_path_normalized (request->path); - kms_request_str_append_escaped (canonical, normalized, false); -+ kms_request_str_destroy (normalized); - kms_request_str_append_newline (canonical); - append_canonical_query (request, canonical); - kms_request_str_append_newline (canonical); -@@ -454,12 +465,14 @@ kms_request_get_canonical (kms_request_t *request) - append_canonical_headers (lst, canonical); - kms_request_str_append_newline (canonical); - append_signed_headers (lst, canonical); -- kms_request_str_append_newline (canonical); -- kms_request_str_append_hashed ( -- &request->crypto, canonical, request->payload); -- -- kms_request_str_destroy (normalized); - kms_kv_list_destroy (lst); -+ kms_request_str_append_newline (canonical); -+ if (!kms_request_str_append_hashed ( -+ &request->crypto, canonical, request->payload)) { -+ KMS_ERROR (request, "could not generate hash"); -+ kms_request_str_destroy (canonical); -+ return NULL; -+ } - - return kms_request_str_detach (canonical); - } -@@ -514,6 +527,10 @@ kms_request_get_string_to_sign (kms_request_t *request) - kms_request_str_append_chars (sts, "/aws4_request\n", -1); - - creq = kms_request_str_wrap (kms_request_get_canonical (request), -1); -+ if (!creq) { -+ goto done; -+ } -+ - if (!kms_request_str_append_hashed (&request->crypto, sts, creq)) { - goto done; - } -diff --git a/src/third_party/kms-message/src/kms_request_str.c b/src/third_party/kms-message/src/kms_request_str.c -index 0f7c19c972..65207d2f4f 100644 ---- a/src/third_party/kms-message/src/kms_request_str.c -+++ b/src/third_party/kms-message/src/kms_request_str.c -@@ -51,10 +51,13 @@ kms_request_str_t * - kms_request_str_new (void) - { - kms_request_str_t *s = malloc (sizeof (kms_request_str_t)); -+ KMS_ASSERT (s); - - s->len = 0; - s->size = 16; - s->str = malloc (s->size); -+ KMS_ASSERT (s->str); -+ - s->str[0] = '\0'; - - return s; -@@ -64,11 +67,15 @@ kms_request_str_t * - kms_request_str_new_from_chars (const char *chars, ssize_t len) - { - kms_request_str_t *s = malloc (sizeof (kms_request_str_t)); -+ KMS_ASSERT (s); -+ - size_t actual_len; - - actual_len = len < 0 ? strlen (chars) : (size_t) len; - s->size = actual_len + 1; - s->str = malloc (s->size); -+ KMS_ASSERT (s->str); -+ - memcpy (s->str, chars, actual_len); - s->str[actual_len] = '\0'; - s->len = actual_len; -@@ -86,6 +93,8 @@ kms_request_str_wrap (char *chars, ssize_t len) - } - - s = malloc (sizeof (kms_request_str_t)); -+ KMS_ASSERT (s); -+ - - s->str = chars; - s->len = len < 0 ? strlen (chars) : (size_t) len; -@@ -148,8 +157,10 @@ kms_request_str_t * - kms_request_str_dup (kms_request_str_t *str) - { - kms_request_str_t *dup = malloc (sizeof (kms_request_str_t)); -+ KMS_ASSERT (dup); -+ - -- dup->str = strndup (str->str, str->len); -+ dup->str = kms_strndup (str->str, str->len); - dup->len = str->len; - dup->size = str->len + 1; - -diff --git a/src/third_party/kms-message/src/kms_request_str.h b/src/third_party/kms-message/src/kms_request_str.h -index f053a595aa..0898f59067 100644 ---- a/src/third_party/kms-message/src/kms_request_str.h -+++ b/src/third_party/kms-message/src/kms_request_str.h -@@ -25,11 +25,6 @@ - #include <stdint.h> - #include <string.h> - --#if defined(_WIN32) --#include <basetsd.h> --typedef SSIZE_T ssize_t; --#endif // _WIN32 -- - typedef struct { - char *str; - size_t len; -diff --git a/src/third_party/kms-message/src/kms_response_parser.c b/src/third_party/kms-message/src/kms_response_parser.c -index 31e4868a68..6f86fac854 100644 ---- a/src/third_party/kms-message/src/kms_response_parser.c -+++ b/src/third_party/kms-message/src/kms_response_parser.c -@@ -1,7 +1,7 @@ - #include "kms_message/kms_response_parser.h" - #include "kms_message_private.h" - --#include "kms_message_private.h" -+#include <errno.h> - #include <limits.h> - #include <stdio.h> - #include <stdlib.h> -@@ -24,6 +24,7 @@ _parser_init (kms_response_parser_t *parser) - parser->raw_response = kms_request_str_new (); - parser->content_length = -1; - parser->response = calloc (1, sizeof (kms_response_t)); -+ KMS_ASSERT (parser->response); - parser->response->headers = kms_kv_list_new (); - parser->state = PARSING_STATUS_LINE; - parser->start = 0; -@@ -34,6 +35,8 @@ kms_response_parser_t * - kms_response_parser_new (void) - { - kms_response_parser_t *parser = malloc (sizeof (kms_response_parser_t)); -+ KMS_ASSERT (parser); -+ - _parser_init (parser); - return parser; - } -@@ -59,11 +62,26 @@ static bool - _parse_int (const char *str, int *result) - { - char *endptr = NULL; -+ int64_t long_result; - -- *result = (int) strtol (str, &endptr, 10); -- if (*endptr) { -+ errno = 0; -+ long_result = strtol (str, &endptr, 10); -+ if (endptr == str) { -+ /* No digits were parsed. Consider this an error */ -+ return false; -+ } -+ if (endptr != NULL && *endptr != '\0') { -+ /* endptr points to the first invalid character. */ -+ return false; -+ } -+ if (errno == EINVAL || errno == ERANGE) { -+ return false; -+ } -+ if (long_result > INT32_MAX || long_result < INT32_MIN) { - return false; - } -+ *result = (int) long_result; -+ - return true; - } - -@@ -72,6 +90,8 @@ static bool - _parse_int_from_view (const char *str, int start, int end, int *result) - { - char *num_str = malloc (end - start + 1); -+ KMS_ASSERT (num_str); -+ - bool ret; - - strncpy (num_str, str + start, end - start); -diff --git a/src/third_party/scripts/kms_message_get_sources.sh b/src/third_party/scripts/kms_message_get_sources.sh -index 6ad2fbb0e6..52ce21b9dd 100755 ---- a/src/third_party/scripts/kms_message_get_sources.sh -+++ b/src/third_party/scripts/kms_message_get_sources.sh -@@ -18,7 +18,7 @@ if grep -q Microsoft /proc/version; then - fi - - NAME=libmongocrypt --REVISION=59c8c17bbdfa1cf0fdec60cfdde73a437a868221 -+REVISION=052f7fc610f0cea83a2adf3dd263a5ff04833371 - - if grep -q Microsoft /proc/version; then - SRC_ROOT=$(wslpath -u $(powershell.exe -Command "Get-ChildItem Env:TEMP | Get-Content | Write-Host")) --- -2.24.0 - diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-server-Adjust-the-cache-alignment-assumptions.patch b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-server-Adjust-the-cache-alignment-assumptions.patch new file mode 100644 index 0000000000..52c9df9b1b --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-server-Adjust-the-cache-alignment-assumptions.patch @@ -0,0 +1,37 @@ +From 5c9e0d0fc9188bab0ae09c9c33df01938b0c1b6c Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 14 Apr 2022 09:25:33 -0700 +Subject: [PATCH] server: Adjust the cache alignment assumptions + +aarch64 has 256 for hardware_destructive_interference_size and gcc 12 +has added a warning to complain about mismatches which results in +static_assert failures + +In file included from src/mongo/s/commands/cluster_find_cmd.cpp:39: +src/mongo/db/stats/counters.h:185:47: error: static assertion failed: cache line spill + 185 | static_assert(sizeof(decltype(_together)) <= stdx::hardware_constructive_interference_size, + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The structure need to ensure true sharing for both the elements +so align it to hardware_constructive_interference_size instead + +Upstream-Status: Inappropriate [https://jira.mongodb.org/browse/SERVER-65664] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/mongo/db/stats/counters.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/src/mongo/db/stats/counters.h ++++ b/src/mongo/db/stats/counters.h +@@ -182,8 +182,8 @@ private: + AtomicWord<long long> requests{0}; + }; + CacheAligned<Together> _together{}; +- static_assert(sizeof(decltype(_together)) <= stdx::hardware_constructive_interference_size, +- "cache line spill"); ++ static_assert(sizeof(Together) <= stdx::hardware_constructive_interference_size, ++ "cache line spill"); + + CacheAligned<AtomicWord<long long>> _logicalBytesOut{0}; + diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-wiredtiger-Avoid-using-off64_t.patch b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-wiredtiger-Avoid-using-off64_t.patch new file mode 100644 index 0000000000..abe6898554 --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-wiredtiger-Avoid-using-off64_t.patch @@ -0,0 +1,30 @@ +From 0508c1518c2e7c586a231d344e9f93b08507885b Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 31 Dec 2022 14:23:40 -0800 +Subject: [PATCH] wiredtiger: Avoid using off64_t + +off64_t is not available on musl since off_t is already 64bit by +default. Therefore replace using off64_t with off_t + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/third_party/wiredtiger/src/os_posix/os_fs.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/third_party/wiredtiger/src/os_posix/os_fs.c b/src/third_party/wiredtiger/src/os_posix/os_fs.c +index 3898eb74343..9ce2d5edb38 100644 +--- a/src/third_party/wiredtiger/src/os_posix/os_fs.c ++++ b/src/third_party/wiredtiger/src/os_posix/os_fs.c +@@ -533,7 +533,7 @@ __posix_file_sync_nowait(WT_FILE_HANDLE *file_handle, WT_SESSION *wt_session) + pfh = (WT_FILE_HANDLE_POSIX *)file_handle; + + /* See comment in __posix_sync(): sync cannot be retried or fail. */ +- WT_SYSCALL(sync_file_range(pfh->fd, (off64_t)0, (off64_t)0, SYNC_FILE_RANGE_WRITE), ret); ++ WT_SYSCALL(sync_file_range(pfh->fd, 0, 0, SYNC_FILE_RANGE_WRITE), ret); + if (ret == 0) + return (0); + +-- +2.39.0 + diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/PTHREAD_STACK_MIN.patch b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/PTHREAD_STACK_MIN.patch new file mode 100644 index 0000000000..f08177d7b4 --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/PTHREAD_STACK_MIN.patch @@ -0,0 +1,19 @@ +PTHREAD_STACK_MIN is no longer a compile time define in glibc 2.34+ and since +we only care for glibc and musl where PTHREAD_STACK_MIN is always defined there +is no need to check for constant called PTHREAD_STACK_MIN since its already defined +this fix may not work for wider audience but for OE needs its sufficient + +Upstream-Status: Inappropriate [OE-only fix] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- a/src/third_party/boost-1.70.0/boost/thread/pthread/thread_data.hpp ++++ b/src/third_party/boost-1.70.0/boost/thread/pthread/thread_data.hpp +@@ -57,9 +57,7 @@ namespace boost + #else + std::size_t page_size = ::sysconf( _SC_PAGESIZE); + #endif +-#if PTHREAD_STACK_MIN > 0 + if (size<PTHREAD_STACK_MIN) size=PTHREAD_STACK_MIN; +-#endif + size = ((size+page_size-1)/page_size)*page_size; + int res = pthread_attr_setstacksize(&val_, size); + BOOST_VERIFY(!res && "pthread_attr_setstacksize failed"); diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/disable_runtime_check.patch b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/disable_runtime_check.patch new file mode 100644 index 0000000000..78ebba8fb7 --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/disable_runtime_check.patch @@ -0,0 +1,17 @@ +Lets use cached result for this otherwise runtime test, on qemuppc64 +when this test is run using gcc11, it returns 1, since we dont worry +about older compilers here, we can cache the result and use it here + +Upstream-Status: Inappropriate [Cross-compile specific] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- a/SConstruct ++++ b/SConstruct +@@ -3904,7 +3904,7 @@ def doConfigure(myenv): + + conf.AddTest('CheckAltivecVbpermqOutput', CheckAltivecVbpermqOutput) + +- outputIndex = next((idx for idx in [0,1] if conf.CheckAltivecVbpermqOutput(idx)), None) ++ outputIndex = 1 + if outputIndex is not None: + conf.env.SetConfigHeaderDefine("MONGO_CONFIG_ALTIVEC_VEC_VBPERMQ_OUTPUT_INDEX", outputIndex) + else: diff --git a/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/ppc64_ARCH_BITS.patch b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/ppc64_ARCH_BITS.patch new file mode 100644 index 0000000000..471d5629a1 --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/ppc64_ARCH_BITS.patch @@ -0,0 +1,18 @@ +Subject: [PATCH] stacktrace: Define ARCH_BITS for ppc64 + +src/mongo/util/stacktrace_somap.cpp:89:2: error: #error Unknown target architecture. +stacktrace_somap.cpp:92:33: error: 'ELFCLASSARCH_BITS' was not declared in this scope + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- a/src/mongo/util/stacktrace_somap.cpp ++++ b/src/mongo/util/stacktrace_somap.cpp +@@ -81,7 +81,7 @@ void addUnameToSoMap(BSONObjBuilder* soM + + #if defined(__ELF_NATIVE_CLASS) // determine ARCH_BITS + #define ARCH_BITS __ELF_NATIVE_CLASS +-#elif defined(__x86_64__) || defined(__aarch64__) ++#elif defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__) + #define ARCH_BITS 64 + #elif defined(__i386__) || defined(__arm__) + #define ARCH_BITS 32 |