aboutsummaryrefslogtreecommitdiff
path: root/libgcc/libgcov-profiler.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2020-06-02 16:57:35 +0200
committerMartin Liska <mliska@suse.cz>2020-06-03 08:12:50 +0200
commiteb3480fc0fe68c0062a5548e922d530c78121cb5 (patch)
tree1e3619f4c6d57ebb711c11cb15b3311501a8d76b /libgcc/libgcov-profiler.c
parenta9312a7926079ddb78b5f93681a9f6823422f5e1 (diff)
downloadgcc-eb3480fc0fe68c0062a5548e922d530c78121cb5.zip
gcc-eb3480fc0fe68c0062a5548e922d530c78121cb5.tar.gz
gcc-eb3480fc0fe68c0062a5548e922d530c78121cb5.tar.bz2
gcov: Fix build on AIX
We must guard used atomic builtins with GCOV_SUPPORTS_ATOMIC. The patch is tested on AIX and I'm going to push it. libgcc/ChangeLog: PR gcov-profile/95480 * libgcov-profiler.c (GCOV_SUPPORTS_ATOMIC): Move to... * libgcov.h (GCOV_SUPPORTS_ATOMIC): ...here. (gcov_counter_add): Use GCOV_SUPPORTS_ATOMIC guard. (gcov_counter_set_if_null): Likewise.
Diffstat (limited to 'libgcc/libgcov-profiler.c')
-rw-r--r--libgcc/libgcov-profiler.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/libgcc/libgcov-profiler.c b/libgcc/libgcov-profiler.c
index 7b17138..45ab93c 100644
--- a/libgcc/libgcov-profiler.c
+++ b/libgcc/libgcov-profiler.c
@@ -26,17 +26,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "libgcov.h"
#if !defined(inhibit_libc)
-/* Detect whether target can support atomic update of profilers. */
-#if __SIZEOF_LONG_LONG__ == 4 && __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
-#define GCOV_SUPPORTS_ATOMIC 1
-#else
-#if __SIZEOF_LONG_LONG__ == 8 && __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8
-#define GCOV_SUPPORTS_ATOMIC 1
-#else
-#define GCOV_SUPPORTS_ATOMIC 0
-#endif
-#endif
-
#ifdef L_gcov_interval_profiler
/* If VALUE is in interval <START, START + STEPS - 1>, then increases the
corresponding counter in COUNTERS. If the VALUE is above or below