Jonathan Wakely writes:
If you're using std::thread then you always needed to link to libpthread or you'd get an exception at run time. Now you get a failure earlier at link time, but there's no new dependency.
No, I did not get a link failure before, with gcc 4.9. I'll explain why, in a moment.
No. Libstdc++ never linked to libpthread, it was always your job.
My job was this: libcxx.so linked with libstdc++ and libpthread. libcxx.so comes with some templates, that instantiate std::thread, etc…a.out links with libcxx.so (and with libstdc++), and uses libcxx.so's templates.
This worked. libstdc++'s reference to pthread_create was resolved; apparently libcxx.so's linkage to libpthread was sufficient.
Now, looks like a.out ends up having an external reference to pthread_create(), when it didn't before, hence the link failure.
Attachment:
pgppanA7kNoko.pgp
Description: PGP signature