public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/clang] Use -frounding-math iff compiler supports it
@ 2022-04-04 12:55 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2022-04-04 12:55 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=252b23d7d19288f1728a1ef7100155a72fba136d

commit 252b23d7d19288f1728a1ef7100155a72fba136d
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Mar 15 16:01:29 2022 -0300

    Use -frounding-math iff compiler supports it

Diff:
---
 Makeconfig   |  2 +-
 configure    | 22 ++++++++++++++++++++++
 configure.ac |  9 +++++++++
 3 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/Makeconfig b/Makeconfig
index 47db08d6ae..c0cf1e2890 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -861,7 +861,7 @@ endif
 # We have to assume that glibc functions are called in any rounding
 # mode and also change the rounding mode in a few functions. So,
 # disable any optimization that assume default rounding mode.
-+math-flags = -frounding-math
++math-flags = $(config-cflags-frounding-math)
 
 # Logically only "libnldbl", "nonlib" and "testsuite" should be using
 # -fno-math-errno. However due to GCC bug #88576, only "libm" can use
diff --git a/configure b/configure
index 3e59f2511f..225c085c87 100755
--- a/configure
+++ b/configure
@@ -6646,6 +6646,28 @@ $as_echo "$libc_cv_cc_signaling_nans" >&6; }
 config_vars="$config_vars
 config-cflags-signaling-nans = $libc_cv_cc_signaling_nans"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option -frounding-math" >&5
