Which was odd, since the code in question uses std::thread exclusively, and should only need to be linked with the default libstdc++, helpfully supplied by the compiler.
So, I chased this down to <thread> now making visible an explicit reference to pthread_create, in std::thread's constructor:
template<typename _Callable, typename… _Args> explicit thread(_Callable&& __f, _Args&&… __args) { _M_start_thread(_M_make_routine(std::__bind_simple( std::forward<_Callable>(__f), std::forward<_Args>(__args)…)), reinterpret_cast<void(*)()>(&pthread_create)); }So that's what I'm compiling. This may be because of the ld.so configuration in Fedora. Even if libstdc++ is linked with -lpthread, this ends up being compiled as part of my code, at -O2, apparently, and I'm not linking with - lpthread.
Not really a complicated thing to fix up, of course. Just seems a bit odd, to end up requiring a linking dependency, in this manner.
Attachment:
pgpldTlFJJGNJ.pgp
Description: PGP signature