This is an automated email from the ASF dual-hosted git repository.

eze pushed a commit to branch 8.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/8.1.x by this push:
     new ea5bdd6fe1 Fix use of -mcx16 flag - only use if it compiles cleanly. 
(#7684) (#10140)
ea5bdd6fe1 is described below

commit ea5bdd6fe11c434a5aa457aa513028dad4b72441
Author: Evan Zelkowitz <[email protected]>
AuthorDate: Wed Aug 2 12:31:32 2023 -0600

    Fix use of -mcx16 flag - only use if it compiles cleanly. (#7684) (#10140)
    
    (cherry picked from commit b05c5bea4f0669fd7e6d994b8b854ef920fc09fb)
    
    Co-authored-by: Alan M. Carroll <[email protected]>
---
 configure.ac | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 717abcecf5..1720e41294 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1462,6 +1462,8 @@ __saved_CXXFLAGS="${CXXFLAGS}"
 __saved_CFLAGS="${CFLAGS}"
 
 has_128bit_cas=0
+# Don't add the -mcx16 flag unless needed and it compiles cleanly.
+needs_mcx16_for_cas=0
 
 TS_TRY_COMPILE_NO_WARNING([],[
     __int128_t x = 0;
@@ -1480,6 +1482,7 @@ TS_TRY_COMPILE_NO_WARNING([],[
       ], [
         AC_MSG_RESULT(yes)
         has_128bit_cas=1
+        needs_mcx16_for_cas=1
       ], [
         AC_MSG_RESULT(no)
     ])
@@ -1490,11 +1493,9 @@ CFLAGS="${__saved_CFLAGS}"
 AC_LANG_POP
 AC_SUBST(has_128bit_cas)
 
-AS_IF([test "x$has_128bit_cas" = "x1"], [
-  AS_IF([test "x$ax_cv_c_compiler_vendor" != "xintel"], [
+AS_IF([test "x$needs_mcx16_for_cas" = "x1"], [
     TS_ADDTO(AM_CFLAGS, [-mcx16])
     TS_ADDTO(AM_CXXFLAGS, [-mcx16])
-  ])
 ])
 
 # Check for POSIX capabilities library.

Reply via email to