+$as_echo_n "checking for compiler option -frounding-math... " >&6; }
+if ${libc_cv_cc_rounding_math+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -frounding-math -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_rounding_math=-frounding-math
+else
+  libc_cv_cc_rounding_math=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_rounding_math" >&5
+$as_echo "$libc_cv_cc_rounding_math" >&6; }
+config_vars="$config_vars
+config-cflags-frounding-math = $libc_cv_cc_rounding_math"
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-tree-loop-distribute-patterns with \
 __attribute__ ((__optimize__))" >&5
 $as_echo_n "checking if $CC accepts -fno-tree-loop-distribute-patterns with \
diff --git a/configure.ac b/configure.ac
index 3800b740f0..d6a4b93529 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1667,6 +1667,15 @@ LIBC_TRY_CC_OPTION([-Werror -fsignaling-nans],
 LIBC_CONFIG_VAR([config-cflags-signaling-nans],
 		[$libc_cv_cc_signaling_nans])
 
+dnl Determina if compiler support -frounding-math
+AC_CACHE_CHECK([for compiler option -frounding-math], libc_cv_cc_rounding_math, [dnl
+LIBC_TRY_CC_OPTION([-Werror -frounding-math],
+		   [libc_cv_cc_rounding_math=-frounding-math],
+		   [libc_cv_cc_rounding_math=])
+])
+LIBC_CONFIG_VAR([config-cflags-frounding-math],
+	       	[$libc_cv_cc_rounding_math])
+
 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


^ permalink raw reply	[flat|nested] 20+ messages in thread
* [glibc/azanella/clang] Use -frounding-math iff compiler supports it
@ 2024-02-09 17:31 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2024-02-09 17:31 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=478f60ee74804c4ab9521104379ea44622dd8470

commit 478f60ee74804c4ab9521104379ea44622dd8470
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Mar 15 16:01:29 2022 -0300

    Use -frounding-math iff compiler supports it

Diff:
---
 Makeconfig   |  2 +-
 configure    | 24 ++++++++++++++++++++++++
 configure.ac |  9 +++++++++
 3 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/Makeconfig b/Makeconfig
index 85e00cef94..acde47e99c 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -870,7 +870,7 @@ endif
 # We have to assume that glibc functions are called in any rounding
 # mode and also change the rounding mode in a few functions. So,
 # disable any optimization that assume default rounding mode.
-+math-flags = -frounding-math
++math-flags = $(config-cflags-frounding-math)
 
 # Logically only "libnldbl", "nonlib" and "testsuite" should be using
 # -fno-math-errno. However due to GCC bug #88576, only "libm" can use
diff --git a/configure b/configure
index b7c591dfaa..624662bd62 100755
--- a/configure
+++ b/configure
@@ -7341,6 +7341,30 @@ printf "%s\n" "$libc_cv_cc_signaling_nans" >&6; }
 config_vars="$config_vars
 config-cflags-signaling-nans = $libc_cv_cc_signaling_nans"
 
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compiler option -frounding-math" >&5
+printf %s "checking for compiler option -frounding-math... " >&6; }
+if test ${libc_cv_cc_rounding_math+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if { ac_try='${CC-cc} -Werror -frounding-math -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }
+then :
+  libc_cv_cc_rounding_math=-frounding-math
+else $as_nop
+  libc_cv_cc_rounding_math=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_rounding_math" >&5
+printf "%s\n" "$libc_cv_cc_rounding_math" >&6; }
+config_vars="$config_vars
+config-cflags-frounding-math = $libc_cv_cc_rounding_math"
+
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-tree-loop-distribute-patterns with \
 __attribute__ ((__optimize__))" >&5
 printf %s "checking if $CC accepts -fno-tree-loop-distribute-patterns with \
diff --git a/configure.ac b/configure.ac
index 591f7ee84d..b5cc1aa9eb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1469,6 +1469,15 @@ LIBC_TRY_CC_OPTION([-Werror -fsignaling-nans],
 LIBC_CONFIG_VAR([config-cflags-signaling-nans],
 		[$libc_cv_cc_signaling_nans])
 
+dnl Determina if compiler support -frounding-math
+AC_CACHE_CHECK([for compiler option -frounding-math], libc_cv_cc_rounding_math, [dnl
+LIBC_TRY_CC_OPTION([-Werror -frounding-math],
+		   [libc_cv_cc_rounding_math=-frounding-math],
+		   [libc_cv_cc_rounding_math=])
+])
+LIBC_CONFIG_VAR([config-cflags-frounding-math],
+		[$libc_cv_cc_rounding_math])
+
 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

^ permalink raw reply	[flat|nested] 20+ messages in thread
* [glibc/azanella/clang] Use -frounding-math iff compiler supports it
@ 2024-02-07 14:06 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2024-02-07 14:06 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a0938bd5aaf47c8bd1e1958df758d6b0bb72e7a0

commit a0938bd5aaf47c8bd1e1958df758d6b0bb72e7a0
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Mar 15 16:01:29 2022 -0300

    Use -frounding-math iff compiler supports it

Diff:
---
 Makeconfig   |  2 +-
 configure    | 24 ++++++++++++++++++++++++
 configure.ac |  9 +++++++++
 3 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/Makeconfig b/Makeconfig
index 85e00cef94..acde47e99c 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -870,7 +870,7 @@ endif
 # We have to assume that glibc functions are called in any rounding
 # mode and also change the rounding mode in a few functions. So,
 # disable any optimization that assume default rounding mode.
-+math-flags = -frounding-math
++math-flags = $(config-cflags-frounding-math)
 
 # Logically only "libnldbl", "nonlib" and "testsuite" should be using
 # -fno-math-errno. However due to GCC bug #88576, only "libm" can use
diff --git a/configure b/configure
index b7c591dfaa..624662bd62 100755
--- a/configure
+++ b/configure
@@ -7341,6 +7341,30 @@ printf "%s\n" "$libc_cv_cc_signaling_nans" >&6; }
 config_vars="$config_vars
 config-cflags-signaling-nans = $libc_cv_cc_signaling_nans"
 
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compiler option -frounding-math" >&5
+printf %s "checking for compiler option -frounding-math... " >&6; }
+if test ${libc_cv_cc_rounding_math+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if { ac_try='${CC-cc} -Werror -frounding-math -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }
+then :
+  libc_cv_cc_rounding_math=-frounding-math
+else $as_nop
+  libc_cv_cc_rounding_math=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_rounding_math" >&5
+printf "%s\n" "$libc_cv_cc_rounding_math" >&6; }
+config_vars="$config_vars
+config-cflags-frounding-math = $libc_cv_cc_rounding_math"
+
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-tree-loop-distribute-patterns with \
 __attribute__ ((__optimize__))" >&5
 printf %s "checking if $CC accepts -fno-tree-loop-distribute-patterns with \
diff --git a/configure.ac b/configure.ac
index 591f7ee84d..b5cc1aa9eb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1469,6 +1469,15 @@ LIBC_TRY_CC_OPTION([-Werror -fsignaling-nans],
 LIBC_CONFIG_VAR([config-cflags-signaling-nans],
 		[$libc_cv_cc_signaling_nans])
 
+dnl Determina if compiler support -frounding-math
+AC_CACHE_CHECK([for compiler option -frounding-math], libc_cv_cc_rounding_math, [dnl
+LIBC_TRY_CC_OPTION([-Werror -frounding-math],
+		   [libc_cv_cc_rounding_math=-frounding-math],
+		   [libc_cv_cc_rounding_math=])
+])
+LIBC_CONFIG_VAR([config-cflags-frounding-math],
+		[$libc_cv_cc_rounding_math])
+
 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

^ permalink raw reply	[flat|nested] 20+ messages in thread
* [glibc/azanella/clang] Use -frounding-math iff compiler supports it
@ 2024-01-29 17:56 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2024-01-29 17:56 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=baedfaaedd032b73641c5366945462a7a038e135

commit baedfaaedd032b73641c5366945462a7a038e135
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Mar 15 16:01:29 2022 -0300

    Use -frounding-math iff compiler supports it

Diff:
---
 Makeconfig   |  2 +-
 configure    | 24 ++++++++++++++++++++++++
 configure.ac |  9 +++++++++
 3 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/Makeconfig b/Makeconfig
index 85e00cef94..acde47e99c 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -870,7 +870,7 @@ endif
 # We have to assume that glibc functions are called in any rounding
 # mode and also change the rounding mode in a few functions. So,
 # disable any optimization that assume default rounding mode.
-+math-flags = -frounding-math
++math-flags = $(config-cflags-frounding-math)
 
 # Logically only "libnldbl", "nonlib" and "testsuite" should be using
 # -fno-math-errno. However due to GCC bug #88576, only "libm" can use
diff --git a/configure b/configure
index b7c591dfaa..624662bd62 100755
--- a/configure
+++ b/configure
@@ -7341,6 +7341,30 @@ printf "%s\n" "$libc_cv_cc_signaling_nans" >&6; }
 config_vars="$config_vars
 config-cflags-signaling-nans = $libc_cv_cc_signaling_nans"
 
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compiler option -frounding-math" >&5
+printf %s "checking for compiler option -frounding-math... " >&6; }
+if test ${libc_cv_cc_rounding_math+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if { ac_try='${CC-cc} -Werror -frounding-math -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }
+then :
+  libc_cv_cc_rounding_math=-frounding-math
+else $as_nop
+  libc_cv_cc_rounding_math=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_rounding_math" >&5
+printf "%s\n" "$libc_cv_cc_rounding_math" >&6; }
+config_vars="$config_vars
+config-cflags-frounding-math = $libc_cv_cc_rounding_math"
+
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-tree-loop-distribute-patterns with \
 __attribute__ ((__optimize__))" >&5
 printf %s "checking if $CC accepts -fno-tree-loop-distribute-patterns with \
diff --git a/configure.ac b/configure.ac
index 591f7ee84d..b5cc1aa9eb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1469,6 +1469,15 @@ LIBC_TRY_CC_OPTION([-Werror -fsignaling-nans],
 LIBC_CONFIG_VAR([config-cflags-signaling-nans],
 		[$libc_cv_cc_signaling_nans])
 
+dnl Determina if compiler support -frounding-math
+AC_CACHE_CHECK([for compiler option -frounding-math], libc_cv_cc_rounding_math, [dnl
+LIBC_TRY_CC_OPTION([-Werror -frounding-math],
+		   [libc_cv_cc_rounding_math=-frounding-math],
+		   [libc_cv_cc_rounding_math=])
+])
+LIBC_CONFIG_VAR([config-cflags-frounding-math],
+		[$libc_cv_cc_rounding_math])
+
 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

^ permalink raw reply	[flat|nested] 20+ messages in thread
* [glibc/azanella/clang] Use -frounding-math iff compiler supports it
@ 2023-12-21 18:53 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2023-12-21 18:53 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c52f774f9afdd1775bccd8c44bdfb5745b3f97ce

commit c52f774f9afdd1775bccd8c44bdfb5745b3f97ce
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Mar 15 16:01:29 2022 -0300

    Use -frounding-math iff compiler supports it

Diff:
---
 Makeconfig   |  2 +-
 configure    | 24 ++++++++++++++++++++++++
 configure.ac |  9 +++++++++
 3 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/Makeconfig b/Makeconfig
index 44af1e9c62..f9cf222e17 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -870,7 +870,7 @@ endif
 # We have to assume that glibc functions are called in any rounding
 # mode and also change the rounding mode in a few functions. So,
 # disable any optimization that assume default rounding mode.
-+math-flags = -frounding-math
++math-flags = $(config-cflags-frounding-math)
 
 # Logically only "libnldbl", "nonlib" and "testsuite" should be using
 # -fno-math-errno. However due to GCC bug #88576, only "libm" can use
diff --git a/configure b/configure
index 95076cc296..5b94818857 100755
--- a/configure
+++ b/configure
@@ -7340,6 +7340,30 @@ printf "%s\n" "$libc_cv_cc_signaling_nans" >&6; }
 config_vars="$config_vars
 config-cflags-signaling-nans = $libc_cv_cc_signaling_nans"
 
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compiler option -frounding-math" >&5
+printf %s "checking for compiler option -frounding-math... " >&6; }
+if test ${libc_cv_cc_rounding_math+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if { ac_try='${CC-cc} -Werror -frounding-math -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }
+then :
+  libc_cv_cc_rounding_math=-frounding-math
+else $as_nop
+  libc_cv_cc_rounding_math=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_rounding_math" >&5
+printf "%s\n" "$libc_cv_cc_rounding_math" >&6; }
+config_vars="$config_vars
+config-cflags-frounding-math = $libc_cv_cc_rounding_math"
+
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-tree-loop-distribute-patterns with \
 __attribute__ ((__optimize__))" >&5
 printf %s "checking if $CC accepts -fno-tree-loop-distribute-patterns with \
diff --git a/configure.ac b/configure.ac
index 591f7ee84d..b5cc1aa9eb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1469,6 +1469,15 @@ LIBC_TRY_CC_OPTION([-Werror -fsignaling-nans],
 LIBC_CONFIG_VAR([config-cflags-signaling-nans],
 		[$libc_cv_cc_signaling_nans])
 
+dnl Determina if compiler support -frounding-math
+AC_CACHE_CHECK([for compiler option -frounding-math], libc_cv_cc_rounding_math, [dnl
+LIBC_TRY_CC_OPTION([-Werror -frounding-math],
+		   [libc_cv_cc_rounding_math=-frounding-math],
+		   [libc_cv_cc_rounding_math=])
+])
+LIBC_CONFIG_VAR([config-cflags-frounding-math],
+		[$libc_cv_cc_rounding_math])
+
 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

^ permalink raw reply	[flat|nested] 20+ messages in thread
* [glibc/azanella/clang] Use -frounding-math iff compiler supports it
@ 2023-09-28 17:51 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2023-09-28 17:51 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=242e8c8f9dcb6669613e280a52f20337ba269202

commit 242e8c8f9dcb6669613e280a52f20337ba269202
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Mar 15 16:01:29 2022 -0300

    Use -frounding-math iff compiler supports it

Diff:
---
 Makeconfig   |  2 +-
 configure    | 24 ++++++++++++++++++++++++
 configure.ac |  9 +++++++++
 3 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/Makeconfig b/Makeconfig
index c48fcc59e8..a908d3e19d 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -870,7 +870,7 @@ endif
 # We have to assume that glibc functions are called in any rounding
 # mode and also change the rounding mode in a few functions. So,
 # disable any optimization that assume default rounding mode.
-+math-flags = -frounding-math
++math-flags = $(config-cflags-frounding-math)
 
 # Logically only "libnldbl", "nonlib" and "testsuite" should be using
 # -fno-math-errno. However due to GCC bug #88576, only "libm" can use
diff --git a/configure b/configure
index ff97a7a7b8..9b38fae7a1 100755
--- a/configure
+++ b/configure
@@ -7466,6 +7466,30 @@ printf "%s\n" "$libc_cv_cc_signaling_nans" >&6; }
 config_vars="$config_vars
 config-cflags-signaling-nans = $libc_cv_cc_signaling_nans"
 
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compiler option -frounding-math" >&5
+printf %s "checking for compiler option -frounding-math... " >&6; }
+if test ${libc_cv_cc_rounding_math+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if { ac_try='${CC-cc} -Werror -frounding-math -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }
+then :
+  libc_cv_cc_rounding_math=-frounding-math
+else $as_nop
+  libc_cv_cc_rounding_math=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_rounding_math" >&5
+printf "%s\n" "$libc_cv_cc_rounding_math" >&6; }
+config_vars="$config_vars
+config-cflags-frounding-math = $libc_cv_cc_rounding_math"
+
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-tree-loop-distribute-patterns with \
 __attribute__ ((__optimize__))" >&5
 printf %s "checking if $CC accepts -fno-tree-loop-distribute-patterns with \
diff --git a/configure.ac b/configure.ac
index cac41e728e..ea5bb07655 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1534,6 +1534,15 @@ LIBC_TRY_CC_OPTION([-Werror -fsignaling-nans],
 LIBC_CONFIG_VAR([config-cflags-signaling-nans],
 		[$libc_cv_cc_signaling_nans])
 
+dnl Determina if compiler support -frounding-math
+AC_CACHE_CHECK([for compiler option -frounding-math], libc_cv_cc_rounding_math, [dnl
+LIBC_TRY_CC_OPTION([-Werror -frounding-math],
+		   [libc_cv_cc_rounding_math=-frounding-math],
+		   [libc_cv_cc_rounding_math=])
+])
+LIBC_CONFIG_VAR([config-cflags-frounding-math],
+		[$libc_cv_cc_rounding_math])
+
 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

^ permalink raw reply	[flat|nested] 20+ messages in thread
* [glibc/azanella/clang] Use -frounding-math iff compiler supports it
@ 2023-08-30 12:36 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2023-08-30 12:36 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=61d716117661164a141dc74f2d1aedfb72cdb122

commit 61d716117661164a141dc74f2d1aedfb72cdb122
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Mar 15 16:01:29 2022 -0300

    Use -frounding-math iff compiler supports it

Diff:
---
 Makeconfig   |  2 +-
 configure    | 24 ++++++++++++++++++++++++
 configure.ac |  9 +++++++++
 3 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/Makeconfig b/Makeconfig
index c48fcc59e8..a908d3e19d 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -870,7 +870,7 @@ endif
 # We have to assume that glibc functions are called in any rounding
 # mode and also change the rounding mode in a few functions. So,
 # disable any optimization that assume default rounding mode.
-+math-flags = -frounding-math
++math-flags = $(config-cflags-frounding-math)
 
 # Logically only "libnldbl", "nonlib" and "testsuite" should be using
 # -fno-math-errno. However due to GCC bug #88576, only "libm" can use
diff --git a/configure b/configure
index 4394ec25bb..f7672d0b28 100755
--- a/configure
+++ b/configure
@@ -7442,6 +7442,30 @@ printf "%s\n" "$libc_cv_cc_signaling_nans" >&6; }
 config_vars="$config_vars
 config-cflags-signaling-nans = $libc_cv_cc_signaling_nans"
 
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compiler option -frounding-math" >&5
+printf %s "checking for compiler option -frounding-math... " >&6; }
+if test ${libc_cv_cc_rounding_math+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if { ac_try='${CC-cc} -Werror -frounding-math -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }
+then :
+  libc_cv_cc_rounding_math=-frounding-math
+else $as_nop
+  libc_cv_cc_rounding_math=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_rounding_math" >&5
+printf "%s\n" "$libc_cv_cc_rounding_math" >&6; }
+config_vars="$config_vars
+config-cflags-frounding-math = $libc_cv_cc_rounding_math"
+
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-tree-loop-distribute-patterns with \
 __attribute__ ((__optimize__))" >&5
 printf %s "checking if $CC accepts -fno-tree-loop-distribute-patterns with \
diff --git a/configure.ac b/configure.ac
index b9393cd64b..25d4f5ff8e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1526,6 +1526,15 @@ LIBC_TRY_CC_OPTION([-Werror -fsignaling-nans],
 LIBC_CONFIG_VAR([config-cflags-signaling-nans],
 		[$libc_cv_cc_signaling_nans])
 
+dnl Determina if compiler support -frounding-math
+AC_CACHE_CHECK([for compiler option -frounding-math], libc_cv_cc_rounding_math, [dnl
+LIBC_TRY_CC_OPTION([-Werror -frounding-math],
+		   [libc_cv_cc_rounding_math=-frounding-math],
+		   [libc_cv_cc_rounding_math=])
+])
+LIBC_CONFIG_VAR([config-cflags-frounding-math],
+	       	[$libc_cv_cc_rounding_math])
+
 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

^ permalink raw reply	[flat|nested] 20+ messages in thread
* [glibc/azanella/clang] Use -frounding-math iff compiler supports it
@ 2023-02-09 19:48 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2023-02-09 19:48 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a08696d4bde2f8b7b7b88cca26989df545cfcb58

commit a08696d4bde2f8b7b7b88cca26989df545cfcb58
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Mar 15 16:01:29 2022 -0300

    Use -frounding-math iff compiler supports it

Diff:
---
 Makeconfig   |  2 +-
 configure    | 22 ++++++++++++++++++++++
 configure.ac |  9 +++++++++
 3 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/Makeconfig b/Makeconfig
index 2fda4af5f7..a4a6f247d0 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -874,7 +874,7 @@ endif
 # We have to assume that glibc functions are called in any rounding
 # mode and also change the rounding mode in a few functions. So,
 # disable any optimization that assume default rounding mode.
-+math-flags = -frounding-math
++math-flags = $(config-cflags-frounding-math)
 
 # Logically only "libnldbl", "nonlib" and "testsuite" should be using
 # -fno-math-errno. However due to GCC bug #88576, only "libm" can use
diff --git a/configure b/configure
index c7396f34d2..61ab5ff9b9 100755
--- a/configure
+++ b/configure
@@ -6226,6 +6226,28 @@ $as_echo "$libc_cv_cc_signaling_nans" >&6; }
 config_vars="$config_vars
 config-cflags-signaling-nans = $libc_cv_cc_signaling_nans"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option -frounding-math" >&5
+$as_echo_n "checking for compiler option -frounding-math... " >&6; }
+if ${libc_cv_cc_rounding_math+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -frounding-math -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_rounding_math=-frounding-math
+else
+  libc_cv_cc_rounding_math=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_rounding_math" >&5
+$as_echo "$libc_cv_cc_rounding_math" >&6; }
+config_vars="$config_vars
+config-cflags-frounding-math = $libc_cv_cc_rounding_math"
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-tree-loop-distribute-patterns with \
 __attribute__ ((__optimize__))" >&5
 $as_echo_n "checking if $CC accepts -fno-tree-loop-distribute-patterns with \
diff --git a/configure.ac b/configure.ac
index b23e0f7970..7d5f561852 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1542,6 +1542,15 @@ LIBC_TRY_CC_OPTION([-Werror -fsignaling-nans],
 LIBC_CONFIG_VAR([config-cflags-signaling-nans],
 		[$libc_cv_cc_signaling_nans])
 
+dnl Determina if compiler support -frounding-math
+AC_CACHE_CHECK([for compiler option -frounding-math], libc_cv_cc_rounding_math, [dnl
+LIBC_TRY_CC_OPTION([-Werror -frounding-math],
+		   [libc_cv_cc_rounding_math=-frounding-math],
+		   [libc_cv_cc_rounding_math=])
+])
+LIBC_CONFIG_VAR([config-cflags-frounding-math],
+	       	[$libc_cv_cc_rounding_math])
+
 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

^ permalink raw reply	[flat|nested] 20+ messages in thread
* [glibc/azanella/clang] Use -frounding-math iff compiler supports it
@ 2022-10-28 17:41 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2022-10-28 17:41 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f2543b764a6555a272c9ae572b84a661843171e5

commit f2543b764a6555a272c9ae572b84a661843171e5
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Mar 15 16:01:29 2022 -0300

    Use -frounding-math iff compiler supports it

Diff:
---
 Makeconfig   |  2 +-
 configure    | 22 ++++++++++++++++++++++
 configure.ac |  9 +++++++++
 3 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/Makeconfig b/Makeconfig
index 08a869cd11..d80db88190 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -874,7 +874,7 @@ endif
 # We have to assume that glibc functions are called in any rounding
 # mode and also change the rounding mode in a few functions. So,
 # disable any optimization that assume default rounding mode.
-+math-flags = -frounding-math
++math-flags = $(config-cflags-frounding-math)
 
 # Logically only "libnldbl", "nonlib" and "testsuite" should be using
 # -fno-math-errno. However due to GCC bug #88576, only "libm" can use
diff --git a/configure b/configure
index 8e0894742c..ef1557ef6d 100755
--- a/configure
+++ b/configure
@@ -6520,6 +6520,28 @@ $as_echo "$libc_cv_cc_signaling_nans" >&6; }
 config_vars="$config_vars
 config-cflags-signaling-nans = $libc_cv_cc_signaling_nans"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option -frounding-math" >&5
