https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115421
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #3) > This works fine with glibc 2.34 and above. I should say with glibc 2.34 and above and GCC 13+. Other combinations are know to fail since you need to link in the whole libpthread as there are weak symbols used to detect if the program was single threaded or not.