gcov: Fix use of __LIBGCC_HAVE_LIBATOMIC

libgcc/ChangeLog:

	PR target/112777

	* libgcov.h (GCOV_SUPPORTS_ATOMIC):  Honor that __LIBGCC_HAVE_LIBATOMIC is
	always defined as either 0 or 1.
This commit is contained in:
Sebastian Huber 2023-11-30 17:16:53 +01:00
parent a1bc121c00
commit 4b8078142e

View File

@ -98,7 +98,7 @@ typedef unsigned gcov_type_unsigned __attribute__ ((mode (QI)));
/* 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)
|| __LIBGCC_HAVE_LIBATOMIC
#define GCOV_SUPPORTS_ATOMIC 1
#else
#define GCOV_SUPPORTS_ATOMIC 0