+$as_echo_n "checking for compiler option -frounding-math... " >&6; }
+if ${libc_cv_cc_rounding_math+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -frounding-math -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_rounding_math=-frounding-math
+else
+  libc_cv_cc_rounding_math=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_rounding_math" >&5
+$as_echo "$libc_cv_cc_rounding_math" >&6; }
+config_vars="$config_vars
+config-cflags-frounding-math = $libc_cv_cc_rounding_math"
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-tree-loop-distribute-patterns with \
 __attribute__ ((__optimize__))" >&5
 $as_echo_n "checking if $CC accepts -fno-tree-loop-distribute-patterns with \
diff --git a/configure.ac b/configure.ac
index 67af290952..043b6973e0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1557,6 +1557,15 @@ LIBC_TRY_CC_OPTION([-Werror -fsignaling-nans],
 LIBC_CONFIG_VAR([config-cflags-signaling-nans],
 		[$libc_cv_cc_signaling_nans])
 
+dnl Determina if compiler support -frounding-math
+AC_CACHE_CHECK([for compiler option -frounding-math], libc_cv_cc_rounding_math, [dnl
+LIBC_TRY_CC_OPTION([-Werror -frounding-math],
+		   [libc_cv_cc_rounding_math=-frounding-math],
+		   [libc_cv_cc_rounding_math=])
+])
+LIBC_CONFIG_VAR([config-cflags-frounding-math],
+	       	[$libc_cv_cc_rounding_math])
+
 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

^ permalink raw reply	[flat|nested] 20+ messages in thread
* [glibc/azanella/clang] Use -frounding-math iff compiler supports it
@ 2022-10-04 12:59 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2022-10-04 12:59 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=91bda0ee2596703ff94600339b632c54246e41e5

commit 91bda0ee2596703ff94600339b632c54246e41e5
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Mar 15 16:01:29 2022 -0300

    Use -frounding-math iff compiler supports it

Diff:
---
 Makeconfig   |  2 +-
 configure    | 22 ++++++++++++++++++++++
 configure.ac |  9 +++++++++
 3 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/Makeconfig b/Makeconfig
index 842f49eb58..adb83e6801 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -874,7 +874,7 @@ endif
 # We have to assume that glibc functions are called in any rounding
 # mode and also change the rounding mode in a few functions. So,
 # disable any optimization that assume default rounding mode.
-+math-flags = -frounding-math
++math-flags = $(config-cflags-frounding-math)
 
 # Logically only "libnldbl", "nonlib" and "testsuite" should be using
 # -fno-math-errno. However due to GCC bug #88576, only "libm" can use
diff --git a/configure b/configure
index 5fc7d6f0d4..f777e4fafd 100755
--- a/configure
+++ b/configure
@@ -6520,6 +6520,28 @@ $as_echo "$libc_cv_cc_signaling_nans" >&6; }
 config_vars="$config_vars
 config-cflags-signaling-nans = $libc_cv_cc_signaling_nans"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option -frounding-math" >&5
