https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100140
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- What glibc you are using? libstdc++ refers to __libc_single_threaded only with #elif __has_include(<sys/single_threaded.h>) return ::__libc_single_threaded; #else and the sys/single_threaded.h header has been added in Glibc 2.32 together with the __libc_single_threaded symbol. So, are you doing a native build or cross-compilation (without sysroot?)? Do you have some unrelated sys/single_threaded.h header around, or are compiling against glibc 2.32+ headers and linking against glibc 2.31 or earlier?