From 2ba2e8d8b2626704931ea077f6bee464dc22d161 Mon Sep 17 00:00:00 2001 From: Et7f3 Date: Fri, 24 Jun 2022 05:07:11 +0200 Subject: [PATCH] mongodb: backport a fix to 5.0 in openssl detection. --- pkgs/servers/nosql/mongodb/5.0.nix | 1 + .../mongodb/fix-gcc-Wno-exceptions-5.0.patch | 44 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 pkgs/servers/nosql/mongodb/fix-gcc-Wno-exceptions-5.0.patch diff --git a/pkgs/servers/nosql/mongodb/5.0.nix b/pkgs/servers/nosql/mongodb/5.0.nix index 50f9db689eec..cd25525f4fe6 100644 --- a/pkgs/servers/nosql/mongodb/5.0.nix +++ b/pkgs/servers/nosql/mongodb/5.0.nix @@ -22,5 +22,6 @@ buildMongoDB { ./forget-build-dependencies-4-4.patch ./asio-no-experimental-string-view-4-4.patch ./fix-build-with-boost-1.79-5_0.patch + ./fix-gcc-Wno-exceptions-5.0.patch ]; } diff --git a/pkgs/servers/nosql/mongodb/fix-gcc-Wno-exceptions-5.0.patch b/pkgs/servers/nosql/mongodb/fix-gcc-Wno-exceptions-5.0.patch new file mode 100644 index 000000000000..b8803911968b --- /dev/null +++ b/pkgs/servers/nosql/mongodb/fix-gcc-Wno-exceptions-5.0.patch @@ -0,0 +1,44 @@ +From e78b2bf6eaa0c43bd76dbb841add167b443d2bb0 Mon Sep 17 00:00:00 2001 +From: Mark Benvenuto +Date: Mon, 21 Jun 2021 11:36:56 -0400 +Subject: [PATCH] SERVER-57688 Fix debug gcc 11 and clang 12 builds on Fedora + 34 + +--- + SConstruct | 4 ---- + src/mongo/db/query/plan_summary_stats.h | 4 +++- + src/mongo/util/shim_boost_assert.cpp | 1 + + 3 files changed, 4 insertions(+), 5 deletions(-) + +diff --git a/SConstruct b/SConstruct +index 25fd4a248d0c..23cff6f9da53 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -3108,10 +3108,6 @@ def doConfigure(myenv): + # harmful to capture unused variables we are suppressing for now with a plan to fix later. + AddToCCFLAGSIfSupported(myenv, "-Wno-unused-lambda-capture") + +- # This warning was added in clang-5 and incorrectly flags our implementation of +- # exceptionToStatus(). See https://bugs.llvm.org/show_bug.cgi?id=34804 +- AddToCCFLAGSIfSupported(myenv, "-Wno-exceptions") +- + # Enable sized deallocation support. + AddToCXXFLAGSIfSupported(myenv, '-fsized-deallocation') + +diff --git a/src/mongo/db/query/plan_summary_stats.h b/src/mongo/db/query/plan_summary_stats.h +index 58677ab20d25..cfaa2053d16f 100644 +--- a/src/mongo/db/query/plan_summary_stats.h ++++ b/src/mongo/db/query/plan_summary_stats.h +@@ -29,9 +29,11 @@ + + #pragma once + +-#include "mongo/util/container_size_helper.h" ++#include + #include + ++#include "mongo/util/container_size_helper.h" ++ + namespace mongo { + + /**