+$as_echo_n "checking for compiler option -frounding-math... " >&6; }
+if ${libc_cv_cc_rounding_math+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -frounding-math -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_rounding_math=-frounding-math
+else
+  libc_cv_cc_rounding_math=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_rounding_math" >&5
+$as_echo "$libc_cv_cc_rounding_math" >&6; }
+config_vars="$config_vars
+config-cflags-frounding-math = $libc_cv_cc_rounding_math"
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-tree-loop-distribute-patterns with \
 __attribute__ ((__optimize__))" >&5
 $as_echo_n "checking if $CC accepts -fno-tree-loop-distribute-patterns with \
diff --git a/configure.ac b/configure.ac
index fb698c3d7d..03e14b13a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1557,6 +1557,15 @@ LIBC_TRY_CC_OPTION([-Werror -fsignaling-nans],
 LIBC_CONFIG_VAR([config-cflags-signaling-nans],
 		[$libc_cv_cc_signaling_nans])
 
+dnl Determina if compiler support -frounding-math
+AC_CACHE_CHECK([for compiler option -frounding-math], libc_cv_cc_rounding_math, [dnl
+LIBC_TRY_CC_OPTION([-Werror -frounding-math],
+		   [libc_cv_cc_rounding_math=-frounding-math],
+		   [libc_cv_cc_rounding_math=])
+])
+LIBC_CONFIG_VAR([config-cflags-frounding-math],
+	       	[$libc_cv_cc_rounding_math])
+
 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

^ permalink raw reply	[flat|nested] 20+ messages in thread
* [glibc/azanella/clang] Use -frounding-math iff compiler supports it
@ 2022-06-09 21:21 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2022-06-09 21:21 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=bfdcb06508bebdbc557c4b2cfe0bb6696ef2dc4a

commit bfdcb06508bebdbc557c4b2cfe0bb6696ef2dc4a
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Mar 15 16:01:29 2022 -0300

    Use -frounding-math iff compiler supports it

Diff:
---
 Makeconfig   |  2 +-
 configure    | 22 ++++++++++++++++++++++
 configure.ac |  9 +++++++++
 3 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/Makeconfig b/Makeconfig
index ba70321af1..fb18d1c174 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -858,7 +858,7 @@ endif
 # We have to assume that glibc functions are called in any rounding
 # mode and also change the rounding mode in a few functions. So,
 # disable any optimization that assume default rounding mode.
-+math-flags = -frounding-math
++math-flags = $(config-cflags-frounding-math)
 
 # Logically only "libnldbl", "nonlib" and "testsuite" should be using
 # -fno-math-errno. However due to GCC bug #88576, only "libm" can use
diff --git a/configure b/configure
index 4738e16b9b..ef97002749 100755
--- a/configure
+++ b/configure
@@ -6491,6 +6491,28 @@ $as_echo "$libc_cv_cc_signaling_nans" >&6; }
 config_vars="$config_vars
 config-cflags-signaling-nans = $libc_cv_cc_signaling_nans"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option -frounding-math" >&5
