public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/clang] Use -ffloat-store iff compiler supports it
@ 2022-10-28 17:43 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2022-10-28 17:43 UTC (permalink / raw)
  To: glibc-cvs

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

commit 836d5e053849ce9566fedc1a9c3807db25fdd5e9
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 13:12:43 2022 -0300

    Use -ffloat-store iff compiler supports it

Diff:
---
 configure     | 22 ++++++++++++++++++++++
 configure.ac  | 10 ++++++++++
 math/Makefile |  4 ++--
 3 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 03fceee905..4a02e5de12 100755
--- a/configure
+++ b/configure
@@ -6467,6 +6467,28 @@ $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 for compiler option that -ffloat-store" >&5
+$as_echo_n "checking for compiler option that -ffloat-store... " >&6; }
+if ${libc_cv_cc_float_store+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -ffloat-store -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_float_store=-ffloat-store
+else
+  libc_cv_cc_float_store=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_float_store" >&5
+$as_echo "$libc_cv_cc_float_store" >&6; }
+config_vars="$config_vars
+config-cflags-float-store = $libc_cv_cc_float_store"
+
 { $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 410ff604c2..a078b28914 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1561,6 +1561,16 @@ LIBC_TRY_CC_OPTION([-Werror -frounding-math],
 LIBC_CONFIG_VAR([config-cflags-frounding-math],
 	       	[$libc_cv_cc_rounding_math])
 
+dnl Determine if compiler supports -ffloat-store
+AC_CACHE_CHECK([for compiler option that -ffloat-store],
+	       libc_cv_cc_float_store, [dnl
+LIBC_TRY_CC_OPTION([-Werror -ffloat-store],
+		   [libc_cv_cc_float_store=-ffloat-store],
+		   [libc_cv_cc_float_store=])
+])
+LIBC_CONFIG_VAR([config-cflags-float-store],
+		[$libc_cv_cc_float_store])
+
 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
diff --git a/math/Makefile b/math/Makefile
index c6621dadf8..0cf60e4df6 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -407,7 +407,7 @@ $(objpfx)test-tgmath3-macro-list.out: gen-tgmath-tests.py
 
 libm-test-fast-math-cflags = -fno-builtin -D__FAST_MATH__ -DTEST_FAST_MATH
 libm-test-vec-cflags = $(libm-test-fast-math-cflags) -fno-inline \
-		       -ffloat-store -D_OPENMP=201307 -Wno-unknown-pragmas
+		       $(libc_cv_cc_float_store) -D_OPENMP=201307 -Wno-unknown-pragmas
 
 CFLAGS-test-double-vlen4-wrappers.c += $(double-vlen4-arch-ext-cflags)
 
@@ -423,7 +423,7 @@ CFLAGS-test-float-vlen16-wrappers.c += $(float-vlen16-arch-ext-cflags)
 # raise spurious exceptions for sNaNs, but also do not test for
 # exceptions.  Thus both versions of the classification macros are
 # validated.
-libm-test-no-inline-cflags = -fno-inline -ffloat-store -fno-builtin \
+libm-test-no-inline-cflags = -fno-inline $(libc_cv_cc_float_store) -fno-builtin \
 			     $(config-cflags-signaling-nans)
 CFLAGS-test-tgmath.c += -fno-builtin
 # The following testcase uses very long lines (>3 million), so it may take a

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

* [glibc/azanella/clang] Use -ffloat-store iff compiler supports it
@ 2024-04-17 20:08 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2024-04-17 20:08 UTC (permalink / raw)
  To: glibc-cvs

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

commit 0062fcb8bab9fcaddf129bedb0c4f06b1670ad34
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 13:12:43 2022 -0300

    Use -ffloat-store iff compiler supports it

Diff:
---
 configure     | 24 ++++++++++++++++++++++++
 configure.ac  | 10 ++++++++++
 math/Makefile |  4 ++--
 3 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 56120b2f93..f907145b24 100755
--- a/configure
+++ b/configure
@@ -7368,6 +7368,30 @@ 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 for compiler option that -ffloat-store" >&5
+printf %s "checking for compiler option that -ffloat-store... " >&6; }
+if test ${libc_cv_cc_float_store+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if { ac_try='${CC-cc} -Werror -ffloat-store -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_float_store=-ffloat-store
+else $as_nop
+  libc_cv_cc_float_store=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_float_store" >&5
+printf "%s\n" "$libc_cv_cc_float_store" >&6; }
+config_vars="$config_vars
+config-cflags-float-store = $libc_cv_cc_float_store"
+
 { 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 4007e207e8..ff3f62c063 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1481,6 +1481,16 @@ LIBC_TRY_CC_OPTION([-Werror -frounding-math],
 LIBC_CONFIG_VAR([config-cflags-frounding-math],
 		[$libc_cv_cc_rounding_math])
 
+dnl Determine if compiler supports -ffloat-store
+AC_CACHE_CHECK([for compiler option that -ffloat-store],
+	       libc_cv_cc_float_store, [dnl
+LIBC_TRY_CC_OPTION([-Werror -ffloat-store],
+		   [libc_cv_cc_float_store=-ffloat-store],
+		   [libc_cv_cc_float_store=])
+])
+LIBC_CONFIG_VAR([config-cflags-float-store],
+		[$libc_cv_cc_float_store])
+
 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
diff --git a/math/Makefile b/math/Makefile
index 192c4fb820..da5d041d6c 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -936,7 +936,7 @@ $(objpfx)test-tgmath3-macro-list.out: gen-tgmath-tests.py
 
 libm-test-fast-math-cflags = -fno-builtin -D__FAST_MATH__ -DTEST_FAST_MATH
 libm-test-vec-cflags = $(libm-test-fast-math-cflags) -fno-inline \
-		       -ffloat-store -D_OPENMP=201307 -Wno-unknown-pragmas
+		       $(libc_cv_cc_float_store) -D_OPENMP=201307 -Wno-unknown-pragmas
 
 CFLAGS-test-double-vlen4-wrappers.c += $(double-vlen4-arch-ext-cflags)
 
@@ -952,7 +952,7 @@ CFLAGS-test-float-vlen16-wrappers.c += $(float-vlen16-arch-ext-cflags)
 # raise spurious exceptions for sNaNs, but also do not test for
 # exceptions.  Thus both versions of the classification macros are
 # validated.
-libm-test-no-inline-cflags = -fno-inline -ffloat-store -fno-builtin \
+libm-test-no-inline-cflags = -fno-inline $(libc_cv_cc_float_store) -fno-builtin \
 			     $(config-cflags-signaling-nans)
 CFLAGS-test-tgmath.c += -fno-builtin
 # The following testcase uses very long lines (>3 million), so it may take a

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

* [glibc/azanella/clang] Use -ffloat-store iff compiler supports it
@ 2024-04-02 15:55 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2024-04-02 15:55 UTC (permalink / raw)
  To: glibc-cvs

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

commit 58770961fd1649afb019065eeadce81d8b835d2e
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 13:12:43 2022 -0300

    Use -ffloat-store iff compiler supports it

Diff:
---
 configure     | 24 ++++++++++++++++++++++++
 configure.ac  | 10 ++++++++++
 math/Makefile |  4 ++--
 3 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 56120b2f93..f907145b24 100755
--- a/configure
+++ b/configure
@@ -7368,6 +7368,30 @@ 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 for compiler option that -ffloat-store" >&5
+printf %s "checking for compiler option that -ffloat-store... " >&6; }
+if test ${libc_cv_cc_float_store+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if { ac_try='${CC-cc} -Werror -ffloat-store -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_float_store=-ffloat-store
+else $as_nop
+  libc_cv_cc_float_store=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_float_store" >&5
+printf "%s\n" "$libc_cv_cc_float_store" >&6; }
+config_vars="$config_vars
+config-cflags-float-store = $libc_cv_cc_float_store"
+
 { 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 4007e207e8..ff3f62c063 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1481,6 +1481,16 @@ LIBC_TRY_CC_OPTION([-Werror -frounding-math],
 LIBC_CONFIG_VAR([config-cflags-frounding-math],
 		[$libc_cv_cc_rounding_math])
 
+dnl Determine if compiler supports -ffloat-store
+AC_CACHE_CHECK([for compiler option that -ffloat-store],
+	       libc_cv_cc_float_store, [dnl
+LIBC_TRY_CC_OPTION([-Werror -ffloat-store],
+		   [libc_cv_cc_float_store=-ffloat-store],
+		   [libc_cv_cc_float_store=])
+])
+LIBC_CONFIG_VAR([config-cflags-float-store],
+		[$libc_cv_cc_float_store])
+
 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
diff --git a/math/Makefile b/math/Makefile
index 650a6d111c..3c7f1dd3b7 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -407,7 +407,7 @@ $(objpfx)test-tgmath3-macro-list.out: gen-tgmath-tests.py
 
 libm-test-fast-math-cflags = -fno-builtin -D__FAST_MATH__ -DTEST_FAST_MATH
 libm-test-vec-cflags = $(libm-test-fast-math-cflags) -fno-inline \
-		       -ffloat-store -D_OPENMP=201307 -Wno-unknown-pragmas
+		       $(libc_cv_cc_float_store) -D_OPENMP=201307 -Wno-unknown-pragmas
 
 CFLAGS-test-double-vlen4-wrappers.c += $(double-vlen4-arch-ext-cflags)
 
@@ -423,7 +423,7 @@ CFLAGS-test-float-vlen16-wrappers.c += $(float-vlen16-arch-ext-cflags)
 # raise spurious exceptions for sNaNs, but also do not test for
 # exceptions.  Thus both versions of the classification macros are
 # validated.
-libm-test-no-inline-cflags = -fno-inline -ffloat-store -fno-builtin \
+libm-test-no-inline-cflags = -fno-inline $(libc_cv_cc_float_store) -fno-builtin \
 			     $(config-cflags-signaling-nans)
 CFLAGS-test-tgmath.c += -fno-builtin
 # The following testcase uses very long lines (>3 million), so it may take a

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

* [glibc/azanella/clang] Use -ffloat-store iff compiler supports it
@ 2024-02-09 17:33 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2024-02-09 17:33 UTC (permalink / raw)
  To: glibc-cvs

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

commit 787f2da8f82cc0b82a046ca7d2cecb82c9633e5f
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 13:12:43 2022 -0300

    Use -ffloat-store iff compiler supports it

Diff:
---
 configure     | 24 ++++++++++++++++++++++++
 configure.ac  | 10 ++++++++++
 math/Makefile |  4 ++--
 3 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 3256638e43..649270d302 100755
--- a/configure
+++ b/configure
@@ -7365,6 +7365,30 @@ 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 for compiler option that -ffloat-store" >&5
+printf %s "checking for compiler option that -ffloat-store... " >&6; }
+if test ${libc_cv_cc_float_store+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if { ac_try='${CC-cc} -Werror -ffloat-store -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_float_store=-ffloat-store
+else $as_nop
+  libc_cv_cc_float_store=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_float_store" >&5
+printf "%s\n" "$libc_cv_cc_float_store" >&6; }
+config_vars="$config_vars
+config-cflags-float-store = $libc_cv_cc_float_store"
+
 { 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 704e4c259f..1f9d8b6e5e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1478,6 +1478,16 @@ LIBC_TRY_CC_OPTION([-Werror -frounding-math],
 LIBC_CONFIG_VAR([config-cflags-frounding-math],
 		[$libc_cv_cc_rounding_math])
 
+dnl Determine if compiler supports -ffloat-store
+AC_CACHE_CHECK([for compiler option that -ffloat-store],
+	       libc_cv_cc_float_store, [dnl
+LIBC_TRY_CC_OPTION([-Werror -ffloat-store],
+		   [libc_cv_cc_float_store=-ffloat-store],
+		   [libc_cv_cc_float_store=])
+])
+LIBC_CONFIG_VAR([config-cflags-float-store],
+		[$libc_cv_cc_float_store])
+
 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
diff --git a/math/Makefile b/math/Makefile
index d7ea591455..7ce4f877bc 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -407,7 +407,7 @@ $(objpfx)test-tgmath3-macro-list.out: gen-tgmath-tests.py
 
 libm-test-fast-math-cflags = -fno-builtin -D__FAST_MATH__ -DTEST_FAST_MATH
 libm-test-vec-cflags = $(libm-test-fast-math-cflags) -fno-inline \
-		       -ffloat-store -D_OPENMP=201307 -Wno-unknown-pragmas
+		       $(libc_cv_cc_float_store) -D_OPENMP=201307 -Wno-unknown-pragmas
 
 CFLAGS-test-double-vlen4-wrappers.c += $(double-vlen4-arch-ext-cflags)
 
@@ -423,7 +423,7 @@ CFLAGS-test-float-vlen16-wrappers.c += $(float-vlen16-arch-ext-cflags)
 # raise spurious exceptions for sNaNs, but also do not test for
 # exceptions.  Thus both versions of the classification macros are
 # validated.
-libm-test-no-inline-cflags = -fno-inline -ffloat-store -fno-builtin \
+libm-test-no-inline-cflags = -fno-inline $(libc_cv_cc_float_store) -fno-builtin \
 			     $(config-cflags-signaling-nans)
 CFLAGS-test-tgmath.c += -fno-builtin
 # The following testcase uses very long lines (>3 million), so it may take a

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

* [glibc/azanella/clang] Use -ffloat-store iff compiler supports it
@ 2024-02-07 14:08 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2024-02-07 14:08 UTC (permalink / raw)
  To: glibc-cvs

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

commit 15b401eef94a104c56d49b2281677693a1665a87
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 13:12:43 2022 -0300

    Use -ffloat-store iff compiler supports it

Diff:
---
 configure     | 24 ++++++++++++++++++++++++
 configure.ac  | 10 ++++++++++
 math/Makefile |  4 ++--
 3 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 3256638e43..649270d302 100755
--- a/configure
+++ b/configure
@@ -7365,6 +7365,30 @@ 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 for compiler option that -ffloat-store" >&5
+printf %s "checking for compiler option that -ffloat-store... " >&6; }
+if test ${libc_cv_cc_float_store+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if { ac_try='${CC-cc} -Werror -ffloat-store -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_float_store=-ffloat-store
+else $as_nop
+  libc_cv_cc_float_store=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_float_store" >&5
+printf "%s\n" "$libc_cv_cc_float_store" >&6; }
+config_vars="$config_vars
+config-cflags-float-store = $libc_cv_cc_float_store"
+
 { 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 704e4c259f..1f9d8b6e5e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1478,6 +1478,16 @@ LIBC_TRY_CC_OPTION([-Werror -frounding-math],
 LIBC_CONFIG_VAR([config-cflags-frounding-math],
 		[$libc_cv_cc_rounding_math])
 
+dnl Determine if compiler supports -ffloat-store
+AC_CACHE_CHECK([for compiler option that -ffloat-store],
+	       libc_cv_cc_float_store, [dnl
+LIBC_TRY_CC_OPTION([-Werror -ffloat-store],
+		   [libc_cv_cc_float_store=-ffloat-store],
+		   [libc_cv_cc_float_store=])
+])
+LIBC_CONFIG_VAR([config-cflags-float-store],
+		[$libc_cv_cc_float_store])
+
 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
diff --git a/math/Makefile b/math/Makefile
index d7ea591455..7ce4f877bc 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -407,7 +407,7 @@ $(objpfx)test-tgmath3-macro-list.out: gen-tgmath-tests.py
 
 libm-test-fast-math-cflags = -fno-builtin -D__FAST_MATH__ -DTEST_FAST_MATH
 libm-test-vec-cflags = $(libm-test-fast-math-cflags) -fno-inline \
-		       -ffloat-store -D_OPENMP=201307 -Wno-unknown-pragmas
+		       $(libc_cv_cc_float_store) -D_OPENMP=201307 -Wno-unknown-pragmas
 
 CFLAGS-test-double-vlen4-wrappers.c += $(double-vlen4-arch-ext-cflags)
 
@@ -423,7 +423,7 @@ CFLAGS-test-float-vlen16-wrappers.c += $(float-vlen16-arch-ext-cflags)
 # raise spurious exceptions for sNaNs, but also do not test for
 # exceptions.  Thus both versions of the classification macros are
 # validated.
-libm-test-no-inline-cflags = -fno-inline -ffloat-store -fno-builtin \
+libm-test-no-inline-cflags = -fno-inline $(libc_cv_cc_float_store) -fno-builtin \
 			     $(config-cflags-signaling-nans)
 CFLAGS-test-tgmath.c += -fno-builtin
 # The following testcase uses very long lines (>3 million), so it may take a

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

* [glibc/azanella/clang] Use -ffloat-store iff compiler supports it
@ 2024-01-29 17:58 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2024-01-29 17:58 UTC (permalink / raw)
  To: glibc-cvs

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

commit 51c1f8d00fc84164c85f8dbe9335da2f425ac346
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 13:12:43 2022 -0300

    Use -ffloat-store iff compiler supports it

Diff:
---
 configure     | 24 ++++++++++++++++++++++++
 configure.ac  | 10 ++++++++++
 math/Makefile |  4 ++--
 3 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 3256638e43..649270d302 100755
--- a/configure
+++ b/configure
@@ -7365,6 +7365,30 @@ 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 for compiler option that -ffloat-store" >&5
+printf %s "checking for compiler option that -ffloat-store... " >&6; }
+if test ${libc_cv_cc_float_store+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if { ac_try='${CC-cc} -Werror -ffloat-store -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_float_store=-ffloat-store
+else $as_nop
+  libc_cv_cc_float_store=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_float_store" >&5
+printf "%s\n" "$libc_cv_cc_float_store" >&6; }
+config_vars="$config_vars
+config-cflags-float-store = $libc_cv_cc_float_store"
+
 { 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 704e4c259f..1f9d8b6e5e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1478,6 +1478,16 @@ LIBC_TRY_CC_OPTION([-Werror -frounding-math],
 LIBC_CONFIG_VAR([config-cflags-frounding-math],
 		[$libc_cv_cc_rounding_math])
 
+dnl Determine if compiler supports -ffloat-store
+AC_CACHE_CHECK([for compiler option that -ffloat-store],
+	       libc_cv_cc_float_store, [dnl
+LIBC_TRY_CC_OPTION([-Werror -ffloat-store],
+		   [libc_cv_cc_float_store=-ffloat-store],
+		   [libc_cv_cc_float_store=])
+])
+LIBC_CONFIG_VAR([config-cflags-float-store],
+		[$libc_cv_cc_float_store])
+
 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
diff --git a/math/Makefile b/math/Makefile
index d7ea591455..7ce4f877bc 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -407,7 +407,7 @@ $(objpfx)test-tgmath3-macro-list.out: gen-tgmath-tests.py
 
 libm-test-fast-math-cflags = -fno-builtin -D__FAST_MATH__ -DTEST_FAST_MATH
 libm-test-vec-cflags = $(libm-test-fast-math-cflags) -fno-inline \
-		       -ffloat-store -D_OPENMP=201307 -Wno-unknown-pragmas
+		       $(libc_cv_cc_float_store) -D_OPENMP=201307 -Wno-unknown-pragmas
 
 CFLAGS-test-double-vlen4-wrappers.c += $(double-vlen4-arch-ext-cflags)
 
@@ -423,7 +423,7 @@ CFLAGS-test-float-vlen16-wrappers.c += $(float-vlen16-arch-ext-cflags)
 # raise spurious exceptions for sNaNs, but also do not test for
 # exceptions.  Thus both versions of the classification macros are
 # validated.
-libm-test-no-inline-cflags = -fno-inline -ffloat-store -fno-builtin \
+libm-test-no-inline-cflags = -fno-inline $(libc_cv_cc_float_store) -fno-builtin \
 			     $(config-cflags-signaling-nans)
 CFLAGS-test-tgmath.c += -fno-builtin
 # The following testcase uses very long lines (>3 million), so it may take a

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

* [glibc/azanella/clang] Use -ffloat-store iff compiler supports it
@ 2023-12-21 18:55 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2023-12-21 18:55 UTC (permalink / raw)
  To: glibc-cvs

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

commit 1da9ccc888b092a6693870084188e1ce16fbbb61
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 13:12:43 2022 -0300

    Use -ffloat-store iff compiler supports it

Diff:
---
 configure     | 24 ++++++++++++++++++++++++
 configure.ac  | 10 ++++++++++
 math/Makefile |  4 ++--
 3 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 6330b1e0ab..a811663fe4 100755
--- a/configure
+++ b/configure
@@ -7364,6 +7364,30 @@ 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 for compiler option that -ffloat-store" >&5
+printf %s "checking for compiler option that -ffloat-store... " >&6; }
+if test ${libc_cv_cc_float_store+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if { ac_try='${CC-cc} -Werror -ffloat-store -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_float_store=-ffloat-store
+else $as_nop
+  libc_cv_cc_float_store=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_float_store" >&5
+printf "%s\n" "$libc_cv_cc_float_store" >&6; }
+config_vars="$config_vars
+config-cflags-float-store = $libc_cv_cc_float_store"
+
 { 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 704e4c259f..1f9d8b6e5e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1478,6 +1478,16 @@ LIBC_TRY_CC_OPTION([-Werror -frounding-math],
 LIBC_CONFIG_VAR([config-cflags-frounding-math],
 		[$libc_cv_cc_rounding_math])
 
+dnl Determine if compiler supports -ffloat-store
+AC_CACHE_CHECK([for compiler option that -ffloat-store],
+	       libc_cv_cc_float_store, [dnl
+LIBC_TRY_CC_OPTION([-Werror -ffloat-store],
+		   [libc_cv_cc_float_store=-ffloat-store],
+		   [libc_cv_cc_float_store=])
+])
+LIBC_CONFIG_VAR([config-cflags-float-store],
+		[$libc_cv_cc_float_store])
+
 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
diff --git a/math/Makefile b/math/Makefile
index 3e9701c0d1..85a9cb3026 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -407,7 +407,7 @@ $(objpfx)test-tgmath3-macro-list.out: gen-tgmath-tests.py
 
 libm-test-fast-math-cflags = -fno-builtin -D__FAST_MATH__ -DTEST_FAST_MATH
 libm-test-vec-cflags = $(libm-test-fast-math-cflags) -fno-inline \
-		       -ffloat-store -D_OPENMP=201307 -Wno-unknown-pragmas
+		       $(libc_cv_cc_float_store) -D_OPENMP=201307 -Wno-unknown-pragmas
 
 CFLAGS-test-double-vlen4-wrappers.c += $(double-vlen4-arch-ext-cflags)
 
@@ -423,7 +423,7 @@ CFLAGS-test-float-vlen16-wrappers.c += $(float-vlen16-arch-ext-cflags)
 # raise spurious exceptions for sNaNs, but also do not test for
 # exceptions.  Thus both versions of the classification macros are
 # validated.
-libm-test-no-inline-cflags = -fno-inline -ffloat-store -fno-builtin \
+libm-test-no-inline-cflags = -fno-inline $(libc_cv_cc_float_store) -fno-builtin \
 			     $(config-cflags-signaling-nans)
 CFLAGS-test-tgmath.c += -fno-builtin
 # The following testcase uses very long lines (>3 million), so it may take a

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

* [glibc/azanella/clang] Use -ffloat-store iff compiler supports it
@ 2023-09-28 17:53 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2023-09-28 17:53 UTC (permalink / raw)
  To: glibc-cvs

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

commit 8f5416d1a80cdb7901f8e793ae2933893518b4d8
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 13:12:43 2022 -0300

    Use -ffloat-store iff compiler supports it

Diff:
---
 configure     | 24 ++++++++++++++++++++++++
 configure.ac  | 10 ++++++++++
 math/Makefile |  4 ++--
 3 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 90c1f2ddaa..086eb8fda3 100755
--- a/configure
+++ b/configure
@@ -7490,6 +7490,30 @@ 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 for compiler option that -ffloat-store" >&5
+printf %s "checking for compiler option that -ffloat-store... " >&6; }
+if test ${libc_cv_cc_float_store+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if { ac_try='${CC-cc} -Werror -ffloat-store -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_float_store=-ffloat-store
+else $as_nop
+  libc_cv_cc_float_store=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_float_store" >&5
+printf "%s\n" "$libc_cv_cc_float_store" >&6; }
+config_vars="$config_vars
+config-cflags-float-store = $libc_cv_cc_float_store"
+
 { 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 edf7c21a20..1467704750 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1543,6 +1543,16 @@ LIBC_TRY_CC_OPTION([-Werror -frounding-math],
 LIBC_CONFIG_VAR([config-cflags-frounding-math],
 		[$libc_cv_cc_rounding_math])
 
+dnl Determine if compiler supports -ffloat-store
+AC_CACHE_CHECK([for compiler option that -ffloat-store],
+	       libc_cv_cc_float_store, [dnl
+LIBC_TRY_CC_OPTION([-Werror -ffloat-store],
+		   [libc_cv_cc_float_store=-ffloat-store],
+		   [libc_cv_cc_float_store=])
+])
+LIBC_CONFIG_VAR([config-cflags-float-store],
+		[$libc_cv_cc_float_store])
+
 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
diff --git a/math/Makefile b/math/Makefile
index 3e9701c0d1..85a9cb3026 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -407,7 +407,7 @@ $(objpfx)test-tgmath3-macro-list.out: gen-tgmath-tests.py
 
 libm-test-fast-math-cflags = -fno-builtin -D__FAST_MATH__ -DTEST_FAST_MATH
 libm-test-vec-cflags = $(libm-test-fast-math-cflags) -fno-inline \
-		       -ffloat-store -D_OPENMP=201307 -Wno-unknown-pragmas
+		       $(libc_cv_cc_float_store) -D_OPENMP=201307 -Wno-unknown-pragmas
 
 CFLAGS-test-double-vlen4-wrappers.c += $(double-vlen4-arch-ext-cflags)
 
@@ -423,7 +423,7 @@ CFLAGS-test-float-vlen16-wrappers.c += $(float-vlen16-arch-ext-cflags)
 # raise spurious exceptions for sNaNs, but also do not test for
 # exceptions.  Thus both versions of the classification macros are
 # validated.
-libm-test-no-inline-cflags = -fno-inline -ffloat-store -fno-builtin \
+libm-test-no-inline-cflags = -fno-inline $(libc_cv_cc_float_store) -fno-builtin \
 			     $(config-cflags-signaling-nans)
 CFLAGS-test-tgmath.c += -fno-builtin
 # The following testcase uses very long lines (>3 million), so it may take a

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

* [glibc/azanella/clang] Use -ffloat-store iff compiler supports it
@ 2023-08-30 12:38 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2023-08-30 12:38 UTC (permalink / raw)
  To: glibc-cvs

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

commit 58c049fccb3b6a40f88a7c14600677ca8da1fa5e
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 13:12:43 2022 -0300

    Use -ffloat-store iff compiler supports it

Diff:
---
 configure     | 24 ++++++++++++++++++++++++
 configure.ac  | 10 ++++++++++
 math/Makefile |  4 ++--
 3 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 004108d180..0f3c8818d3 100755
--- a/configure
+++ b/configure
@@ -7466,6 +7466,30 @@ 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 for compiler option that -ffloat-store" >&5
+printf %s "checking for compiler option that -ffloat-store... " >&6; }
+if test ${libc_cv_cc_float_store+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if { ac_try='${CC-cc} -Werror -ffloat-store -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_float_store=-ffloat-store
+else $as_nop
+  libc_cv_cc_float_store=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_float_store" >&5
+printf "%s\n" "$libc_cv_cc_float_store" >&6; }
+config_vars="$config_vars
+config-cflags-float-store = $libc_cv_cc_float_store"
+
 { 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 ecb4e7086e..7a9df2818a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1535,6 +1535,16 @@ LIBC_TRY_CC_OPTION([-Werror -frounding-math],
 LIBC_CONFIG_VAR([config-cflags-frounding-math],
 	       	[$libc_cv_cc_rounding_math])
 
+dnl Determine if compiler supports -ffloat-store
+AC_CACHE_CHECK([for compiler option that -ffloat-store],
+	       libc_cv_cc_float_store, [dnl
+LIBC_TRY_CC_OPTION([-Werror -ffloat-store],
+		   [libc_cv_cc_float_store=-ffloat-store],
+		   [libc_cv_cc_float_store=])
+])
+LIBC_CONFIG_VAR([config-cflags-float-store],
+		[$libc_cv_cc_float_store])
+
 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
diff --git a/math/Makefile b/math/Makefile
index 3e9701c0d1..85a9cb3026 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -407,7 +407,7 @@ $(objpfx)test-tgmath3-macro-list.out: gen-tgmath-tests.py
 
 libm-test-fast-math-cflags = -fno-builtin -D__FAST_MATH__ -DTEST_FAST_MATH
 libm-test-vec-cflags = $(libm-test-fast-math-cflags) -fno-inline \
-		       -ffloat-store -D_OPENMP=201307 -Wno-unknown-pragmas
+		       $(libc_cv_cc_float_store) -D_OPENMP=201307 -Wno-unknown-pragmas
 
 CFLAGS-test-double-vlen4-wrappers.c += $(double-vlen4-arch-ext-cflags)
 
@@ -423,7 +423,7 @@ CFLAGS-test-float-vlen16-wrappers.c += $(float-vlen16-arch-ext-cflags)
 # raise spurious exceptions for sNaNs, but also do not test for
 # exceptions.  Thus both versions of the classification macros are
 # validated.
-libm-test-no-inline-cflags = -fno-inline -ffloat-store -fno-builtin \
+libm-test-no-inline-cflags = -fno-inline $(libc_cv_cc_float_store) -fno-builtin \
 			     $(config-cflags-signaling-nans)
 CFLAGS-test-tgmath.c += -fno-builtin
 # The following testcase uses very long lines (>3 million), so it may take a

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

* [glibc/azanella/clang] Use -ffloat-store iff compiler supports it
@ 2023-02-09 19:49 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2023-02-09 19:49 UTC (permalink / raw)
  To: glibc-cvs

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

commit b4c53ea5eefc7235800b5f6f4445f88a367ed807
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 13:12:43 2022 -0300

    Use -ffloat-store iff compiler supports it

Diff:
---
 configure     | 22 ++++++++++++++++++++++
 configure.ac  | 10 ++++++++++
 math/Makefile |  4 ++--
 3 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index d582e6c9d5..b1ebcaab23 100755
--- a/configure
+++ b/configure
@@ -6248,6 +6248,28 @@ $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 for compiler option that -ffloat-store" >&5
+$as_echo_n "checking for compiler option that -ffloat-store... " >&6; }
+if ${libc_cv_cc_float_store+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -ffloat-store -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_float_store=-ffloat-store
+else
+  libc_cv_cc_float_store=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_float_store" >&5
+$as_echo "$libc_cv_cc_float_store" >&6; }
+config_vars="$config_vars
+config-cflags-float-store = $libc_cv_cc_float_store"
+
 { $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 0892622ef4..5377ac8255 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1551,6 +1551,16 @@ LIBC_TRY_CC_OPTION([-Werror -frounding-math],
 LIBC_CONFIG_VAR([config-cflags-frounding-math],
 	       	[$libc_cv_cc_rounding_math])
 
+dnl Determine if compiler supports -ffloat-store
+AC_CACHE_CHECK([for compiler option that -ffloat-store],
+	       libc_cv_cc_float_store, [dnl
+LIBC_TRY_CC_OPTION([-Werror -ffloat-store],
+		   [libc_cv_cc_float_store=-ffloat-store],
+		   [libc_cv_cc_float_store=])
+])
+LIBC_CONFIG_VAR([config-cflags-float-store],
+		[$libc_cv_cc_float_store])
+
 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
diff --git a/math/Makefile b/math/Makefile
index c3d9059b9e..0a773b64d9 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -407,7 +407,7 @@ $(objpfx)test-tgmath3-macro-list.out: gen-tgmath-tests.py
 
 libm-test-fast-math-cflags = -fno-builtin -D__FAST_MATH__ -DTEST_FAST_MATH
 libm-test-vec-cflags = $(libm-test-fast-math-cflags) -fno-inline \
-		       -ffloat-store -D_OPENMP=201307 -Wno-unknown-pragmas
+		       $(libc_cv_cc_float_store) -D_OPENMP=201307 -Wno-unknown-pragmas
 
 CFLAGS-test-double-vlen4-wrappers.c += $(double-vlen4-arch-ext-cflags)
 
@@ -423,7 +423,7 @@ CFLAGS-test-float-vlen16-wrappers.c += $(float-vlen16-arch-ext-cflags)
 # raise spurious exceptions for sNaNs, but also do not test for
 # exceptions.  Thus both versions of the classification macros are
 # validated.
-libm-test-no-inline-cflags = -fno-inline -ffloat-store -fno-builtin \
+libm-test-no-inline-cflags = -fno-inline $(libc_cv_cc_float_store) -fno-builtin \
 			     $(config-cflags-signaling-nans)
 CFLAGS-test-tgmath.c += -fno-builtin
 # The following testcase uses very long lines (>3 million), so it may take a

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

* [glibc/azanella/clang] Use -ffloat-store iff compiler supports it
@ 2022-10-04 13:00 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2022-10-04 13:00 UTC (permalink / raw)
  To: glibc-cvs

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

commit 43601f5b8822c0bd4cd842b6b4709a057b867f75
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 13:12:43 2022 -0300

    Use -ffloat-store iff compiler supports it

Diff:
---
 configure     | 22 ++++++++++++++++++++++
 configure.ac  | 10 ++++++++++
 math/Makefile |  4 ++--
 3 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 03fceee905..4a02e5de12 100755
--- a/configure
+++ b/configure
@@ -6467,6 +6467,28 @@ $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 for compiler option that -ffloat-store" >&5
+$as_echo_n "checking for compiler option that -ffloat-store... " >&6; }
+if ${libc_cv_cc_float_store+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -ffloat-store -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_float_store=-ffloat-store
+else
+  libc_cv_cc_float_store=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_float_store" >&5
+$as_echo "$libc_cv_cc_float_store" >&6; }
+config_vars="$config_vars
+config-cflags-float-store = $libc_cv_cc_float_store"
+
 { $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 410ff604c2..a078b28914 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1561,6 +1561,16 @@ LIBC_TRY_CC_OPTION([-Werror -frounding-math],
 LIBC_CONFIG_VAR([config-cflags-frounding-math],
 	       	[$libc_cv_cc_rounding_math])
 
+dnl Determine if compiler supports -ffloat-store
+AC_CACHE_CHECK([for compiler option that -ffloat-store],
+	       libc_cv_cc_float_store, [dnl
+LIBC_TRY_CC_OPTION([-Werror -ffloat-store],
+		   [libc_cv_cc_float_store=-ffloat-store],
+		   [libc_cv_cc_float_store=])
+])
+LIBC_CONFIG_VAR([config-cflags-float-store],
+		[$libc_cv_cc_float_store])
+
 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
diff --git a/math/Makefile b/math/Makefile
index c6621dadf8..0cf60e4df6 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -407,7 +407,7 @@ $(objpfx)test-tgmath3-macro-list.out: gen-tgmath-tests.py
 
 libm-test-fast-math-cflags = -fno-builtin -D__FAST_MATH__ -DTEST_FAST_MATH
 libm-test-vec-cflags = $(libm-test-fast-math-cflags) -fno-inline \
-		       -ffloat-store -D_OPENMP=201307 -Wno-unknown-pragmas
+		       $(libc_cv_cc_float_store) -D_OPENMP=201307 -Wno-unknown-pragmas
 
 CFLAGS-test-double-vlen4-wrappers.c += $(double-vlen4-arch-ext-cflags)
 
@@ -423,7 +423,7 @@ CFLAGS-test-float-vlen16-wrappers.c += $(float-vlen16-arch-ext-cflags)
 # raise spurious exceptions for sNaNs, but also do not test for
 # exceptions.  Thus both versions of the classification macros are
 # validated.
-libm-test-no-inline-cflags = -fno-inline -ffloat-store -fno-builtin \
+libm-test-no-inline-cflags = -fno-inline $(libc_cv_cc_float_store) -fno-builtin \
 			     $(config-cflags-signaling-nans)
 CFLAGS-test-tgmath.c += -fno-builtin
 # The following testcase uses very long lines (>3 million), so it may take a

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

* [glibc/azanella/clang] Use -ffloat-store iff compiler supports it
@ 2022-06-09 21:21 Adhemerval Zanella
  0 siblings, 0 replies; 21+ 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=f18148375b468d0f985faa0c0c2c1cb79e0a312e

commit f18148375b468d0f985faa0c0c2c1cb79e0a312e
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 13:12:43 2022 -0300

    Use -ffloat-store iff compiler supports it

Diff:
---
 configure     | 22 ++++++++++++++++++++++
 configure.ac  | 10 ++++++++++
 math/Makefile |  4 ++--
 3 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index ef97002749..5c528345dd 100755
--- a/configure
+++ b/configure
@@ -6513,6 +6513,28 @@ $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 for compiler option that -ffloat-store" >&5
+$as_echo_n "checking for compiler option that -ffloat-store... " >&6; }
+if ${libc_cv_cc_float_store+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -ffloat-store -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_float_store=-ffloat-store
+else
+  libc_cv_cc_float_store=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_float_store" >&5
+$as_echo "$libc_cv_cc_float_store" >&6; }
+config_vars="$config_vars
+config-cflags-float-store = $libc_cv_cc_float_store"
+
 { $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 7a8412f86b..b5e5a33c93 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1544,6 +1544,16 @@ LIBC_TRY_CC_OPTION([-Werror -frounding-math],
 LIBC_CONFIG_VAR([config-cflags-frounding-math],
 	       	[$libc_cv_cc_rounding_math])
 
+dnl Determine if compiler supports -ffloat-store
+AC_CACHE_CHECK([for compiler option that -ffloat-store],
+	       libc_cv_cc_float_store, [dnl
+LIBC_TRY_CC_OPTION([-Werror -ffloat-store],
+		   [libc_cv_cc_float_store=-ffloat-store],
+		   [libc_cv_cc_float_store=])
+])
+LIBC_CONFIG_VAR([config-cflags-float-store],
+		[$libc_cv_cc_float_store])
+
 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
diff --git a/math/Makefile b/math/Makefile
index f4ded1586d..bc56174c5a 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -407,7 +407,7 @@ $(objpfx)test-tgmath3-macro-list.out: gen-tgmath-tests.py
 
 libm-test-fast-math-cflags = -fno-builtin -D__FAST_MATH__ -DTEST_FAST_MATH
 libm-test-vec-cflags = $(libm-test-fast-math-cflags) -fno-inline \
-		       -ffloat-store -D_OPENMP=201307 -Wno-unknown-pragmas
+		       $(libc_cv_cc_float_store) -D_OPENMP=201307 -Wno-unknown-pragmas
 
 CFLAGS-test-double-vlen4-wrappers.c += $(double-vlen4-arch-ext-cflags)
 
@@ -423,7 +423,7 @@ CFLAGS-test-float-vlen16-wrappers.c += $(float-vlen16-arch-ext-cflags)
 # raise spurious exceptions for sNaNs, but also do not test for
 # exceptions.  Thus both versions of the classification macros are
 # validated.
-libm-test-no-inline-cflags = -fno-inline -ffloat-store -fno-builtin \
+libm-test-no-inline-cflags = -fno-inline $(libc_cv_cc_float_store) -fno-builtin \
 			     $(config-cflags-signaling-nans)
 CFLAGS-test-tgmath.c += -fno-builtin
 # The following testcase uses very long lines (>3 million), so it may take a


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

* [glibc/azanella/clang] Use -ffloat-store iff compiler supports it
@ 2022-06-09 13:18 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2022-06-09 13:18 UTC (permalink / raw)
  To: glibc-cvs

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

commit f18148375b468d0f985faa0c0c2c1cb79e0a312e
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 13:12:43 2022 -0300

    Use -ffloat-store iff compiler supports it

Diff:
---
 configure     | 22 ++++++++++++++++++++++
 configure.ac  | 10 ++++++++++
 math/Makefile |  4 ++--
 3 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index ef97002749..5c528345dd 100755
--- a/configure
+++ b/configure
@@ -6513,6 +6513,28 @@ $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 for compiler option that -ffloat-store" >&5
+$as_echo_n "checking for compiler option that -ffloat-store... " >&6; }
+if ${libc_cv_cc_float_store+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -ffloat-store -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_float_store=-ffloat-store
+else
+  libc_cv_cc_float_store=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_float_store" >&5
+$as_echo "$libc_cv_cc_float_store" >&6; }
+config_vars="$config_vars
+config-cflags-float-store = $libc_cv_cc_float_store"
+
 { $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 7a8412f86b..b5e5a33c93 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1544,6 +1544,16 @@ LIBC_TRY_CC_OPTION([-Werror -frounding-math],
 LIBC_CONFIG_VAR([config-cflags-frounding-math],
 	       	[$libc_cv_cc_rounding_math])
 
+dnl Determine if compiler supports -ffloat-store
+AC_CACHE_CHECK([for compiler option that -ffloat-store],
+	       libc_cv_cc_float_store, [dnl
+LIBC_TRY_CC_OPTION([-Werror -ffloat-store],
+		   [libc_cv_cc_float_store=-ffloat-store],
+		   [libc_cv_cc_float_store=])
+])
+LIBC_CONFIG_VAR([config-cflags-float-store],
+		[$libc_cv_cc_float_store])
+
 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
diff --git a/math/Makefile b/math/Makefile
index f4ded1586d..bc56174c5a 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -407,7 +407,7 @@ $(objpfx)test-tgmath3-macro-list.out: gen-tgmath-tests.py
 
 libm-test-fast-math-cflags = -fno-builtin -D__FAST_MATH__ -DTEST_FAST_MATH
 libm-test-vec-cflags = $(libm-test-fast-math-cflags) -fno-inline \
-		       -ffloat-store -D_OPENMP=201307 -Wno-unknown-pragmas
+		       $(libc_cv_cc_float_store) -D_OPENMP=201307 -Wno-unknown-pragmas
 
 CFLAGS-test-double-vlen4-wrappers.c += $(double-vlen4-arch-ext-cflags)
 
@@ -423,7 +423,7 @@ CFLAGS-test-float-vlen16-wrappers.c += $(float-vlen16-arch-ext-cflags)
 # raise spurious exceptions for sNaNs, but also do not test for
 # exceptions.  Thus both versions of the classification macros are
 # validated.
-libm-test-no-inline-cflags = -fno-inline -ffloat-store -fno-builtin \
+libm-test-no-inline-cflags = -fno-inline $(libc_cv_cc_float_store) -fno-builtin \
 			     $(config-cflags-signaling-nans)
 CFLAGS-test-tgmath.c += -fno-builtin
 # The following testcase uses very long lines (>3 million), so it may take a


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

* [glibc/azanella/clang] Use -ffloat-store iff compiler supports it
@ 2022-06-03 14:07 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2022-06-03 14:07 UTC (permalink / raw)
  To: glibc-cvs

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

commit ceb6795c6344e5929a112ea54826b7550b1ebbec
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 13:12:43 2022 -0300

    Use -ffloat-store iff compiler supports it

Diff:
---
 configure     | 22 ++++++++++++++++++++++
 configure.ac  | 10 ++++++++++
 math/Makefile |  4 ++--
 3 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index ef97002749..5c528345dd 100755
--- a/configure
+++ b/configure
@@ -6513,6 +6513,28 @@ $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 for compiler option that -ffloat-store" >&5
+$as_echo_n "checking for compiler option that -ffloat-store... " >&6; }
+if ${libc_cv_cc_float_store+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -ffloat-store -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_float_store=-ffloat-store
+else
+  libc_cv_cc_float_store=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_float_store" >&5
+$as_echo "$libc_cv_cc_float_store" >&6; }
+config_vars="$config_vars
+config-cflags-float-store = $libc_cv_cc_float_store"
+
 { $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 7a8412f86b..b5e5a33c93 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1544,6 +1544,16 @@ LIBC_TRY_CC_OPTION([-Werror -frounding-math],
 LIBC_CONFIG_VAR([config-cflags-frounding-math],
 	       	[$libc_cv_cc_rounding_math])
 
+dnl Determine if compiler supports -ffloat-store
+AC_CACHE_CHECK([for compiler option that -ffloat-store],
+	       libc_cv_cc_float_store, [dnl
+LIBC_TRY_CC_OPTION([-Werror -ffloat-store],
+		   [libc_cv_cc_float_store=-ffloat-store],
+		   [libc_cv_cc_float_store=])
+])
+LIBC_CONFIG_VAR([config-cflags-float-store],
+		[$libc_cv_cc_float_store])
+
 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
diff --git a/math/Makefile b/math/Makefile
index f4ded1586d..bc56174c5a 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -407,7 +407,7 @@ $(objpfx)test-tgmath3-macro-list.out: gen-tgmath-tests.py
 
 libm-test-fast-math-cflags = -fno-builtin -D__FAST_MATH__ -DTEST_FAST_MATH
 libm-test-vec-cflags = $(libm-test-fast-math-cflags) -fno-inline \
-		       -ffloat-store -D_OPENMP=201307 -Wno-unknown-pragmas
+		       $(libc_cv_cc_float_store) -D_OPENMP=201307 -Wno-unknown-pragmas
 
 CFLAGS-test-double-vlen4-wrappers.c += $(double-vlen4-arch-ext-cflags)
 
@@ -423,7 +423,7 @@ CFLAGS-test-float-vlen16-wrappers.c += $(float-vlen16-arch-ext-cflags)
 # raise spurious exceptions for sNaNs, but also do not test for
 # exceptions.  Thus both versions of the classification macros are
 # validated.
-libm-test-no-inline-cflags = -fno-inline -ffloat-store -fno-builtin \
+libm-test-no-inline-cflags = -fno-inline $(libc_cv_cc_float_store) -fno-builtin \
 			     $(config-cflags-signaling-nans)
 CFLAGS-test-tgmath.c += -fno-builtin
 # The following testcase uses very long lines (>3 million), so it may take a


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

* [glibc/azanella/clang] Use -ffloat-store iff compiler supports it
@ 2022-05-13 14:21 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2022-05-13 14:21 UTC (permalink / raw)
  To: glibc-cvs

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

commit da88aae0ee47e723cf39bc38b357a863628cfaa7
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 13:12:43 2022 -0300

    Use -ffloat-store iff compiler supports it

Diff:
---
 configure     | 22 ++++++++++++++++++++++
 configure.ac  | 10 ++++++++++
 math/Makefile |  4 ++--
 3 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index ef97002749..5c528345dd 100755
--- a/configure
+++ b/configure
@@ -6513,6 +6513,28 @@ $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 for compiler option that -ffloat-store" >&5
+$as_echo_n "checking for compiler option that -ffloat-store... " >&6; }
+if ${libc_cv_cc_float_store+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -ffloat-store -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_float_store=-ffloat-store
+else
+  libc_cv_cc_float_store=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_float_store" >&5
+$as_echo "$libc_cv_cc_float_store" >&6; }
+config_vars="$config_vars
+config-cflags-float-store = $libc_cv_cc_float_store"
+
 { $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 7a8412f86b..b5e5a33c93 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1544,6 +1544,16 @@ LIBC_TRY_CC_OPTION([-Werror -frounding-math],
 LIBC_CONFIG_VAR([config-cflags-frounding-math],
 	       	[$libc_cv_cc_rounding_math])
 
+dnl Determine if compiler supports -ffloat-store
+AC_CACHE_CHECK([for compiler option that -ffloat-store],
+	       libc_cv_cc_float_store, [dnl
+LIBC_TRY_CC_OPTION([-Werror -ffloat-store],
+		   [libc_cv_cc_float_store=-ffloat-store],
+		   [libc_cv_cc_float_store=])
+])
+LIBC_CONFIG_VAR([config-cflags-float-store],
+		[$libc_cv_cc_float_store])
+
 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
diff --git a/math/Makefile b/math/Makefile
index f4ded1586d..bc56174c5a 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -407,7 +407,7 @@ $(objpfx)test-tgmath3-macro-list.out: gen-tgmath-tests.py
 
 libm-test-fast-math-cflags = -fno-builtin -D__FAST_MATH__ -DTEST_FAST_MATH
 libm-test-vec-cflags = $(libm-test-fast-math-cflags) -fno-inline \
-		       -ffloat-store -D_OPENMP=201307 -Wno-unknown-pragmas
+		       $(libc_cv_cc_float_store) -D_OPENMP=201307 -Wno-unknown-pragmas
 
 CFLAGS-test-double-vlen4-wrappers.c += $(double-vlen4-arch-ext-cflags)
 
@@ -423,7 +423,7 @@ CFLAGS-test-float-vlen16-wrappers.c += $(float-vlen16-arch-ext-cflags)
 # raise spurious exceptions for sNaNs, but also do not test for
 # exceptions.  Thus both versions of the classification macros are
 # validated.
-libm-test-no-inline-cflags = -fno-inline -ffloat-store -fno-builtin \
+libm-test-no-inline-cflags = -fno-inline $(libc_cv_cc_float_store) -fno-builtin \
 			     $(config-cflags-signaling-nans)
 CFLAGS-test-tgmath.c += -fno-builtin
 # The following testcase uses very long lines (>3 million), so it may take a


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

* [glibc/azanella/clang] Use -ffloat-store iff compiler supports it
@ 2022-05-12 19:35 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2022-05-12 19:35 UTC (permalink / raw)
  To: glibc-cvs

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

commit 9095cc0d13e56afaff92d1199868999863469ab8
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 13:12:43 2022 -0300

    Use -ffloat-store iff compiler supports it

Diff:
---
 configure     | 22 ++++++++++++++++++++++
 configure.ac  | 10 ++++++++++
 math/Makefile |  4 ++--
 3 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index ef97002749..5c528345dd 100755
--- a/configure
+++ b/configure
@@ -6513,6 +6513,28 @@ $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 for compiler option that -ffloat-store" >&5
+$as_echo_n "checking for compiler option that -ffloat-store... " >&6; }
+if ${libc_cv_cc_float_store+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -ffloat-store -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_float_store=-ffloat-store
+else
+  libc_cv_cc_float_store=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_float_store" >&5
+$as_echo "$libc_cv_cc_float_store" >&6; }
+config_vars="$config_vars
+config-cflags-float-store = $libc_cv_cc_float_store"
+
 { $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 7a8412f86b..b5e5a33c93 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1544,6 +1544,16 @@ LIBC_TRY_CC_OPTION([-Werror -frounding-math],
 LIBC_CONFIG_VAR([config-cflags-frounding-math],
 	       	[$libc_cv_cc_rounding_math])
 
+dnl Determine if compiler supports -ffloat-store
+AC_CACHE_CHECK([for compiler option that -ffloat-store],
+	       libc_cv_cc_float_store, [dnl
+LIBC_TRY_CC_OPTION([-Werror -ffloat-store],
+		   [libc_cv_cc_float_store=-ffloat-store],
+		   [libc_cv_cc_float_store=])
+])
+LIBC_CONFIG_VAR([config-cflags-float-store],
+		[$libc_cv_cc_float_store])
+
 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
diff --git a/math/Makefile b/math/Makefile
index f4ded1586d..bc56174c5a 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -407,7 +407,7 @@ $(objpfx)test-tgmath3-macro-list.out: gen-tgmath-tests.py
 
 libm-test-fast-math-cflags = -fno-builtin -D__FAST_MATH__ -DTEST_FAST_MATH
 libm-test-vec-cflags = $(libm-test-fast-math-cflags) -fno-inline \
-		       -ffloat-store -D_OPENMP=201307 -Wno-unknown-pragmas
+		       $(libc_cv_cc_float_store) -D_OPENMP=201307 -Wno-unknown-pragmas
 
 CFLAGS-test-double-vlen4-wrappers.c += $(double-vlen4-arch-ext-cflags)
 
@@ -423,7 +423,7 @@ CFLAGS-test-float-vlen16-wrappers.c += $(float-vlen16-arch-ext-cflags)
 # raise spurious exceptions for sNaNs, but also do not test for
 # exceptions.  Thus both versions of the classification macros are
 # validated.
-libm-test-no-inline-cflags = -fno-inline -ffloat-store -fno-builtin \
+libm-test-no-inline-cflags = -fno-inline $(libc_cv_cc_float_store) -fno-builtin \
 			     $(config-cflags-signaling-nans)
 CFLAGS-test-tgmath.c += -fno-builtin
 # The following testcase uses very long lines (>3 million), so it may take a


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

* [glibc/azanella/clang] Use -ffloat-store iff compiler supports it
@ 2022-05-10 18:25 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2022-05-10 18:25 UTC (permalink / raw)
  To: glibc-cvs

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

commit 9bfb773fbc3da67ddb242170793616850c8f63cb
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 13:12:43 2022 -0300

    Use -ffloat-store iff compiler supports it

Diff:
---
 configure     | 22 ++++++++++++++++++++++
 configure.ac  | 10 ++++++++++
 math/Makefile |  4 ++--
 3 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index ef97002749..5c528345dd 100755
--- a/configure
+++ b/configure
@@ -6513,6 +6513,28 @@ $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 for compiler option that -ffloat-store" >&5
+$as_echo_n "checking for compiler option that -ffloat-store... " >&6; }
+if ${libc_cv_cc_float_store+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -ffloat-store -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_float_store=-ffloat-store
+else
+  libc_cv_cc_float_store=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_float_store" >&5
+$as_echo "$libc_cv_cc_float_store" >&6; }
+config_vars="$config_vars
+config-cflags-float-store = $libc_cv_cc_float_store"
+
 { $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 7a8412f86b..b5e5a33c93 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1544,6 +1544,16 @@ LIBC_TRY_CC_OPTION([-Werror -frounding-math],
 LIBC_CONFIG_VAR([config-cflags-frounding-math],
 	       	[$libc_cv_cc_rounding_math])
 
+dnl Determine if compiler supports -ffloat-store
+AC_CACHE_CHECK([for compiler option that -ffloat-store],
+	       libc_cv_cc_float_store, [dnl
+LIBC_TRY_CC_OPTION([-Werror -ffloat-store],
+		   [libc_cv_cc_float_store=-ffloat-store],
+		   [libc_cv_cc_float_store=])
+])
+LIBC_CONFIG_VAR([config-cflags-float-store],
+		[$libc_cv_cc_float_store])
+
 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
diff --git a/math/Makefile b/math/Makefile
index f4ded1586d..bc56174c5a 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -407,7 +407,7 @@ $(objpfx)test-tgmath3-macro-list.out: gen-tgmath-tests.py
 
 libm-test-fast-math-cflags = -fno-builtin -D__FAST_MATH__ -DTEST_FAST_MATH
 libm-test-vec-cflags = $(libm-test-fast-math-cflags) -fno-inline \
-		       -ffloat-store -D_OPENMP=201307 -Wno-unknown-pragmas
+		       $(libc_cv_cc_float_store) -D_OPENMP=201307 -Wno-unknown-pragmas
 
 CFLAGS-test-double-vlen4-wrappers.c += $(double-vlen4-arch-ext-cflags)
 
@@ -423,7 +423,7 @@ CFLAGS-test-float-vlen16-wrappers.c += $(float-vlen16-arch-ext-cflags)
 # raise spurious exceptions for sNaNs, but also do not test for
 # exceptions.  Thus both versions of the classification macros are
 # validated.
-libm-test-no-inline-cflags = -fno-inline -ffloat-store -fno-builtin \
+libm-test-no-inline-cflags = -fno-inline $(libc_cv_cc_float_store) -fno-builtin \
 			     $(config-cflags-signaling-nans)
 CFLAGS-test-tgmath.c += -fno-builtin
 # The following testcase uses very long lines (>3 million), so it may take a


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

* [glibc/azanella/clang] Use -ffloat-store iff compiler supports it
@ 2022-04-29 14:05 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2022-04-29 14:05 UTC (permalink / raw)
  To: glibc-cvs

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

commit 1cad417cf6fc2f0e0cc6c05458dfed50376f110b
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 13:12:43 2022 -0300

    Use -ffloat-store iff compiler supports it

Diff:
---
 configure     | 22 ++++++++++++++++++++++
 configure.ac  | 10 ++++++++++
 math/Makefile |  4 ++--
 3 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index f20cf831b0..f406d2769c 100755
--- a/configure
+++ b/configure
@@ -6541,6 +6541,28 @@ $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 for compiler option that -ffloat-store" >&5
+$as_echo_n "checking for compiler option that -ffloat-store... " >&6; }
+if ${libc_cv_cc_float_store+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -ffloat-store -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_float_store=-ffloat-store
+else
+  libc_cv_cc_float_store=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_float_store" >&5
+$as_echo "$libc_cv_cc_float_store" >&6; }
+config_vars="$config_vars
+config-cflags-float-store = $libc_cv_cc_float_store"
+
 { $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 83fa6618e1..1dcd58626e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1560,6 +1560,16 @@ LIBC_TRY_CC_OPTION([-Werror -frounding-math],
 LIBC_CONFIG_VAR([config-cflags-frounding-math],
 	       	[$libc_cv_cc_rounding_math])
 
+dnl Determine if compiler supports -ffloat-store
+AC_CACHE_CHECK([for compiler option that -ffloat-store],
+	       libc_cv_cc_float_store, [dnl
+LIBC_TRY_CC_OPTION([-Werror -ffloat-store],
+		   [libc_cv_cc_float_store=-ffloat-store],
+		   [libc_cv_cc_float_store=])
+])
+LIBC_CONFIG_VAR([config-cflags-float-store],
+		[$libc_cv_cc_float_store])
+
 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
diff --git a/math/Makefile b/math/Makefile
index f4ded1586d..bc56174c5a 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -407,7 +407,7 @@ $(objpfx)test-tgmath3-macro-list.out: gen-tgmath-tests.py
 
 libm-test-fast-math-cflags = -fno-builtin -D__FAST_MATH__ -DTEST_FAST_MATH
 libm-test-vec-cflags = $(libm-test-fast-math-cflags) -fno-inline \
-		       -ffloat-store -D_OPENMP=201307 -Wno-unknown-pragmas
+		       $(libc_cv_cc_float_store) -D_OPENMP=201307 -Wno-unknown-pragmas
 
 CFLAGS-test-double-vlen4-wrappers.c += $(double-vlen4-arch-ext-cflags)
 
@@ -423,7 +423,7 @@ CFLAGS-test-float-vlen16-wrappers.c += $(float-vlen16-arch-ext-cflags)
 # raise spurious exceptions for sNaNs, but also do not test for
 # exceptions.  Thus both versions of the classification macros are
 # validated.
-libm-test-no-inline-cflags = -fno-inline -ffloat-store -fno-builtin \
+libm-test-no-inline-cflags = -fno-inline $(libc_cv_cc_float_store) -fno-builtin \
 			     $(config-cflags-signaling-nans)
 CFLAGS-test-tgmath.c += -fno-builtin
 # The following testcase uses very long lines (>3 million), so it may take a


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

* [glibc/azanella/clang] Use -ffloat-store iff compiler supports it
@ 2022-04-04 12:55 Adhemerval Zanella
  0 siblings, 0 replies; 21+ 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=a526cf10438eae0cfb86fb1ce4b1a572bc295607

commit a526cf10438eae0cfb86fb1ce4b1a572bc295607
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 13:12:43 2022 -0300

    Use -ffloat-store iff compiler supports it

Diff:
---
 configure     | 22 ++++++++++++++++++++++
 configure.ac  | 10 ++++++++++
 math/Makefile |  4 ++--
 3 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 225c085c87..2b1fb6cdee 100755
--- a/configure
+++ b/configure
@@ -6668,6 +6668,28 @@ $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 for compiler option that -ffloat-store" >&5
+$as_echo_n "checking for compiler option that -ffloat-store... " >&6; }
+if ${libc_cv_cc_float_store+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -ffloat-store -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_float_store=-ffloat-store
+else
+  libc_cv_cc_float_store=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_float_store" >&5
+$as_echo "$libc_cv_cc_float_store" >&6; }
+config_vars="$config_vars
+config-cflags-float-store = $libc_cv_cc_float_store"
+
 { $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 d6a4b93529..cbc3fee316 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1676,6 +1676,16 @@ LIBC_TRY_CC_OPTION([-Werror -frounding-math],
 LIBC_CONFIG_VAR([config-cflags-frounding-math],
 	       	[$libc_cv_cc_rounding_math])
 
+dnl Determine if compiler supports -ffloat-store
+AC_CACHE_CHECK([for compiler option that -ffloat-store],
+	       libc_cv_cc_float_store, [dnl
+LIBC_TRY_CC_OPTION([-Werror -ffloat-store],
+		   [libc_cv_cc_float_store=-ffloat-store],
+		   [libc_cv_cc_float_store=])
+])
+LIBC_CONFIG_VAR([config-cflags-float-store],
+		[$libc_cv_cc_float_store])
+
 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
diff --git a/math/Makefile b/math/Makefile
index f4ded1586d..bc56174c5a 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -407,7 +407,7 @@ $(objpfx)test-tgmath3-macro-list.out: gen-tgmath-tests.py
 
 libm-test-fast-math-cflags = -fno-builtin -D__FAST_MATH__ -DTEST_FAST_MATH
 libm-test-vec-cflags = $(libm-test-fast-math-cflags) -fno-inline \
-		       -ffloat-store -D_OPENMP=201307 -Wno-unknown-pragmas
+		       $(libc_cv_cc_float_store) -D_OPENMP=201307 -Wno-unknown-pragmas
 
 CFLAGS-test-double-vlen4-wrappers.c += $(double-vlen4-arch-ext-cflags)
 
@@ -423,7 +423,7 @@ CFLAGS-test-float-vlen16-wrappers.c += $(float-vlen16-arch-ext-cflags)
 # raise spurious exceptions for sNaNs, but also do not test for
 # exceptions.  Thus both versions of the classification macros are
 # validated.
-libm-test-no-inline-cflags = -fno-inline -ffloat-store -fno-builtin \
+libm-test-no-inline-cflags = -fno-inline $(libc_cv_cc_float_store) -fno-builtin \
 			     $(config-cflags-signaling-nans)
 CFLAGS-test-tgmath.c += -fno-builtin
 # The following testcase uses very long lines (>3 million), so it may take a


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

* [glibc/azanella/clang] Use -ffloat-store iff compiler supports it
@ 2022-03-31 19:08 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2022-03-31 19:08 UTC (permalink / raw)
  To: glibc-cvs

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

commit 59f6b9e2ef08bffa445120eaf5d1b6fcf6b7d120
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 13:12:43 2022 -0300

    Use -ffloat-store iff compiler supports it

Diff:
---
 configure     | 22 ++++++++++++++++++++++
 configure.ac  | 10 ++++++++++
 math/Makefile |  4 ++--
 3 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 225c085c87..2b1fb6cdee 100755
--- a/configure
+++ b/configure
@@ -6668,6 +6668,28 @@ $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 for compiler option that -ffloat-store" >&5
+$as_echo_n "checking for compiler option that -ffloat-store... " >&6; }
+if ${libc_cv_cc_float_store+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -ffloat-store -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_float_store=-ffloat-store
+else
+  libc_cv_cc_float_store=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_float_store" >&5
+$as_echo "$libc_cv_cc_float_store" >&6; }
+config_vars="$config_vars
+config-cflags-float-store = $libc_cv_cc_float_store"
+
 { $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 d6a4b93529..cbc3fee316 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1676,6 +1676,16 @@ LIBC_TRY_CC_OPTION([-Werror -frounding-math],
 LIBC_CONFIG_VAR([config-cflags-frounding-math],
 	       	[$libc_cv_cc_rounding_math])
 
+dnl Determine if compiler supports -ffloat-store
+AC_CACHE_CHECK([for compiler option that -ffloat-store],
+	       libc_cv_cc_float_store, [dnl
+LIBC_TRY_CC_OPTION([-Werror -ffloat-store],
+		   [libc_cv_cc_float_store=-ffloat-store],
+		   [libc_cv_cc_float_store=])
+])
+LIBC_CONFIG_VAR([config-cflags-float-store],
+		[$libc_cv_cc_float_store])
+
 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
diff --git a/math/Makefile b/math/Makefile
index f4ded1586d..bc56174c5a 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -407,7 +407,7 @@ $(objpfx)test-tgmath3-macro-list.out: gen-tgmath-tests.py
 
 libm-test-fast-math-cflags = -fno-builtin -D__FAST_MATH__ -DTEST_FAST_MATH
 libm-test-vec-cflags = $(libm-test-fast-math-cflags) -fno-inline \
-		       -ffloat-store -D_OPENMP=201307 -Wno-unknown-pragmas
+		       $(libc_cv_cc_float_store) -D_OPENMP=201307 -Wno-unknown-pragmas
 
 CFLAGS-test-double-vlen4-wrappers.c += $(double-vlen4-arch-ext-cflags)
 
@@ -423,7 +423,7 @@ CFLAGS-test-float-vlen16-wrappers.c += $(float-vlen16-arch-ext-cflags)
 # raise spurious exceptions for sNaNs, but also do not test for
 # exceptions.  Thus both versions of the classification macros are
 # validated.
-libm-test-no-inline-cflags = -fno-inline -ffloat-store -fno-builtin \
+libm-test-no-inline-cflags = -fno-inline $(libc_cv_cc_float_store) -fno-builtin \
 			     $(config-cflags-signaling-nans)
 CFLAGS-test-tgmath.c += -fno-builtin
 # The following testcase uses very long lines (>3 million), so it may take a


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

* [glibc/azanella/clang] Use -ffloat-store iff compiler supports it
@ 2022-03-29 20:31 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2022-03-29 20:31 UTC (permalink / raw)
  To: glibc-cvs

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

commit 70da11324fde4e3886d7c96fce16a51ad4c6291a
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 13:12:43 2022 -0300

    Use -ffloat-store iff compiler supports it

Diff:
---
 configure     | 22 ++++++++++++++++++++++
 configure.ac  | 10 ++++++++++
 math/Makefile |  4 ++--
 3 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 225c085c87..2b1fb6cdee 100755
--- a/configure
+++ b/configure
@@ -6668,6 +6668,28 @@ $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 for compiler option that -ffloat-store" >&5
+$as_echo_n "checking for compiler option that -ffloat-store... " >&6; }
+if ${libc_cv_cc_float_store+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -ffloat-store -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_float_store=-ffloat-store
+else
+  libc_cv_cc_float_store=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_float_store" >&5
+$as_echo "$libc_cv_cc_float_store" >&6; }
+config_vars="$config_vars
+config-cflags-float-store = $libc_cv_cc_float_store"
+
 { $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 d6a4b93529..cbc3fee316 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1676,6 +1676,16 @@ LIBC_TRY_CC_OPTION([-Werror -frounding-math],
 LIBC_CONFIG_VAR([config-cflags-frounding-math],
 	       	[$libc_cv_cc_rounding_math])
 
+dnl Determine if compiler supports -ffloat-store
+AC_CACHE_CHECK([for compiler option that -ffloat-store],
+	       libc_cv_cc_float_store, [dnl
+LIBC_TRY_CC_OPTION([-Werror -ffloat-store],
+		   [libc_cv_cc_float_store=-ffloat-store],
+		   [libc_cv_cc_float_store=])
+])
+LIBC_CONFIG_VAR([config-cflags-float-store],
+		[$libc_cv_cc_float_store])
+
 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
diff --git a/math/Makefile b/math/Makefile
index f4ded1586d..bc56174c5a 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -407,7 +407,7 @@ $(objpfx)test-tgmath3-macro-list.out: gen-tgmath-tests.py
 
 libm-test-fast-math-cflags = -fno-builtin -D__FAST_MATH__ -DTEST_FAST_MATH
 libm-test-vec-cflags = $(libm-test-fast-math-cflags) -fno-inline \
-		       -ffloat-store -D_OPENMP=201307 -Wno-unknown-pragmas
+		       $(libc_cv_cc_float_store) -D_OPENMP=201307 -Wno-unknown-pragmas
 
 CFLAGS-test-double-vlen4-wrappers.c += $(double-vlen4-arch-ext-cflags)
 
@@ -423,7 +423,7 @@ CFLAGS-test-float-vlen16-wrappers.c += $(float-vlen16-arch-ext-cflags)
 # raise spurious exceptions for sNaNs, but also do not test for
 # exceptions.  Thus both versions of the classification macros are
 # validated.
-libm-test-no-inline-cflags = -fno-inline -ffloat-store -fno-builtin \
+libm-test-no-inline-cflags = -fno-inline $(libc_cv_cc_float_store) -fno-builtin \
 			     $(config-cflags-signaling-nans)
 CFLAGS-test-tgmath.c += -fno-builtin
 # The following testcase uses very long lines (>3 million), so it may take a


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

end of thread, other threads:[~2024-04-17 20:08 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-28 17:43 [glibc/azanella/clang] Use -ffloat-store iff compiler supports it Adhemerval Zanella
  -- strict thread matches above, loose matches on Subject: below --
2024-04-17 20:08 Adhemerval Zanella
2024-04-02 15:55 Adhemerval Zanella
2024-02-09 17:33 Adhemerval Zanella
2024-02-07 14:08 Adhemerval Zanella
2024-01-29 17:58 Adhemerval Zanella
2023-12-21 18:55 Adhemerval Zanella
2023-09-28 17:53 Adhemerval Zanella
2023-08-30 12:38 Adhemerval Zanella
2023-02-09 19:49 Adhemerval Zanella
2022-10-04 13:00 Adhemerval Zanella
2022-06-09 21:21 Adhemerval Zanella
2022-06-09 13:18 Adhemerval Zanella
2022-06-03 14:07 Adhemerval Zanella
2022-05-13 14:21 Adhemerval Zanella
2022-05-12 19:35 Adhemerval Zanella
2022-05-10 18:25 Adhemerval Zanella
2022-04-29 14:05 Adhemerval Zanella
2022-04-04 12:55 Adhemerval Zanella
2022-03-31 19:08 Adhemerval Zanella
2022-03-29 20:31 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).