https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71021
--- Comment #4 from nsz at gcc dot gnu.org --- this might be a different issue, but then i'm not sure how you made the gcc build to use the alternate glibc path. can you attach the libatomic/testsuite/Makefile (with the CC etc variables set)? i think the atomic tests should work without -pthread and i think libgomp just happens to pass because -fopenmp implies -pthread.