+$as_echo_n "checking for compiler option -frounding-math... " >&6; }
+if ${libc_cv_cc_rounding_math+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -frounding-math -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_rounding_math=-frounding-math
+else
+  libc_cv_cc_rounding_math=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_rounding_math" >&5
+$as_echo "$libc_cv_cc_rounding_math" >&6; }
+config_vars="$config_vars
+config-cflags-frounding-math = $libc_cv_cc_rounding_math"
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-tree-loop-distribute-patterns with \
 __attribute__ ((__optimize__))" >&5
 $as_echo_n "checking if $CC accepts -fno-tree-loop-distribute-patterns with \
diff --git a/configure.ac b/configure.ac
index cf50761b3d..7a8412f86b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1535,6 +1535,15 @@ LIBC_TRY_CC_OPTION([-Werror -fsignaling-nans],
 LIBC_CONFIG_VAR([config-cflags-signaling-nans],
 		[$libc_cv_cc_signaling_nans])
 
+dnl Determina if compiler support -frounding-math
+AC_CACHE_CHECK([for compiler option -frounding-math], libc_cv_cc_rounding_math, [dnl
+LIBC_TRY_CC_OPTION([-Werror -frounding-math],
+		   [libc_cv_cc_rounding_math=-frounding-math],
+		   [libc_cv_cc_rounding_math=])
+])
+LIBC_CONFIG_VAR([config-cflags-frounding-math],
+	       	[$libc_cv_cc_rounding_math])
+
 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


^ permalink raw reply	[flat|nested] 20+ messages in thread
* [glibc/azanella/clang] Use -frounding-math iff compiler supports it
@ 2022-06-09 13:17 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2022-06-09 13:17 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=bfdcb06508bebdbc557c4b2cfe0bb6696ef2dc4a

commit bfdcb06508bebdbc557c4b2cfe0bb6696ef2dc4a
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Mar 15 16:01:29 2022 -0300

    Use -frounding-math iff compiler supports it

Diff:
---
 Makeconfig   |  2 +-
 configure    | 22 ++++++++++++++++++++++
 configure.ac |  9 +++++++++
 3 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/Makeconfig b/Makeconfig
index ba70321af1..fb18d1c174 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -858,7 +858,7 @@ endif
 # We have to assume that glibc functions are called in any rounding
 # mode and also change the rounding mode in a few functions. So,
 # disable any optimization that assume default rounding mode.
-+math-flags = -frounding-math
++math-flags = $(config-cflags-frounding-math)
 
 # Logically only "libnldbl", "nonlib" and "testsuite" should be using
 # -fno-math-errno. However due to GCC bug #88576, only "libm" can use
diff --git a/configure b/configure
index 4738e16b9b..ef97002749 100755
--- a/configure
+++ b/configure
@@ -6491,6 +6491,28 @@ $as_echo "$libc_cv_cc_signaling_nans" >&6; }
 config_vars="$config_vars
 config-cflags-signaling-nans = $libc_cv_cc_signaling_nans"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option -frounding-math" >&5
+$as_echo_n "checking for compiler option -frounding-math... " >&6; }
+if ${libc_cv_cc_rounding_math+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -frounding-math -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_rounding_math=-frounding-math
+else
+  libc_cv_cc_rounding_math=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_rounding_math" >&5
+$as_echo "$libc_cv_cc_rounding_math" >&6; }
+config_vars="$config_vars
+config-cflags-frounding-math = $libc_cv_cc_rounding_math"
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-tree-loop-distribute-patterns with \
 __attribute__ ((__optimize__))" >&5
 $as_echo_n "checking if $CC accepts -fno-tree-loop-distribute-patterns with \
diff --git a/configure.ac b/configure.ac
index cf50761b3d..7a8412f86b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1535,6 +1535,15 @@ LIBC_TRY_CC_OPTION([-Werror -fsignaling-nans],
 LIBC_CONFIG_VAR([config-cflags-signaling-nans],
 		[$libc_cv_cc_signaling_nans])
 
+dnl Determina if compiler support -frounding-math
+AC_CACHE_CHECK([for compiler option -frounding-math], libc_cv_cc_rounding_math, [dnl
+LIBC_TRY_CC_OPTION([-Werror -frounding-math],
+		   [libc_cv_cc_rounding_math=-frounding-math],
+		   [libc_cv_cc_rounding_math=])
+])
+LIBC_CONFIG_VAR([config-cflags-frounding-math],
+	       	[$libc_cv_cc_rounding_math])
+
 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


^ permalink raw reply	[flat|nested] 20+ messages in thread
* [glibc/azanella/clang] Use -frounding-math iff compiler supports it
@ 2022-06-03 14:06 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2022-06-03 14:06 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7557173975aa3813191ea72035a3df384cabe593

commit 7557173975aa3813191ea72035a3df384cabe593
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Mar 15 16:01:29 2022 -0300

    Use -frounding-math iff compiler supports it

Diff:
---
 Makeconfig   |  2 +-
 configure    | 22 ++++++++++++++++++++++
 configure.ac |  9 +++++++++
 3 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/Makeconfig b/Makeconfig
index ba70321af1..fb18d1c174 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -858,7 +858,7 @@ endif
 # We have to assume that glibc functions are called in any rounding
 # mode and also change the rounding mode in a few functions. So,
 # disable any optimization that assume default rounding mode.
-+math-flags = -frounding-math
++math-flags = $(config-cflags-frounding-math)
 
 # Logically only "libnldbl", "nonlib" and "testsuite" should be using
 # -fno-math-errno. However due to GCC bug #88576, only "libm" can use
diff --git a/configure b/configure
index 4738e16b9b..ef97002749 100755
--- a/configure
+++ b/configure
@@ -6491,6 +6491,28 @@ $as_echo "$libc_cv_cc_signaling_nans" >&6; }
 config_vars="$config_vars
 config-cflags-signaling-nans = $libc_cv_cc_signaling_nans"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option -frounding-math" >&5
