6ed0a43
From efd5bc0715e5477318be95a76811cda0a89e8289 Mon Sep 17 00:00:00 2001
6ed0a43
From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= <emilio@crisal.io>
6ed0a43
Date: Fri, 4 Mar 2022 12:00:26 +0100
6ed0a43
Subject: [PATCH] GLIBCXX fix for GCC 12?
6ed0a43
6ed0a43
Borrowed from Firefox and adjusted to Thunderbird 91.7.0
6ed0a43
6ed0a43
---
6ed0a43
 build/unix/stdc++compat/stdc++compat.cpp | 14 ++++++++++++++
6ed0a43
 1 file changed, 14 insertions(+)
6ed0a43
6ed0a43
diff --git a/build/unix/stdc++compat/stdc++compat.cpp b/build/unix/stdc++compat/stdc++compat.cpp
6ed0a43
--- thunderbird-91.7.0/build/unix/stdc++compat/stdc++compat.cpp.0001-GLIBCXX-fix-for-GCC-12	2022-03-07 20:34:15.000000000 +0100
6ed0a43
+++ thunderbird-91.7.0/build/unix/stdc++compat/stdc++compat.cpp	2022-03-15 22:50:03.161345590 +0100
6ed0a43
@@ -24,6 +24,7 @@
6ed0a43
    GLIBCXX_3.4.27 is from gcc 10
6ed0a43
    GLIBCXX_3.4.28 is from gcc 10
6ed0a43
    GLIBCXX_3.4.29 is from gcc 11
6ed0a43
+   GLIBCXX_3.4.30 is from gcc 12
6ed0a43
 
6ed0a43
 This file adds the necessary compatibility tricks to avoid symbols with
6ed0a43
 version GLIBCXX_3.4.20 and bigger, keeping binary compatibility with
6ed0a43
@@ -73,6 +74,19 @@ void __attribute__((weak)) __throw_bad_a
6ed0a43
 
6ed0a43
 }  // namespace std
6ed0a43
 #endif
6ed0a43
+
6ed0a43
+#if _GLIBCXX_RELEASE >= 12
6ed0a43
+namespace std {
6ed0a43
+
6ed0a43
+/* This avoids the GLIBCXX_3.4.30 symbol version. */
6ed0a43
+void __attribute__((weak))
6ed0a43
+__glibcxx_assert_fail(const char* __file, int __line, const char* __function,
6ed0a43
+                      const char* __condition) {
6ed0a43
+  MOZ_CRASH();
6ed0a43
+}
6ed0a43
+
6ed0a43
+}  // namespace std
6ed0a43
+#endif
6ed0a43
 
6ed0a43
 #if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 21)
6ed0a43
 /* While we generally don't build with exceptions, we have some host tools