Permalink
Browse files

TS-1746: disable 128bit compare and swap

Disable the use of 128bit compare and swap that was introduced in
TS-1742. That change was causing crashes in the freelist.
  • Loading branch information...
1 parent 57ffdf5 commit bd8fd4fbb5ee4026f107365bcab6d546fc855f83 @jpeach jpeach committed Mar 21, 2013
Showing with 27 additions and 25 deletions.
  1. +27 −25 configure.ac
View
@@ -1108,31 +1108,33 @@ AC_SUBST(need_union_semun)
AC_MSG_CHECKING(for 128bit CAS support)
AC_LANG_PUSH([C++])
-TS_TRY_COMPILE_NO_WARNING([],[
- __int128_t x = 0;
- __sync_bool_compare_and_swap(&x,0,10);
- ], [
- AC_MSG_RESULT(yes)
- has_128bit_cas=1
- ], [
- dnl If 128bit CAS fails, try again with the -mcx16 option. GCC needs this;
- dnl clang doesn't; icc is unknown but presumed sane.
- __saved_CXXFLAGS="${CXXFLAGS}"
- TS_ADDTO(CXXFLAGS, [-mcx16])
- TS_TRY_COMPILE_NO_WARNING([],[
- __int128_t x = 0;
- __sync_bool_compare_and_swap(&x,0,10);
- ], [
- AC_MSG_RESULT(yes)
- has_128bit_cas=1
- dnl Keep CFLAGS and CXXFLAGS in sync.
- TS_ADDTO(CFLAGS, [-mcx16])
- ], [
- AC_MSG_RESULT(no)
- has_128bit_cas=0
- CXXFLAGS="${__saved_CXXFLAGS}"
- ])
-])
+dnl TS_TRY_COMPILE_NO_WARNING([],[
+dnl __int128_t x = 0;
+dnl __sync_bool_compare_and_swap(&x,0,10);
+dnl ], [
+dnl AC_MSG_RESULT(yes)
+dnl has_128bit_cas=1
+dnl ], [
+dnl dnl If 128bit CAS fails, try again with the -mcx16 option. GCC needs this;
+dnl dnl clang doesn't; icc is unknown but presumed sane.
+dnl __saved_CXXFLAGS="${CXXFLAGS}"
+dnl TS_ADDTO(CXXFLAGS, [-mcx16])
+dnl TS_TRY_COMPILE_NO_WARNING([],[
+dnl __int128_t x = 0;
+dnl __sync_bool_compare_and_swap(&x,0,10);
+dnl ], [
+dnl AC_MSG_RESULT(yes)
+dnl has_128bit_cas=1
+dnl dnl Keep CFLAGS and CXXFLAGS in sync.
+dnl TS_ADDTO(CFLAGS, [-mcx16])
+dnl ], [
+dnl AC_MSG_RESULT(no)
+dnl has_128bit_cas=0
+dnl CXXFLAGS="${__saved_CXXFLAGS}"
+dnl ])
+dnl ])
+
+has_128bit_cas=0
AC_LANG_POP
AC_SUBST(has_128bit_cas)

0 comments on commit bd8fd4f

Please sign in to comment.