+$as_echo_n "checking for compiler option -frounding-math... " >&6; }
+if ${libc_cv_cc_rounding_math+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -frounding-math -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_rounding_math=-frounding-math
+else
+  libc_cv_cc_rounding_math=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_rounding_math" >&5
+$as_echo "$libc_cv_cc_rounding_math" >&6; }
+config_vars="$config_vars
+config-cflags-frounding-math = $libc_cv_cc_rounding_math"
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-tree-loop-distribute-patterns with \
 __attribute__ ((__optimize__))" >&5
 $as_echo_n "checking if $CC accepts -fno-tree-loop-distribute-patterns with \
diff --git a/configure.ac b/configure.ac
index cf50761b3d..7a8412f86b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1535,6 +1535,15 @@ LIBC_TRY_CC_OPTION([-Werror -fsignaling-nans],
 LIBC_CONFIG_VAR([config-cflags-signaling-nans],
 		[$libc_cv_cc_signaling_nans])
 
+dnl Determina if compiler support -frounding-math
+AC_CACHE_CHECK([for compiler option -frounding-math], libc_cv_cc_rounding_math, [dnl
+LIBC_TRY_CC_OPTION([-Werror -frounding-math],
+		   [libc_cv_cc_rounding_math=-frounding-math],
+		   [libc_cv_cc_rounding_math=])
+])
+LIBC_CONFIG_VAR([config-cflags-frounding-math],
+	       	[$libc_cv_cc_rounding_math])
+
 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


^ permalink raw reply	[flat|nested] 20+ messages in thread
* [glibc/azanella/clang] Use -frounding-math iff compiler supports it
@ 2022-05-13 14:20 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2022-05-13 14:20 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=260a36a71f70fd8c9fd1f0f46452e6782f05a418

commit 260a36a71f70fd8c9fd1f0f46452e6782f05a418
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Mar 15 16:01:29 2022 -0300

    Use -frounding-math iff compiler supports it

Diff:
---
 Makeconfig   |  2 +-
 configure    | 22 ++++++++++++++++++++++
 configure.ac |  9 +++++++++
 3 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/Makeconfig b/Makeconfig
index b5aa07c4f4..ee39dc5711 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -846,7 +846,7 @@ endif
 # We have to assume that glibc functions are called in any rounding
 # mode and also change the rounding mode in a few functions. So,
 # disable any optimization that assume default rounding mode.
-+math-flags = -frounding-math
++math-flags = $(config-cflags-frounding-math)
 
 # Logically only "libnldbl", "nonlib" and "testsuite" should be using
 # -fno-math-errno. However due to GCC bug #88576, only "libm" can use
diff --git a/configure b/configure
index 4738e16b9b..ef97002749 100755
--- a/configure
+++ b/configure
@@ -6491,6 +6491,28 @@ $as_echo "$libc_cv_cc_signaling_nans" >&6; }
 config_vars="$config_vars
 config-cflags-signaling-nans = $libc_cv_cc_signaling_nans"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option -frounding-math" >&5
+$as_echo_n "checking for compiler option -frounding-math... " >&6; }
+if ${libc_cv_cc_rounding_math+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -frounding-math -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_rounding_math=-frounding-math
+else
+  libc_cv_cc_rounding_math=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_rounding_math" >&5
+$as_echo "$libc_cv_cc_rounding_math" >&6; }
+config_vars="$config_vars
+config-cflags-frounding-math = $libc_cv_cc_rounding_math"
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-tree-loop-distribute-patterns with \
 __attribute__ ((__optimize__))" >&5
 $as_echo_n "checking if $CC accepts -fno-tree-loop-distribute-patterns with \
diff --git a/configure.ac b/configure.ac
index cf50761b3d..7a8412f86b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1535,6 +1535,15 @@ LIBC_TRY_CC_OPTION([-Werror -fsignaling-nans],
 LIBC_CONFIG_VAR([config-cflags-signaling-nans],
 		[$libc_cv_cc_signaling_nans])
 
+dnl Determina if compiler support -frounding-math
+AC_CACHE_CHECK([for compiler option -frounding-math], libc_cv_cc_rounding_math, [dnl
+LIBC_TRY_CC_OPTION([-Werror -frounding-math],
+		   [libc_cv_cc_rounding_math=-frounding-math],
+		   [libc_cv_cc_rounding_math=])
+])
+LIBC_CONFIG_VAR([config-cflags-frounding-math],
+	       	[$libc_cv_cc_rounding_math])
+
 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


^ permalink raw reply	[flat|nested] 20+ messages in thread
* [glibc/azanella/clang] Use -frounding-math iff compiler supports it
@ 2022-05-12 19:34 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2022-05-12 19:34 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=384b36a48d5ae2816ebfd011866a01d54a93e7b8

commit 384b36a48d5ae2816ebfd011866a01d54a93e7b8
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Mar 15 16:01:29 2022 -0300

    Use -frounding-math iff compiler supports it

Diff:
---
 Makeconfig   |  2 +-
 configure    | 22 ++++++++++++++++++++++
 configure.ac |  9 +++++++++
 3 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/Makeconfig b/Makeconfig
index b5aa07c4f4..ee39dc5711 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -846,7 +846,7 @@ endif
 # We have to assume that glibc functions are called in any rounding
 # mode and also change the rounding mode in a few functions. So,
 # disable any optimization that assume default rounding mode.
-+math-flags = -frounding-math
++math-flags = $(config-cflags-frounding-math)
 
 # Logically only "libnldbl", "nonlib" and "testsuite" should be using
 # -fno-math-errno. However due to GCC bug #88576, only "libm" can use
diff --git a/configure b/configure
index 4738e16b9b..ef97002749 100755
--- a/configure
+++ b/configure
@@ -6491,6 +6491,28 @@ $as_echo "$libc_cv_cc_signaling_nans" >&6; }
 config_vars="$config_vars
 config-cflags-signaling-nans = $libc_cv_cc_signaling_nans"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option -frounding-math" >&5
+$as_echo_n "checking for compiler option -frounding-math... " >&6; }
+if ${libc_cv_cc_rounding_math+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -frounding-math -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_rounding_math=-frounding-math
+else
+  libc_cv_cc_rounding_math=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_rounding_math" >&5
+$as_echo "$libc_cv_cc_rounding_math" >&6; }
+config_vars="$config_vars
+config-cflags-frounding-math = $libc_cv_cc_rounding_math"
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-tree-loop-distribute-patterns with \
 __attribute__ ((__optimize__))" >&5
 $as_echo_n "checking if $CC accepts -fno-tree-loop-distribute-patterns with \
diff --git a/configure.ac b/configure.ac
index cf50761b3d..7a8412f86b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1535,6 +1535,15 @@ LIBC_TRY_CC_OPTION([-Werror -fsignaling-nans],
 LIBC_CONFIG_VAR([config-cflags-signaling-nans],
 		[$libc_cv_cc_signaling_nans])
 
+dnl Determina if compiler support -frounding-math
+AC_CACHE_CHECK([for compiler option -frounding-math], libc_cv_cc_rounding_math, [dnl
+LIBC_TRY_CC_OPTION([-Werror -frounding-math],
+		   [libc_cv_cc_rounding_math=-frounding-math],
+		   [libc_cv_cc_rounding_math=])
+])
+LIBC_CONFIG_VAR([config-cflags-frounding-math],
+	       	[$libc_cv_cc_rounding_math])
+
 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


^ permalink raw reply	[flat|nested] 20+ messages in thread
* [glibc/azanella/clang] Use -frounding-math iff compiler supports it
@ 2022-05-10 18:24 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2022-05-10 18:24 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=003981584b9c1c8367829fe855e3ec80c9d1f7d9

commit 003981584b9c1c8367829fe855e3ec80c9d1f7d9
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Mar 15 16:01:29 2022 -0300

    Use -frounding-math iff compiler supports it

Diff:
---
 Makeconfig   |  2 +-
 configure    | 22 ++++++++++++++++++++++
 configure.ac |  9 +++++++++
 3 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/Makeconfig b/Makeconfig
index 760f14e92f..626ad5524e 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -846,7 +846,7 @@ endif
 # We have to assume that glibc functions are called in any rounding
 # mode and also change the rounding mode in a few functions. So,
 # disable any optimization that assume default rounding mode.
-+math-flags = -frounding-math
++math-flags = $(config-cflags-frounding-math)
 
 # Logically only "libnldbl", "nonlib" and "testsuite" should be using
 # -fno-math-errno. However due to GCC bug #88576, only "libm" can use
diff --git a/configure b/configure
index 4738e16b9b..ef97002749 100755
--- a/configure
+++ b/configure
@@ -6491,6 +6491,28 @@ $as_echo "$libc_cv_cc_signaling_nans" >&6; }
 config_vars="$config_vars
 config-cflags-signaling-nans = $libc_cv_cc_signaling_nans"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option -frounding-math" >&5
