lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master e4bd348d 1/5: Don't use -fsignaling-nans with


From: Greg Chicares
Subject: [lmi-commits] [lmi] master e4bd348d 1/5: Don't use -fsignaling-nans with clang in autotools build
Date: Mon, 13 Jun 2022 09:57:20 -0400 (EDT)

branch: master
commit e4bd348d1cafb5781397a307fadbdd85c17552ef
Author: Vadim Zeitlin <vadim@tt-solutions.com>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Don't use -fsignaling-nans with clang in autotools build
    
    This compiler doesn't support this option, so avoid using it when
    building with it.
---
 configure.ac | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index a4b374dd..b074ade1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -169,12 +169,6 @@ if test "$lmi_cv_cxx_features" = "no"; then
     AC_LANG_POP([C++])
 fi
 
-dnl These options must be always used for lmi unit tests to pass.
-common_options="-fno-ms-extensions -frounding-math -fsignaling-nans"
-
-CFLAGS="$CFLAGS $common_options"
-CXXFLAGS="$CXXFLAGS $common_options"
-
 LT_PATH_LD
 
 # This is a workaround for the harmless but annoying warning
@@ -207,6 +201,17 @@ AC_CACHE_CHECK([if using clang],
 
 CLANG=$lmi_cv_prog_clang
 
+dnl These options must be always used for lmi unit tests to pass.
+common_options="-fno-ms-extensions -frounding-math"
+
+if test "$GCC" = "yes" -a "$CLANG" != "yes"; then
+    dnl This options is not understood by clang.
+    common_options="$common_options -fsignaling-nans"
+fi
+
+CFLAGS="$CFLAGS $common_options"
+CXXFLAGS="$CXXFLAGS $common_options"
+
 if test "$USE_WINDOWS" = "1"; then
     AC_CHECK_TOOL([WINDRES], [windres], no)
 fi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]