about summary refs log tree commit diff
path: root/configure.ac
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-03-07 15:09:53 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-11-01 09:46:08 -0300
commit5c5a8b99cf96b71940e36a9db66d3a61bc315016 (patch)
tree7396885b3487d9383bf477219a79ebcf68b64d9f /configure.ac
parent6ee5a9767a245455720d39eeaa3ce136825e8a42 (diff)
downloadglibc-5c5a8b99cf96b71940e36a9db66d3a61bc315016.tar.gz
glibc-5c5a8b99cf96b71940e36a9db66d3a61bc315016.tar.xz
glibc-5c5a8b99cf96b71940e36a9db66d3a61bc315016.zip
Disable use of -fsignaling-nans if compiler does not support it
Reviewed-by: Fangrui Song <maskray@google.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 973fe59e81..c5c4b383a3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1488,6 +1488,16 @@ if test -n "$submachine"; then
 fi
 AC_SUBST(libc_cv_cc_submachine)
 
+dnl Determine if compiler supports -fsignaling-nans
+AC_CACHE_CHECK([for compiler option that -fsignaling-nans],
+	       libc_cv_cc_signaling_nans, [dnl
+LIBC_TRY_CC_OPTION([-Werror -fsignaling-nans],
+		   [libc_cv_cc_signaling_nans=-fsignaling-nans],
+		   [libc_cv_cc_signaling_nans=])
+])
+LIBC_CONFIG_VAR([config-cflags-signaling-nans],
+		[$libc_cv_cc_signaling_nans])
+
 AC_CACHE_CHECK(if $CC accepts -fno-tree-loop-distribute-patterns with \
 __attribute__ ((__optimize__)), libc_cv_cc_loop_to_function, [dnl
 cat > conftest.c <<EOF