https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112777
--- Comment #3 from Sebastian Huber <sebastian.hu...@embedded-brains.de> --- I think the issue is in c-cppbuiltin.cc: builtin_define_with_int_value ("__LIBGCC_HAVE_LIBATOMIC", targetm.have_libatomic); Which is used in libgcov.h like this: /* Detect whether target can support atomic update of profilers. */ #if (__SIZEOF_LONG_LONG__ == 4 && __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) \ || (__SIZEOF_LONG_LONG__ == 8 && __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8) \ || defined (__LIBGCC_HAVE_LIBATOMIC) #define GCOV_SUPPORTS_ATOMIC 1 #else #define GCOV_SUPPORTS_ATOMIC 0 #endif Should I keep the defined (__LIBGCC_HAVE_LIBATOMIC) and change c-cppbuiltin.cc to: if (targetm.have_libatomic) builtin_define ("__LIBGCC_HAVE_LIBATOMIC"); Or, should I change libgcov.h to use: #if (__SIZEOF_LONG_LONG__ == 4 && __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) \ || (__SIZEOF_LONG_LONG__ == 8 && __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8) \ || __LIBGCC_HAVE_LIBATOMIC