https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123908

--- Comment #7 from LIU Hao <lh_mouse at 126 dot com> ---
Can you verify that these macros are correctly defined when compiling
libstdc++-v3/src/c++11/mutex.cc?

These should be defined as long as the correct bits/os_defines.h is included,
but it doesn't seem the case.



diff --git a/libstdc++-v3/src/c++11/mutex.cc b/libstdc++-v3/src/c++11/mutex.cc
index 8f04494620be..a56019be92d2 100644
--- a/libstdc++-v3/src/c++11/mutex.cc
+++ b/libstdc++-v3/src/c++11/mutex.cc
@@ -24,6 +24,18 @@

 #include <mutex>

+#if !defined _GLIBCXX_HAS_GTHREADS
+#error _GLIBCXX_HAS_GTHREADS expected
+#endif
+
+#if !defined _GLIBCXX_HAVE_TLS
+#error _GLIBCXX_HAVE_TLS expected
+#endif
+
+#if !defined _GLIBCXX_NO_EXTERN_THREAD_LOCAL
+#error _GLIBCXX_NO_EXTERN_THREAD_LOCAL expected
+#endif
+
 #ifdef _GLIBCXX_HAS_GTHREADS

 namespace std _GLIBCXX_VISIBILITY(default)

Reply via email to