+$as_echo_n "checking for compiler option -frounding-math... " >&6; }
+if ${libc_cv_cc_rounding_math+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -frounding-math -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_rounding_math=-frounding-math
+else
+  libc_cv_cc_rounding_math=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_rounding_math" >&5
+$as_echo "$libc_cv_cc_rounding_math" >&6; }
+config_vars="$config_vars
+config-cflags-frounding-math = $libc_cv_cc_rounding_math"
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-tree-loop-distribute-patterns with \
 __attribute__ ((__optimize__))" >&5
 $as_echo_n "checking if $CC accepts -fno-tree-loop-distribute-patterns with \
diff --git a/configure.ac b/configure.ac
index cf50761b3d..7a8412f86b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1535,6 +1535,15 @@ LIBC_TRY_CC_OPTION([-Werror -fsignaling-nans],
 LIBC_CONFIG_VAR([config-cflags-signaling-nans],
 		[$libc_cv_cc_signaling_nans])
 
+dnl Determina if compiler support -frounding-math
+AC_CACHE_CHECK([for compiler option -frounding-math], libc_cv_cc_rounding_math, [dnl
+LIBC_TRY_CC_OPTION([-Werror -frounding-math],
+		   [libc_cv_cc_rounding_math=-frounding-math],
+		   [libc_cv_cc_rounding_math=])
+])
+LIBC_CONFIG_VAR([config-cflags-frounding-math],
+	       	[$libc_cv_cc_rounding_math])
+
 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


^ permalink raw reply	[flat|nested] 20+ messages in thread
* [glibc/azanella/clang] Use -frounding-math iff compiler supports it
@ 2022-04-29 14:04 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2022-04-29 14:04 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=55f2b2ddb3a3a3adf3d5b819e8e657a0583e0b3a

commit 55f2b2ddb3a3a3adf3d5b819e8e657a0583e0b3a
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Mar 15 16:01:29 2022 -0300

    Use -frounding-math iff compiler supports it

Diff:
---
 Makeconfig   |  2 +-
 configure    | 22 ++++++++++++++++++++++
 configure.ac |  9 +++++++++
 3 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/Makeconfig b/Makeconfig
index 0aa5fb0099..df0e2c699a 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -855,7 +855,7 @@ endif
 # We have to assume that glibc functions are called in any rounding
 # mode and also change the rounding mode in a few functions. So,
 # disable any optimization that assume default rounding mode.
-+math-flags = -frounding-math
++math-flags = $(config-cflags-frounding-math)
 
 # Logically only "libnldbl", "nonlib" and "testsuite" should be using
 # -fno-math-errno. However due to GCC bug #88576, only "libm" can use
diff --git a/configure b/configure
index 8a179abb73..f20cf831b0 100755
--- a/configure
+++ b/configure
@@ -6519,6 +6519,28 @@ $as_echo "$libc_cv_cc_signaling_nans" >&6; }
 config_vars="$config_vars
 config-cflags-signaling-nans = $libc_cv_cc_signaling_nans"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option -frounding-math" >&5
+$as_echo_n "checking for compiler option -frounding-math... " >&6; }
+if ${libc_cv_cc_rounding_math+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -frounding-math -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_rounding_math=-frounding-math
+else
+  libc_cv_cc_rounding_math=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_rounding_math" >&5
+$as_echo "$libc_cv_cc_rounding_math" >&6; }
+config_vars="$config_vars
+config-cflags-frounding-math = $libc_cv_cc_rounding_math"
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-tree-loop-distribute-patterns with \
 __attribute__ ((__optimize__))" >&5
 $as_echo_n "checking if $CC accepts -fno-tree-loop-distribute-patterns with \
diff --git a/configure.ac b/configure.ac
index c9d1b2a883..83fa6618e1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1551,6 +1551,15 @@ LIBC_TRY_CC_OPTION([-Werror -fsignaling-nans],
 LIBC_CONFIG_VAR([config-cflags-signaling-nans],
 		[$libc_cv_cc_signaling_nans])
 
+dnl Determina if compiler support -frounding-math
+AC_CACHE_CHECK([for compiler option -frounding-math], libc_cv_cc_rounding_math, [dnl
+LIBC_TRY_CC_OPTION([-Werror -frounding-math],
+		   [libc_cv_cc_rounding_math=-frounding-math],
+		   [libc_cv_cc_rounding_math=])
+])
+LIBC_CONFIG_VAR([config-cflags-frounding-math],
+	       	[$libc_cv_cc_rounding_math])
+
 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


^ permalink raw reply	[flat|nested] 20+ messages in thread
* [glibc/azanella/clang] Use -frounding-math iff compiler supports it
@ 2022-03-31 19:07 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2022-03-31 19:07 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7e4fea64e3fa2e021a53c1fb8482e384434f742c

commit 7e4fea64e3fa2e021a53c1fb8482e384434f742c
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Mar 15 16:01:29 2022 -0300

    Use -frounding-math iff compiler supports it

Diff:
---
 Makeconfig   |  2 +-
 configure    | 22 ++++++++++++++++++++++
 configure.ac |  9 +++++++++
 3 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/Makeconfig b/Makeconfig
index 47db08d6ae..c0cf1e2890 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -861,7 +861,7 @@ endif
 # We have to assume that glibc functions are called in any rounding
 # mode and also change the rounding mode in a few functions. So,
 # disable any optimization that assume default rounding mode.
-+math-flags = -frounding-math
++math-flags = $(config-cflags-frounding-math)
 
 # Logically only "libnldbl", "nonlib" and "testsuite" should be using
 # -fno-math-errno. However due to GCC bug #88576, only "libm" can use
diff --git a/configure b/configure
index 3e59f2511f..225c085c87 100755
--- a/configure
+++ b/configure
@@ -6646,6 +6646,28 @@ $as_echo "$libc_cv_cc_signaling_nans" >&6; }
 config_vars="$config_vars
 config-cflags-signaling-nans = $libc_cv_cc_signaling_nans"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option -frounding-math" >&5
