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