The mangling of std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) and std::thread::_State::~_State() is supposed to be handled by the block in build/unix/stdc++compat/stdc++compat.cpp starting at line 104:
#if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 21)
/* Expose the definitions for the old ABI, allowing us to call its functions */
# define _GLIBCXX_THREAD_ABI_COMPAT 1
# include <thread>
namespace std {
/* The old ABI has a thread::_M_start_thread(shared_ptr<_Impl_base>),
* while the new has thread::_M_start_thread(unique_ptr<_State>, void(*)()).
* There is an intermediate ABI at version 3.4.21, with
* thread::_M_start_thread(shared_ptr<_Impl_base>, void(*)()).
* The void(*)() parameter is only there to keep a reference to pthread_create
* on the caller side, and is unused in the implementation
* We're creating an entry point for the new and intermediate ABIs, and make
* them call the old ABI. */
# if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 22)
/* We need a _Impl_base-derived class wrapping a _State to call the old ABI
* from what we got by diverting the new API */
struct StateWrapper : public thread::_Impl_base {
unique_ptr<thread::_State> mState;
/* For some reason this is a symbol exported by new versions of libstdc++,
* even though the destructor is default there too */
__attribute__((weak)) thread::_State::~_State() = default;
# endif
} // namespace std
#endif
I don't know what's broken in the build process causing this code not to be included in ppc64el builds.
builder@ xam-power8- 1:~$ uname -m xam-power8- 1:~$ objdump -T /usr/lib/ firefox/ libxul. so | grep GLIBCXX_3.4.22 M_start_ threadESt10uniq ue_ptrINS_ 6_StateESt14def ault_deleteIS1_ EEPFvvE StateD2Ev
ppc64le
builder@
0000000000000000 DF *UND* 0000000000000000 GLIBCXX_3.4.22 _ZNSt6thread15_
0000000000000000 DF *UND* 0000000000000000 GLIBCXX_3.4.22 _ZNSt6thread6_
vs
root@breakfast:/# uname -m firefox/ libxul. so | grep GLIBCXX_3.4.22
x86_64
root@breakfast:/# objdump -T /usr/lib/
The mangling of std::thread: :_M_start_ thread( std::unique_ ptr<std: :thread: :_State, std::default_ delete< std::thread: :_State> >, void (*)()) and std::thread: :_State: :~_State( ) is supposed to be handled by the block in build/unix/ stdc++compat/ stdc++compat. cpp starting at line 104:
#if MOZ_LIBSTDCXX_ VERSION >= GLIBCXX_VERSION(3, 4, 21) THREAD_ ABI_COMPAT 1
/* Expose the definitions for the old ABI, allowing us to call its functions */
# define _GLIBCXX_
# include <thread>
namespace std { :_M_start_ thread( shared_ ptr<_Impl_ base>), :_M_start_ thread( unique_ ptr<_State> , void(*)()). :_M_start_ thread( shared_ ptr<_Impl_ base>, void(*)()).
/* The old ABI has a thread:
* while the new has thread:
* There is an intermediate ABI at version 3.4.21, with
* thread:
* The void(*)() parameter is only there to keep a reference to pthread_create
* on the caller side, and is unused in the implementation
* We're creating an entry point for the new and intermediate ABIs, and make
* them call the old ABI. */
__attribute_ _((weak) ) void thread: :_M_start_ thread( shared_ ptr<_Impl_ base> impl,
void (*)()) { thread( std::move( impl));
_M_start_
}
# if MOZ_LIBSTDCXX_ VERSION >= GLIBCXX_VERSION(3, 4, 22) ptr<thread: :_State> mState;
/* We need a _Impl_base-derived class wrapping a _State to call the old ABI
* from what we got by diverting the new API */
struct StateWrapper : public thread::_Impl_base {
unique_
StateWrapper( unique_ ptr<thread: :_State> aState) : mState( std::move( aState) ) {}
void _M_run() override { mState->_M_run(); }
};
__attribute_ _((weak) ) void thread: :_M_start_ thread( unique_ ptr<_State> aState,
void (*)()) { shared< StateWrapper> (std::move( aState) ); thread( std::move( impl));
auto impl = std::make_
_M_start_
}
/* For some reason this is a symbol exported by new versions of libstdc++, _((weak) ) thread: :_State: :~_State( ) = default;
* even though the destructor is default there too */
__attribute_
# endif
} // namespace std
#endif
I don't know what's broken in the build process causing this code not to be included in ppc64el builds.