+$as_echo_n "checking for compiler option -frounding-math... " >&6; }
+if ${libc_cv_cc_rounding_math+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -frounding-math -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_rounding_math=-frounding-math
+else
+  libc_cv_cc_rounding_math=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_rounding_math" >&5
+$as_echo "$libc_cv_cc_rounding_math" >&6; }
+config_vars="$config_vars
+config-cflags-frounding-math = $libc_cv_cc_rounding_math"
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-tree-loop-distribute-patterns with \
 __attribute__ ((__optimize__))" >&5
 $as_echo_n "checking if $CC accepts -fno-tree-loop-distribute-patterns with \
diff --git a/configure.ac b/configure.ac
index 3800b740f0..d6a4b93529 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1667,6 +1667,15 @@ LIBC_TRY_CC_OPTION([-Werror -fsignaling-nans],
 LIBC_CONFIG_VAR([config-cflags-signaling-nans],
 		[$libc_cv_cc_signaling_nans])
 
+dnl Determina if compiler support -frounding-math
+AC_CACHE_CHECK([for compiler option -frounding-math], libc_cv_cc_rounding_math, [dnl
+LIBC_TRY_CC_OPTION([-Werror -frounding-math],
+		   [libc_cv_cc_rounding_math=-frounding-math],
+		   [libc_cv_cc_rounding_math=])
+])
+LIBC_CONFIG_VAR([config-cflags-frounding-math],
+	       	[$libc_cv_cc_rounding_math])
+
 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


^ permalink raw reply	[flat|nested] 20+ messages in thread
* [glibc/azanella/clang] Use -frounding-math iff compiler supports it
@ 2022-03-29 20:30 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2022-03-29 20:30 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=35a53e6977c6cd85f86bb55a30ba1cc7b168413e

commit 35a53e6977c6cd85f86bb55a30ba1cc7b168413e
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Mar 15 16:01:29 2022 -0300

    Use -frounding-math iff compiler supports it

Diff:
---
 Makeconfig   |  2 +-
 configure    | 22 ++++++++++++++++++++++
 configure.ac |  9 +++++++++
 3 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/Makeconfig b/Makeconfig
index 47db08d6ae..c0cf1e2890 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -861,7 +861,7 @@ endif
 # We have to assume that glibc functions are called in any rounding
 # mode and also change the rounding mode in a few functions. So,
 # disable any optimization that assume default rounding mode.
-+math-flags = -frounding-math
++math-flags = $(config-cflags-frounding-math)
 
 # Logically only "libnldbl", "nonlib" and "testsuite" should be using
 # -fno-math-errno. However due to GCC bug #88576, only "libm" can use
diff --git a/configure b/configure
index 3e59f2511f..225c085c87 100755
--- a/configure
+++ b/configure
@@ -6646,6 +6646,28 @@ $as_echo "$libc_cv_cc_signaling_nans" >&6; }
 config_vars="$config_vars
 config-cflags-signaling-nans = $libc_cv_cc_signaling_nans"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option -frounding-math" >&5
+$as_echo_n "checking for compiler option -frounding-math... " >&6; }
+if ${libc_cv_cc_rounding_math+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -frounding-math -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_rounding_math=-frounding-math
+else
+  libc_cv_cc_rounding_math=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_rounding_math" >&5
+$as_echo "$libc_cv_cc_rounding_math" >&6; }
+config_vars="$config_vars
+config-cflags-frounding-math = $libc_cv_cc_rounding_math"
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-tree-loop-distribute-patterns with \
 __attribute__ ((__optimize__))" >&5
 $as_echo_n "checking if $CC accepts -fno-tree-loop-distribute-patterns with \
diff --git a/configure.ac b/configure.ac
index 3800b740f0..d6a4b93529 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1667,6 +1667,15 @@ LIBC_TRY_CC_OPTION([-Werror -fsignaling-nans],
 LIBC_CONFIG_VAR([config-cflags-signaling-nans],
 		[$libc_cv_cc_signaling_nans])
 
+dnl Determina if compiler support -frounding-math
+AC_CACHE_CHECK([for compiler option -frounding-math], libc_cv_cc_rounding_math, [dnl
+LIBC_TRY_CC_OPTION([-Werror -frounding-math],
+		   [libc_cv_cc_rounding_math=-frounding-math],
+		   [libc_cv_cc_rounding_math=])
+])
+LIBC_CONFIG_VAR([config-cflags-frounding-math],
+	       	[$libc_cv_cc_rounding_math])
+
 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


^ permalink raw reply	[flat|nested] 20+ messages in thread
* [glibc/azanella/clang] Use -frounding-math iff compiler supports it
@ 2022-03-16 18:04 Adhemerval Zanella
  0 siblings, 0 replies; 20+ messages in thread
From: Adhemerval Zanella @ 2022-03-16 18:04 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=bba43a7040c4f1604281c9d9fd56e860c296a57b

commit bba43a7040c4f1604281c9d9fd56e860c296a57b
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Mar 15 16:01:29 2022 -0300

    Use -frounding-math iff compiler supports it

Diff:
---
 Makeconfig   |  2 +-
 configure    | 22 ++++++++++++++++++++++
 configure.ac |  9 +++++++++
 3 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/Makeconfig b/Makeconfig
index 47db08d6ae..c0cf1e2890 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -861,7 +861,7 @@ endif
 # We have to assume that glibc functions are called in any rounding
 # mode and also change the rounding mode in a few functions. So,
 # disable any optimization that assume default rounding mode.
-+math-flags = -frounding-math
++math-flags = $(config-cflags-frounding-math)
 
 # Logically only "libnldbl", "nonlib" and "testsuite" should be using
 # -fno-math-errno. However due to GCC bug #88576, only "libm" can use
diff --git a/configure b/configure
index d891044cef..dd764161e1 100755
--- a/configure
+++ b/configure
@@ -6646,6 +6646,28 @@ fi
 $as_echo "$libc_cv_cc_signaling_nans" >&6; }
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option -frounding-math" >&5
+$as_echo_n "checking for compiler option -frounding-math... " >&6; }
+if ${libc_cv_cc_rounding_math+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -frounding-math -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_rounding_math=-frounding-math
+else
+  libc_cv_cc_rounding_math=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_rounding_math" >&5
+$as_echo "$libc_cv_cc_rounding_math" >&6; }
+config_vars="$config_vars
+config-cflags-frounding-math = $libc_cv_cc_rounding_math"
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-tree-loop-distribute-patterns with \
 __attribute__ ((__optimize__))" >&5
 $as_echo_n "checking if $CC accepts -fno-tree-loop-distribute-patterns with \
diff --git a/configure.ac b/configure.ac
index 64fbbce11f..ee92ee42b4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1666,6 +1666,15 @@ LIBC_TRY_CC_OPTION([-Werror -fsignaling-nans],
 ])
 AC_SUBST(libc_cv_cc_signaling_nans)
 
+dnl Determina if compiler support -frounding-math
+AC_CACHE_CHECK([for compiler option -frounding-math], libc_cv_cc_rounding_math, [dnl
+LIBC_TRY_CC_OPTION([-Werror -frounding-math],
+		   [libc_cv_cc_rounding_math=-frounding-math],
+		   [libc_cv_cc_rounding_math=])
+])
+LIBC_CONFIG_VAR([config-cflags-frounding-math],
+	       	[$libc_cv_cc_rounding_math])
+
 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


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2024-02-09 17:31 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-04 12:55 [glibc/azanella/clang] Use -frounding-math iff compiler supports it Adhemerval Zanella
  -- strict thread matches above, loose matches on Subject: below --
2024-02-09 17:31 Adhemerval Zanella
2024-02-07 14:06 Adhemerval Zanella
2024-01-29 17:56 Adhemerval Zanella
2023-12-21 18:53 Adhemerval Zanella
2023-09-28 17:51 Adhemerval Zanella
2023-08-30 12:36 Adhemerval Zanella
2023-02-09 19:48 Adhemerval Zanella
2022-10-28 17:41 Adhemerval Zanella
2022-10-04 12:59 Adhemerval Zanella
2022-06-09 21:21 Adhemerval Zanella
2022-06-09 13:17 Adhemerval Zanella
2022-06-03 14:06 Adhemerval Zanella
2022-05-13 14:20 Adhemerval Zanella
2022-05-12 19:34 Adhemerval Zanella
2022-05-10 18:24 Adhemerval Zanella
2022-04-29 14:04 Adhemerval Zanella
2022-03-31 19:07 Adhemerval Zanella
2022-03-29 20:30 Adhemerval Zanella
2022-03-16 18:04 Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).