https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95989
--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> --- pthread_self seems to be defined in libc.a not libpthread.a so using --whole-archive around -lpthread doesn't help.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95989
--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> --- pthread_self seems to be defined in libc.a not libpthread.a so using --whole-archive around -lpthread doesn't help.