diff options
Diffstat (limited to 'databases/mongodb70/files')
3 files changed, 79 insertions, 11 deletions
diff --git a/databases/mongodb70/files/patch-SConstruct b/databases/mongodb70/files/patch-SConstruct index 4ccd299adcaf..ec60029c937c 100644 --- a/databases/mongodb70/files/patch-SConstruct +++ b/databases/mongodb70/files/patch-SConstruct @@ -1,4 +1,4 @@ ---- SConstruct.orig 2024-06-19 03:26:19 UTC +--- SConstruct.orig 2025-05-13 16:37:03 UTC +++ SConstruct @@ -23,7 +23,6 @@ import SCons.Script @@ -25,9 +25,7 @@ if get_option('build-metrics'): env['BUILD_METRICS_ARTIFACTS_DIR'] = '$BUILD_ROOT/$VARIANT_DIR' env.Tool('build_metrics') -@@ -1799,9 +1788,9 @@ if has_option('variables-help'): - print(env_vars.GenerateHelpText(env)) - Exit(0) +@@ -1801,7 +1790,7 @@ if unknown_vars: unknown_vars = env_vars.UnknownVariables() if unknown_vars: @@ -36,7 +34,7 @@ install_actions.setup(env, get_option('install-action')) -@@ -3024,7 +3013,7 @@ if env.TargetOSIs('posix'): +@@ -3013,7 +3002,7 @@ if env.TargetOSIs('posix'): # If runtime hardening is requested, then build anything # destined for an executable with the necessary flags for PIE. env.AppendUnique( @@ -45,7 +43,7 @@ PROGLINKFLAGS=['-pie'], ) -@@ -3032,7 +3021,6 @@ if env.TargetOSIs('posix'): +@@ -3021,7 +3010,6 @@ if env.TargetOSIs('posix'): env.Append( CCFLAGS=[ "-fasynchronous-unwind-tables", diff --git a/databases/mongodb70/files/patch-src_mongo_platform_waitable__atomic.cpp b/databases/mongodb70/files/patch-src_mongo_platform_waitable__atomic.cpp new file mode 100644 index 000000000000..73e0befd876d --- /dev/null +++ b/databases/mongodb70/files/patch-src_mongo_platform_waitable__atomic.cpp @@ -0,0 +1,64 @@ +# Original upstream implementation: +# https://jira.mongodb.org/browse/SERVER-81797 +# Attempt to upstream this patch: +# https://github.com/mongodb/mongo/pull/1607 +# https://jira.mongodb.org/browse/SERVER-99225 +# +--- src/mongo/platform/waitable_atomic.cpp.orig 2024-11-20 23:53:48 UTC ++++ src/mongo/platform/waitable_atomic.cpp +@@ -34,6 +34,9 @@ + #ifdef __linux__ + #include <linux/futex.h> + #include <sys/syscall.h> ++#elif defined(__FreeBSD__) ++#include <sys/types.h> ++#include <sys/umtx.h> + #elif defined(_WIN32) + #include <synchapi.h> + #endif +@@ -233,6 +236,45 @@ bool waitUntil(const void* uaddr, + // There isn't a good list of possible errors, so assuming that anything other than a timeout + // error is a possible spurious wakeup. + return timeoutOverflow || errno != ETIMEDOUT; ++} ++ ++#elif defined(__FreeBSD__) ++ ++void notifyOne(const void* uaddr) { ++ _umtx_op(const_cast<void*>(uaddr), UMTX_OP_WAKE_PRIVATE, 1, NULL, NULL); ++} ++ ++void notifyMany(const void* uaddr, int nToWake) { ++ _umtx_op(const_cast<void*>(uaddr), UMTX_OP_WAKE_PRIVATE, nToWake, NULL, NULL); ++} ++ ++void notifyAll(const void* uaddr) { ++ _umtx_op(const_cast<void*>(uaddr), UMTX_OP_WAKE_PRIVATE, INT_MAX, NULL, NULL); ++} ++ ++bool waitUntil(const void* uaddr, ++ uint32_t old, ++ boost::optional<system_clock::time_point> deadline) { ++ struct _umtx_time umtx_deadline; ++ void* uaddr2 = nullptr; ++ ++ if (deadline) { ++ umtx_deadline._timeout.tv_sec = durationCount<Seconds>(deadline->time_since_epoch()); ++ umtx_deadline._timeout.tv_nsec = durationCount<Nanoseconds>( ++ deadline->time_since_epoch() - stdx::chrono::seconds(umtx_deadline._timeout.tv_sec)); ++ umtx_deadline._flags = UMTX_ABSTIME; ++ umtx_deadline._clockid = CLOCK_REALTIME_FAST; ++ uaddr2 = &umtx_deadline; ++ } ++ ++ int umtxOpRet; ++ if ((umtxOpRet = _umtx_op(const_cast<void*>(uaddr), UMTX_OP_WAIT_UINT_PRIVATE, old, (void*)sizeof(struct _umtx_time), uaddr2)) == -1) { ++ if (errno == ETIMEDOUT) { ++ return false; ++ } ++ invariant(umtxOpRet == 0, errorMessage(lastSystemError())); ++ } ++ return true; + } + + #else diff --git a/databases/mongodb70/files/patch-src_third__party_mozjs_gen-config.sh b/databases/mongodb70/files/patch-src_third__party_mozjs_gen-config.sh index 58daab4bc056..4260904915e4 100644 --- a/databases/mongodb70/files/patch-src_third__party_mozjs_gen-config.sh +++ b/databases/mongodb70/files/patch-src_third__party_mozjs_gen-config.sh @@ -1,5 +1,11 @@ ---- src/third_party/mozjs/gen-config.sh.orig 2022-08-05 16:21:29 UTC +--- src/third_party/mozjs/gen-config.sh.orig 2025-05-13 16:37:03 UTC +++ src/third_party/mozjs/gen-config.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + set -e + set -v @@ -29,6 +29,9 @@ case "$_Path" in } @@ -10,16 +16,16 @@ "platform/aarch64/linux") _CONFIG_OPTS="--host=aarch64-linux" ;; -@@ -108,7 +111,7 @@ CFLAGS="$CFLAGS -D__STDC_FORMAT_MACROS" \ - --disable-js-shell \ - --disable-tests "$_CONFIG_OPTS" +@@ -111,7 +114,7 @@ CFLAGS="$CFLAGS -D__STDC_FORMAT_MACROS" \ + --disable-wasm-moz-intgemm \ + "$_CONFIG_OPTS" -make recurse_export +gmake recurse_export cd ../../../.. -@@ -159,7 +162,7 @@ find "$_Path/build" -name '*.cpp' | +@@ -166,7 +169,7 @@ find "$_Path/build" -name '*.cpp' | find "$_Path/build" -name '*.cpp' | while read unified_file ; do echo "Processing $unified_file" |