Patchwork libstdc++/52104 - fix linker error for non-TLS targets

login
register
mail settings
Submitter Jonathan Wakely
Date Feb. 6, 2012, 9:34 p.m.
Message ID <CAH6eHdRtWh1DxY3bOeSyTsWV=StJnD=MuABoGvRnejk9V1eJOw@mail.gmail.com>
Download mbox | patch
Permalink /patch/139806/
State New
Headers show

Comments

Jonathan Wakely - Feb. 6, 2012, 9:34 p.m.
And fix a linker error (which I can't reproduce) on TLS targets, which
can use an explicit instantiation because it doesn't refer to an
unnamed closure type.

        PR libstdc++/52128
        * src/c++11/future.cc: Add explicit instantiation.

Tested x86_64-linux, powerpc-linux, i686-linux, x86_64-netbsd,
committed to trunk.

Patch

diff --git a/libstdc++-v3/src/c++11/future.cc b/libstdc++-v3/src/c++11/future.cc
index 61a9729..a488139 100644
--- a/libstdc++-v3/src/c++11/future.cc
+++ b/libstdc++-v3/src/c++11/future.cc
@@ -90,6 +90,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
   // Explicit instantiation due to -fno-implicit-instantiation.
   template void call_once(once_flag&, void (thread::*&&)(), reference_wrapper<thread>&&);
+  template _Bind_simple_helper<void (thread::*)(), reference_wrapper<thread>>::__type __bind_simple(void (thread::*&&)(), reference_wrapper<thread>&&);
 #endif
 #endif