|
|
f838c9 |
From efd5bc0715e5477318be95a76811cda0a89e8289 Mon Sep 17 00:00:00 2001
|
|
|
f838c9 |
From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= <emilio@crisal.io>
|
|
|
f838c9 |
Date: Fri, 4 Mar 2022 12:00:26 +0100
|
|
|
f838c9 |
Subject: [PATCH] GLIBCXX fix for GCC 12?
|
|
|
f838c9 |
|
|
|
f838c9 |
---
|
|
|
f838c9 |
build/unix/stdc++compat/stdc++compat.cpp | 14 ++++++++++++++
|
|
|
f838c9 |
1 file changed, 14 insertions(+)
|
|
|
f838c9 |
|
|
|
f838c9 |
diff --git a/build/unix/stdc++compat/stdc++compat.cpp b/build/unix/stdc++compat/stdc++compat.cpp
|
|
|
f838c9 |
index 0180f6bcfa998..8d7a542ff11f0 100644
|
|
|
f838c9 |
--- a/build/unix/stdc++compat/stdc++compat.cpp
|
|
|
f838c9 |
+++ b/build/unix/stdc++compat/stdc++compat.cpp
|
|
|
f838c9 |
@@ -24,6 +24,7 @@
|
|
|
f838c9 |
GLIBCXX_3.4.27 is from gcc 10
|
|
|
f838c9 |
GLIBCXX_3.4.28 is from gcc 10
|
|
|
f838c9 |
GLIBCXX_3.4.29 is from gcc 11
|
|
|
f838c9 |
+ GLIBCXX_3.4.30 is from gcc 12
|
|
|
f838c9 |
|
|
|
f838c9 |
This file adds the necessary compatibility tricks to avoid symbols with
|
|
|
f838c9 |
version GLIBCXX_3.4.20 and bigger, keeping binary compatibility with
|
|
|
f838c9 |
@@ -69,6 +70,19 @@ void __attribute__((weak)) __throw_bad_array_new_length() { MOZ_CRASH(); }
|
|
|
f838c9 |
} // namespace std
|
|
|
f838c9 |
#endif
|
|
|
f838c9 |
|
|
|
f838c9 |
+#if _GLIBCXX_RELEASE >= 12
|
|
|
f838c9 |
+namespace std {
|
|
|
f838c9 |
+
|
|
|
f838c9 |
+/* This avoids the GLIBCXX_3.4.30 symbol version. */
|
|
|
f838c9 |
+void __attribute__((weak))
|
|
|
f838c9 |
+__glibcxx_assert_fail(const char* __file, int __line, const char* __function,
|
|
|
f838c9 |
+ const char* __condition) {
|
|
|
f838c9 |
+ MOZ_CRASH();
|
|
|
f838c9 |
+}
|
|
|
f838c9 |
+
|
|
|
f838c9 |
+} // namespace std
|
|
|
f838c9 |
+#endif
|
|
|
f838c9 |
+
|
|
|
f838c9 |
/* While we generally don't build with exceptions, we have some host tools
|
|
|
f838c9 |
* that do use them. libstdc++ from GCC 5.0 added exception constructors with
|
|
|
f838c9 |
* char const* argument. Older versions only have a constructor with
|
|
|
f838c9 |
--
|
|
|
f838c9 |
2.35.1
|
|
|
f838c9 |
|