aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely.gcc@gmail.com>2012-02-05 23:55:51 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2012-02-05 23:55:51 +0000
commitbe38506d7c74405ca24bd4eb02ddcf2de466dd30 (patch)
tree4e0e1dbfc1d92c837f9a097b7f0766a965e6cb0d /libstdc++-v3
parent148ea7d8ef5d9ab40dd9c9a74247b0305200f70c (diff)
downloadgcc-be38506d7c74405ca24bd4eb02ddcf2de466dd30.zip
gcc-be38506d7c74405ca24bd4eb02ddcf2de466dd30.tar.gz
gcc-be38506d7c74405ca24bd4eb02ddcf2de466dd30.tar.bz2
re PR libstdc++/52104 (go1 fails to run on Solaris 10/11 x86 with with gld)
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
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog8
-rw-r--r--libstdc++-v3/include/std/future4
-rw-r--r--libstdc++-v3/src/c++11/future.cc2
3 files changed, 14 insertions, 0 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 4e92358..799be7c 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,13 @@
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
* python/libstdcxx/v6/printers.py (StdPointerPrinter): Rename to...
(SharedPointerPrinter): This. Also show weak count.
diff --git a/libstdc++-v3/include/std/future b/libstdc++-v3/include/std/future
index 1093e3f..962400b 100644
--- a/libstdc++-v3/include/std/future
+++ b/libstdc++-v3/include/std/future
@@ -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.
diff --git a/libstdc++-v3/src/c++11/future.cc b/libstdc++-v3/src/c++11/future.cc
index dab0774..61a9729 100644
--- a/libstdc++-v3/src/c++11/future.cc
+++ b/libstdc++-v3/src/c++11/future.cc
@@ -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