summaryrefslogtreecommitdiff
path: root/libgo/configure
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2019-02-01 21:55:38 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2019-02-01 21:55:38 +0000
commitb52a3881f04799d410f7ec70d022179c8d734459 (patch)
treeeace57a9fb5df73173371815f0a0e1a5913a77a8 /libgo/configure
parenta53a893b4fe04ec966a4ec178ee8f394426a5dad (diff)
runtime, sync: use __atomic intrinsics instead of __sync
GCC has supported the __atomic intrinsics since 4.7. They are better than the __sync intrinsics in that they specify a memory model and, more importantly for our purposes, they are reliably implemented either in the compiler or in libatomic. Fixes https://gcc.gnu.org/PR52084 Reviewed-on: https://go-review.googlesource.com/c/160820 From-SVN: r268458
Diffstat (limited to 'libgo/configure')
-rwxr-xr-xlibgo/configure116
1 files changed, 0 insertions, 116 deletions
diff --git a/libgo/configure b/libgo/configure
index 4f6840099c4..138a9c6a6a8 100755
--- a/libgo/configure
+++ b/libgo/configure
@@ -15135,122 +15135,6 @@ done
LIBS="$LIBS_hold"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __sync_bool_compare_and_swap_4" >&5
-$as_echo_n "checking for __sync_bool_compare_and_swap_4... " >&6; }
-if ${libgo_cv_func___sync_bool_compare_and_swap_4+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-typedef unsigned int uint32 __attribute__ ((mode (SI)));
-uint32 i;
-int main() { return __sync_bool_compare_and_swap (&i, 0, 1); }
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- libgo_cv_func___sync_bool_compare_and_swap_4=yes
-else
- libgo_cv_func___sync_bool_compare_and_swap_4=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgo_cv_func___sync_bool_compare_and_swap_4" >&5
-$as_echo "$libgo_cv_func___sync_bool_compare_and_swap_4" >&6; }
-if test "$libgo_cv_func___sync_bool_compare_and_swap_4" = "yes"; then
-
-$as_echo "#define HAVE_SYNC_BOOL_COMPARE_AND_SWAP_4 1" >>confdefs.h
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __sync_bool_compare_and_swap_8" >&5
-$as_echo_n "checking for __sync_bool_compare_and_swap_8... " >&6; }
-if ${libgo_cv_func___sync_bool_compare_and_swap_8+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-typedef unsigned int uint64 __attribute__ ((mode (DI)));
-uint64 i;
-int main() { return __sync_bool_compare_and_swap (&i, 0, 1); }
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- libgo_cv_func___sync_bool_compare_and_swap_8=yes
-else
- libgo_cv_func___sync_bool_compare_and_swap_8=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgo_cv_func___sync_bool_compare_and_swap_8" >&5
-$as_echo "$libgo_cv_func___sync_bool_compare_and_swap_8" >&6; }
-if test "$libgo_cv_func___sync_bool_compare_and_swap_8" = "yes"; then
-
-$as_echo "#define HAVE_SYNC_BOOL_COMPARE_AND_SWAP_8 1" >>confdefs.h
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __sync_fetch_and_add_4" >&5
-$as_echo_n "checking for __sync_fetch_and_add_4... " >&6; }
-if ${libgo_cv_func___sync_fetch_and_add_4+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-typedef unsigned int uint32 __attribute__ ((mode (SI)));
-uint32 i;
-int main() { return __sync_fetch_and_add (&i, 1); }
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- libgo_cv_func___sync_fetch_and_add_4=yes
-else
- libgo_cv_func___sync_fetch_and_add_4=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgo_cv_func___sync_fetch_and_add_4" >&5
-$as_echo "$libgo_cv_func___sync_fetch_and_add_4" >&6; }
-if test "$libgo_cv_func___sync_fetch_and_add_4" = "yes"; then
-
-$as_echo "#define HAVE_SYNC_FETCH_AND_ADD_4 1" >>confdefs.h
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __sync_add_and_fetch_8" >&5
-$as_echo_n "checking for __sync_add_and_fetch_8... " >&6; }
-if ${libgo_cv_func___sync_add_and_fetch_8+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-typedef unsigned int uint64 __attribute__ ((mode (DI)));
-uint64 i;
-int main() { return __sync_add_and_fetch (&i, 1); }
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- libgo_cv_func___sync_add_and_fetch_8=yes
-else
- libgo_cv_func___sync_add_and_fetch_8=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgo_cv_func___sync_add_and_fetch_8" >&5
-$as_echo "$libgo_cv_func___sync_add_and_fetch_8" >&6; }
-if test "$libgo_cv_func___sync_add_and_fetch_8" = "yes"; then
-
-$as_echo "#define HAVE_SYNC_ADD_AND_FETCH_8 1" >>confdefs.h
-
-fi
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler supports -minline-all-stringops" >&5
$as_echo_n "checking whether compiler supports -minline-all-stringops... " >&6; }
if ${libgo_cv_c_stringops+:} false; then :