You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2013/03/25 20:32:50 UTC

[2/2] git commit: TS-1742: Re-enable 16 byte compare and swap by default

TS-1742: Re-enable 16 byte compare and swap by default


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/70e10888
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/70e10888
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/70e10888

Branch: refs/heads/master
Commit: 70e10888506cdd41fa8eae86a2878cfb8a71f0fa
Parents: 18aadb0
Author: James Peach <jp...@apache.org>
Authored: Mon Mar 25 12:32:31 2013 -0700
Committer: James Peach <jp...@apache.org>
Committed: Mon Mar 25 12:32:31 2013 -0700

----------------------------------------------------------------------
 configure.ac |   52 +++++++++++++++++++++++++---------------------------
 1 files changed, 25 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/70e10888/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 4561409..fe1648a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1108,33 +1108,31 @@ AC_SUBST(need_union_semun)
 AC_MSG_CHECKING(for 128bit CAS support)
 AC_LANG_PUSH([C++])
 
-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
+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}"
+    ])
+])
 
 AC_LANG_POP
 AC_SUBST(has_128bit_cas)