]> gcc.gnu.org Git - gcc.git/commitdiff
re PR libstdc++/52104 (go1 fails to run on Solaris 10/11 x86 with with gld)
authorJonathan Wakely <jwakely.gcc@gmail.com>
Sun, 5 Feb 2012 23:55:51 +0000 (23:55 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Sun, 5 Feb 2012 23:55:51 +0000 (23:55 +0000)
PR libstdc++/52104
* include/std/future (__future_base::_Async_state_common): Define
destructor inline for targets without TLS.
* src/c++11/future.cc (__future_base::_Async_state_common): Only
define destructor for TLS targets.

From-SVN: r183920

libstdc++-v3/ChangeLog
libstdc++-v3/include/std/future
libstdc++-v3/src/c++11/future.cc

index 4e9235862ccf654a6989bca8cd24d070038fc9c0..799be7c5d4e5c2d5f7d10feed29cfe8e27fe6b3e 100644 (file)
@@ -1,3 +1,11 @@
+2012-02-05  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+       PR libstdc++/52104
+       * include/std/future (__future_base::_Async_state_common): Define
+       destructor inline for targets without TLS.
+       * src/c++11/future.cc (__future_base::_Async_state_common): Only
+       define destructor for TLS targets.
+
 2012-02-05  Jonathan Wakely  <jwakely.gcc@gmail.com>
 
        PR libstdc++/51956
index 1093e3f1bb4948dcf65feae1c5bfbfcf45904fa8..962400bda65931e98dd42c8214855a84076a00f8 100644 (file)
@@ -1425,7 +1425,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   class __future_base::_Async_state_common : public __future_base::_State_base
   {
   protected:
+#ifdef _GLIBCXX_HAVE_TLS
     ~_Async_state_common();
+#else
+    ~_Async_state_common() { _M_join(); }
+#endif
 
     // Allow non-timed waiting functions to block until the thread completes,
     // as if joined.
index dab0774ad0a1001e3146362b7d9ef1ba2dfc2981..61a9729a1336146547c123f9bbe89bfd20982f2e 100644 (file)
@@ -85,11 +85,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
   __future_base::_State_base::~_State_base() = default;
 
+#ifdef _GLIBCXX_HAVE_TLS
   __future_base::_Async_state_common::~_Async_state_common() { _M_join(); }
 
   // Explicit instantiation due to -fno-implicit-instantiation.
   template void call_once(once_flag&, void (thread::*&&)(), reference_wrapper<thread>&&);
 #endif
+#endif
 
 _GLIBCXX_END_NAMESPACE_VERSION
 } // namespace std
This page took 0.061528 seconds and 5 git commands to generate.