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

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

commit 1cd00e75328a95b0b751e7703fee8239de5e1979
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:02:05 2022 -0300

    x86: Use -mfpmath=387 iff compiler supports it

Diff:
---
 sysdeps/x86/configure    | 22 ++++++++++++++++++++++
 sysdeps/x86/configure.ac | 10 ++++++++++
 sysdeps/x86/fpu/Makefile |  5 ++++-
 3 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure
index 46d436fddf..26296b0aea 100644
--- a/sysdeps/x86/configure
+++ b/sysdeps/x86/configure
@@ -190,6 +190,28 @@ fi
 config_vars="$config_vars
 enable-x86-isa-level = $libc_cv_include_x86_isa_level"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -mpfmath=387" >&5
+$as_echo_n "checking if compiler supports -mpfmath=387... " >&6; }
+if ${libc_cv_cc_mfpmath_387+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -mfpmath=387 -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_mfpmath_387="-mfpmath=387"
+else
+  libc_cv_cc_mfpmath_387=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_mfpmath_387" >&5
+$as_echo "$libc_cv_cc_mfpmath_387" >&6; }
+config_vars="$config_vars
+config-cflags-mfpath-387 = $libc_cv_cc_mfpmath_387"
+
 $as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
 
 
diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac
index 918b636891..8c2970864a 100644
--- a/sysdeps/x86/configure.ac
+++ b/sysdeps/x86/configure.ac
@@ -128,6 +128,16 @@ if test $libc_cv_include_x86_isa_level = yes; then
 fi
 LIBC_CONFIG_VAR([enable-x86-isa-level], [$libc_cv_include_x86_isa_level])
 
+dnl Determine if compiler supports -mfpmath=387
+AC_CACHE_CHECK([if compiler supports -mpfmath=387],
+	       libc_cv_cc_mfpmath_387, [dnl
+LIBC_TRY_CC_OPTION([-Werror -mfpmath=387],
+		   [libc_cv_cc_mfpmath_387="-mfpmath=387"],
+		   [libc_cv_cc_mfpmath_387=])
+])
+LIBC_CONFIG_VAR([config-cflags-mfpath-387],
+		[$libc_cv_cc_mfpmath_387])
+
 dnl It is always possible to access static and hidden symbols in an
 dnl position independent way.
 AC_DEFINE(PI_STATIC_AND_HIDDEN)
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 68bd42cdd3..2d584dbfeb 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -4,7 +4,10 @@ CPPFLAGS += -I../soft-fp
 
 libm-support += powl_helper
 tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
-	 test-flt-eval-method-387 test-flt-eval-method-sse
+	 test-flt-eval-method-sse
+ifneq ($(config-cflags-mfpath-387),)
+tests += test-flt-eval-method-387
+endif
 CFLAGS-test-fenv-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-clear-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-sse-2.c += -msse2 -mfpmath=sse


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

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

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

commit 942eea75573c400fb9d9c51f7cbcbdf38b603fe2
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:02:05 2022 -0300

    x86: Use -mfpmath=387 iff compiler supports it

Diff:
---
 sysdeps/x86/configure    | 24 ++++++++++++++++++++++++
 sysdeps/x86/configure.ac | 10 ++++++++++
 sysdeps/x86/fpu/Makefile |  5 ++++-
 3 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure
index 2a5421bb31..01f0285222 100644
--- a/sysdeps/x86/configure
+++ b/sysdeps/x86/configure
@@ -158,6 +158,30 @@ x86-isa-level-3-or-above = 3 4"
 config_vars="$config_vars
 enable-x86-isa-level = $libc_cv_include_x86_isa_level"
 
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler supports -mpfmath=387" >&5
+printf %s "checking if compiler supports -mpfmath=387... " >&6; }
+if test ${libc_cv_cc_mfpmath_387+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if { ac_try='${CC-cc} -Werror -mfpmath=387 -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_mfpmath_387="-mfpmath=387"
+else $as_nop
+  libc_cv_cc_mfpmath_387=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_mfpmath_387" >&5
+printf "%s\n" "$libc_cv_cc_mfpmath_387" >&6; }
+config_vars="$config_vars
+config-cflags-mfpath-387 = $libc_cv_cc_mfpmath_387"
+
 printf "%s\n" "#define SUPPORT_STATIC_PIE 1" >>confdefs.h
 
 
diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac
index 78ff7c8f41..26aad5d648 100644
--- a/sysdeps/x86/configure.ac
+++ b/sysdeps/x86/configure.ac
@@ -109,5 +109,15 @@ LIBC_CONFIG_VAR([have-x86-isa-level], [$libc_cv_have_x86_isa_level])
 LIBC_CONFIG_VAR([x86-isa-level-3-or-above], [3 4])
 LIBC_CONFIG_VAR([enable-x86-isa-level], [$libc_cv_include_x86_isa_level])
 
+dnl Determine if compiler supports -mfpmath=387
+AC_CACHE_CHECK([if compiler supports -mpfmath=387],
+	       libc_cv_cc_mfpmath_387, [dnl
+LIBC_TRY_CC_OPTION([-Werror -mfpmath=387],
+		   [libc_cv_cc_mfpmath_387="-mfpmath=387"],
+		   [libc_cv_cc_mfpmath_387=])
+])
+LIBC_CONFIG_VAR([config-cflags-mfpath-387],
+		[$libc_cv_cc_mfpmath_387])
+
 dnl Static PIE is supported.
 AC_DEFINE(SUPPORT_STATIC_PIE)
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 68bd42cdd3..2d584dbfeb 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -4,7 +4,10 @@ CPPFLAGS += -I../soft-fp
 
 libm-support += powl_helper
 tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
-	 test-flt-eval-method-387 test-flt-eval-method-sse
+	 test-flt-eval-method-sse
+ifneq ($(config-cflags-mfpath-387),)
+tests += test-flt-eval-method-387
+endif
 CFLAGS-test-fenv-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-clear-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-sse-2.c += -msse2 -mfpmath=sse

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

* [glibc/azanella/clang] x86: Use -mfpmath=387 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=9d6f5451911fdb6409b35685a24cc28248899e59

commit 9d6f5451911fdb6409b35685a24cc28248899e59
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:02:05 2022 -0300

    x86: Use -mfpmath=387 iff compiler supports it

Diff:
---
 sysdeps/x86/configure    | 24 ++++++++++++++++++++++++
 sysdeps/x86/configure.ac | 10 ++++++++++
 sysdeps/x86/fpu/Makefile |  5 ++++-
 3 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure
index 2a5421bb31..01f0285222 100644
--- a/sysdeps/x86/configure
+++ b/sysdeps/x86/configure
@@ -158,6 +158,30 @@ x86-isa-level-3-or-above = 3 4"
 config_vars="$config_vars
 enable-x86-isa-level = $libc_cv_include_x86_isa_level"
 
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler supports -mpfmath=387" >&5
+printf %s "checking if compiler supports -mpfmath=387... " >&6; }
+if test ${libc_cv_cc_mfpmath_387+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if { ac_try='${CC-cc} -Werror -mfpmath=387 -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_mfpmath_387="-mfpmath=387"
+else $as_nop
+  libc_cv_cc_mfpmath_387=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_mfpmath_387" >&5
+printf "%s\n" "$libc_cv_cc_mfpmath_387" >&6; }
+config_vars="$config_vars
+config-cflags-mfpath-387 = $libc_cv_cc_mfpmath_387"
+
 printf "%s\n" "#define SUPPORT_STATIC_PIE 1" >>confdefs.h
 
 
diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac
index 78ff7c8f41..26aad5d648 100644
--- a/sysdeps/x86/configure.ac
+++ b/sysdeps/x86/configure.ac
@@ -109,5 +109,15 @@ LIBC_CONFIG_VAR([have-x86-isa-level], [$libc_cv_have_x86_isa_level])
 LIBC_CONFIG_VAR([x86-isa-level-3-or-above], [3 4])
 LIBC_CONFIG_VAR([enable-x86-isa-level], [$libc_cv_include_x86_isa_level])
 
+dnl Determine if compiler supports -mfpmath=387
+AC_CACHE_CHECK([if compiler supports -mpfmath=387],
+	       libc_cv_cc_mfpmath_387, [dnl
+LIBC_TRY_CC_OPTION([-Werror -mfpmath=387],
+		   [libc_cv_cc_mfpmath_387="-mfpmath=387"],
+		   [libc_cv_cc_mfpmath_387=])
+])
+LIBC_CONFIG_VAR([config-cflags-mfpath-387],
+		[$libc_cv_cc_mfpmath_387])
+
 dnl Static PIE is supported.
 AC_DEFINE(SUPPORT_STATIC_PIE)
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 68bd42cdd3..2d584dbfeb 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -4,7 +4,10 @@ CPPFLAGS += -I../soft-fp
 
 libm-support += powl_helper
 tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
-	 test-flt-eval-method-387 test-flt-eval-method-sse
+	 test-flt-eval-method-sse
+ifneq ($(config-cflags-mfpath-387),)
+tests += test-flt-eval-method-387
+endif
 CFLAGS-test-fenv-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-clear-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-sse-2.c += -msse2 -mfpmath=sse

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

* [glibc/azanella/clang] x86: Use -mfpmath=387 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=d118f4928a3b119c57ca3eee222a7d3636d9ff22

commit d118f4928a3b119c57ca3eee222a7d3636d9ff22
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:02:05 2022 -0300

    x86: Use -mfpmath=387 iff compiler supports it

Diff:
---
 sysdeps/x86/configure    | 24 ++++++++++++++++++++++++
 sysdeps/x86/configure.ac | 10 ++++++++++
 sysdeps/x86/fpu/Makefile |  5 ++++-
 3 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure
index 1f4c2d67fd..cedf1d9174 100644
--- a/sysdeps/x86/configure
+++ b/sysdeps/x86/configure
@@ -125,6 +125,30 @@ fi
 config_vars="$config_vars
 enable-x86-isa-level = $libc_cv_include_x86_isa_level"
 
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler supports -mpfmath=387" >&5
+printf %s "checking if compiler supports -mpfmath=387... " >&6; }
+if test ${libc_cv_cc_mfpmath_387+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if { ac_try='${CC-cc} -Werror -mfpmath=387 -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_mfpmath_387="-mfpmath=387"
+else $as_nop
+  libc_cv_cc_mfpmath_387=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_mfpmath_387" >&5
+printf "%s\n" "$libc_cv_cc_mfpmath_387" >&6; }
+config_vars="$config_vars
+config-cflags-mfpath-387 = $libc_cv_cc_mfpmath_387"
+
 printf "%s\n" "#define SUPPORT_STATIC_PIE 1" >>confdefs.h
 
 
diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac
index 437a50623b..25738e53e9 100644
--- a/sysdeps/x86/configure.ac
+++ b/sysdeps/x86/configure.ac
@@ -85,5 +85,15 @@ if test $libc_cv_include_x86_isa_level = yes; then
 fi
 LIBC_CONFIG_VAR([enable-x86-isa-level], [$libc_cv_include_x86_isa_level])
 
+dnl Determine if compiler supports -mfpmath=387
+AC_CACHE_CHECK([if compiler supports -mpfmath=387],
+	       libc_cv_cc_mfpmath_387, [dnl
+LIBC_TRY_CC_OPTION([-Werror -mfpmath=387],
+		   [libc_cv_cc_mfpmath_387="-mfpmath=387"],
+		   [libc_cv_cc_mfpmath_387=])
+])
+LIBC_CONFIG_VAR([config-cflags-mfpath-387],
+		[$libc_cv_cc_mfpmath_387])
+
 dnl Static PIE is supported.
 AC_DEFINE(SUPPORT_STATIC_PIE)
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 68bd42cdd3..2d584dbfeb 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -4,7 +4,10 @@ CPPFLAGS += -I../soft-fp
 
 libm-support += powl_helper
 tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
-	 test-flt-eval-method-387 test-flt-eval-method-sse
+	 test-flt-eval-method-sse
+ifneq ($(config-cflags-mfpath-387),)
+tests += test-flt-eval-method-387
+endif
 CFLAGS-test-fenv-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-clear-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-sse-2.c += -msse2 -mfpmath=sse

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

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

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

commit c88abf25f03747fe2459a62afebb56cb256bac34
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:02:05 2022 -0300

    x86: Use -mfpmath=387 iff compiler supports it

Diff:
---
 sysdeps/x86/configure    | 24 ++++++++++++++++++++++++
 sysdeps/x86/configure.ac | 10 ++++++++++
 sysdeps/x86/fpu/Makefile |  5 ++++-
 3 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure
index 1f4c2d67fd..cedf1d9174 100644
--- a/sysdeps/x86/configure
+++ b/sysdeps/x86/configure
@@ -125,6 +125,30 @@ fi
 config_vars="$config_vars
 enable-x86-isa-level = $libc_cv_include_x86_isa_level"
 
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler supports -mpfmath=387" >&5
+printf %s "checking if compiler supports -mpfmath=387... " >&6; }
+if test ${libc_cv_cc_mfpmath_387+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if { ac_try='${CC-cc} -Werror -mfpmath=387 -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_mfpmath_387="-mfpmath=387"
+else $as_nop
+  libc_cv_cc_mfpmath_387=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_mfpmath_387" >&5
+printf "%s\n" "$libc_cv_cc_mfpmath_387" >&6; }
+config_vars="$config_vars
+config-cflags-mfpath-387 = $libc_cv_cc_mfpmath_387"
+
 printf "%s\n" "#define SUPPORT_STATIC_PIE 1" >>confdefs.h
 
 
diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac
index 437a50623b..25738e53e9 100644
--- a/sysdeps/x86/configure.ac
+++ b/sysdeps/x86/configure.ac
@@ -85,5 +85,15 @@ if test $libc_cv_include_x86_isa_level = yes; then
 fi
 LIBC_CONFIG_VAR([enable-x86-isa-level], [$libc_cv_include_x86_isa_level])
 
+dnl Determine if compiler supports -mfpmath=387
+AC_CACHE_CHECK([if compiler supports -mpfmath=387],
+	       libc_cv_cc_mfpmath_387, [dnl
+LIBC_TRY_CC_OPTION([-Werror -mfpmath=387],
+		   [libc_cv_cc_mfpmath_387="-mfpmath=387"],
+		   [libc_cv_cc_mfpmath_387=])
+])
+LIBC_CONFIG_VAR([config-cflags-mfpath-387],
+		[$libc_cv_cc_mfpmath_387])
+
 dnl Static PIE is supported.
 AC_DEFINE(SUPPORT_STATIC_PIE)
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 68bd42cdd3..2d584dbfeb 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -4,7 +4,10 @@ CPPFLAGS += -I../soft-fp
 
 libm-support += powl_helper
 tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
-	 test-flt-eval-method-387 test-flt-eval-method-sse
+	 test-flt-eval-method-sse
+ifneq ($(config-cflags-mfpath-387),)
+tests += test-flt-eval-method-387
+endif
 CFLAGS-test-fenv-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-clear-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-sse-2.c += -msse2 -mfpmath=sse

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

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

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

commit a8f175f8ea048518915e0486078c6679c322741d
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:02:05 2022 -0300

    x86: Use -mfpmath=387 iff compiler supports it

Diff:
---
 sysdeps/x86/configure    | 24 ++++++++++++++++++++++++
 sysdeps/x86/configure.ac | 10 ++++++++++
 sysdeps/x86/fpu/Makefile |  5 ++++-
 3 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure
index 1f4c2d67fd..cedf1d9174 100644
--- a/sysdeps/x86/configure
+++ b/sysdeps/x86/configure
@@ -125,6 +125,30 @@ fi
 config_vars="$config_vars
 enable-x86-isa-level = $libc_cv_include_x86_isa_level"
 
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler supports -mpfmath=387" >&5
+printf %s "checking if compiler supports -mpfmath=387... " >&6; }
+if test ${libc_cv_cc_mfpmath_387+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if { ac_try='${CC-cc} -Werror -mfpmath=387 -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_mfpmath_387="-mfpmath=387"
+else $as_nop
+  libc_cv_cc_mfpmath_387=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_mfpmath_387" >&5
+printf "%s\n" "$libc_cv_cc_mfpmath_387" >&6; }
+config_vars="$config_vars
+config-cflags-mfpath-387 = $libc_cv_cc_mfpmath_387"
+
 printf "%s\n" "#define SUPPORT_STATIC_PIE 1" >>confdefs.h
 
 
diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac
index 437a50623b..25738e53e9 100644
--- a/sysdeps/x86/configure.ac
+++ b/sysdeps/x86/configure.ac
@@ -85,5 +85,15 @@ if test $libc_cv_include_x86_isa_level = yes; then
 fi
 LIBC_CONFIG_VAR([enable-x86-isa-level], [$libc_cv_include_x86_isa_level])
 
+dnl Determine if compiler supports -mfpmath=387
+AC_CACHE_CHECK([if compiler supports -mpfmath=387],
+	       libc_cv_cc_mfpmath_387, [dnl
+LIBC_TRY_CC_OPTION([-Werror -mfpmath=387],
+		   [libc_cv_cc_mfpmath_387="-mfpmath=387"],
+		   [libc_cv_cc_mfpmath_387=])
+])
+LIBC_CONFIG_VAR([config-cflags-mfpath-387],
+		[$libc_cv_cc_mfpmath_387])
+
 dnl Static PIE is supported.
 AC_DEFINE(SUPPORT_STATIC_PIE)
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 68bd42cdd3..2d584dbfeb 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -4,7 +4,10 @@ CPPFLAGS += -I../soft-fp
 
 libm-support += powl_helper
 tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
-	 test-flt-eval-method-387 test-flt-eval-method-sse
+	 test-flt-eval-method-sse
+ifneq ($(config-cflags-mfpath-387),)
+tests += test-flt-eval-method-387
+endif
 CFLAGS-test-fenv-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-clear-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-sse-2.c += -msse2 -mfpmath=sse

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

* [glibc/azanella/clang] x86: Use -mfpmath=387 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=df8b661e7ebe5a7f133025f9dab3509207587eee

commit df8b661e7ebe5a7f133025f9dab3509207587eee
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:02:05 2022 -0300

    x86: Use -mfpmath=387 iff compiler supports it

Diff:
---
 sysdeps/x86/configure    | 24 ++++++++++++++++++++++++
 sysdeps/x86/configure.ac | 10 ++++++++++
 sysdeps/x86/fpu/Makefile |  5 ++++-
 3 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure
index a2f9a7c2c6..5032c94525 100644
--- a/sysdeps/x86/configure
+++ b/sysdeps/x86/configure
@@ -195,6 +195,30 @@ fi
 config_vars="$config_vars
 enable-x86-isa-level = $libc_cv_include_x86_isa_level"
 
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler supports -mpfmath=387" >&5
+printf %s "checking if compiler supports -mpfmath=387... " >&6; }
+if test ${libc_cv_cc_mfpmath_387+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if { ac_try='${CC-cc} -Werror -mfpmath=387 -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_mfpmath_387="-mfpmath=387"
+else $as_nop
+  libc_cv_cc_mfpmath_387=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_mfpmath_387" >&5
+printf "%s\n" "$libc_cv_cc_mfpmath_387" >&6; }
+config_vars="$config_vars
+config-cflags-mfpath-387 = $libc_cv_cc_mfpmath_387"
+
 printf "%s\n" "#define SUPPORT_STATIC_PIE 1" >>confdefs.h
 
 
diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac
index c854bc74ca..9c144e1960 100644
--- a/sysdeps/x86/configure.ac
+++ b/sysdeps/x86/configure.ac
@@ -128,5 +128,15 @@ if test $libc_cv_include_x86_isa_level = yes; then
 fi
 LIBC_CONFIG_VAR([enable-x86-isa-level], [$libc_cv_include_x86_isa_level])
 
+dnl Determine if compiler supports -mfpmath=387
+AC_CACHE_CHECK([if compiler supports -mpfmath=387],
+	       libc_cv_cc_mfpmath_387, [dnl
+LIBC_TRY_CC_OPTION([-Werror -mfpmath=387],
+		   [libc_cv_cc_mfpmath_387="-mfpmath=387"],
+		   [libc_cv_cc_mfpmath_387=])
+])
+LIBC_CONFIG_VAR([config-cflags-mfpath-387],
+		[$libc_cv_cc_mfpmath_387])
+
 dnl Static PIE is supported.
 AC_DEFINE(SUPPORT_STATIC_PIE)
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 68bd42cdd3..2d584dbfeb 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -4,7 +4,10 @@ CPPFLAGS += -I../soft-fp
 
 libm-support += powl_helper
 tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
-	 test-flt-eval-method-387 test-flt-eval-method-sse
+	 test-flt-eval-method-sse
+ifneq ($(config-cflags-mfpath-387),)
+tests += test-flt-eval-method-387
+endif
 CFLAGS-test-fenv-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-clear-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-sse-2.c += -msse2 -mfpmath=sse

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

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

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

commit 8d1354dfa05a87cc4e21c2c0b18c53016a8a6fde
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:02:05 2022 -0300

    x86: Use -mfpmath=387 iff compiler supports it

Diff:
---
 sysdeps/x86/configure    | 24 ++++++++++++++++++++++++
 sysdeps/x86/configure.ac | 10 ++++++++++
 sysdeps/x86/fpu/Makefile |  5 ++++-
 3 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure
index a2f9a7c2c6..5032c94525 100644
--- a/sysdeps/x86/configure
+++ b/sysdeps/x86/configure
@@ -195,6 +195,30 @@ fi
 config_vars="$config_vars
 enable-x86-isa-level = $libc_cv_include_x86_isa_level"
 
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler supports -mpfmath=387" >&5
+printf %s "checking if compiler supports -mpfmath=387... " >&6; }
+if test ${libc_cv_cc_mfpmath_387+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if { ac_try='${CC-cc} -Werror -mfpmath=387 -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_mfpmath_387="-mfpmath=387"
+else $as_nop
+  libc_cv_cc_mfpmath_387=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_mfpmath_387" >&5
+printf "%s\n" "$libc_cv_cc_mfpmath_387" >&6; }
+config_vars="$config_vars
+config-cflags-mfpath-387 = $libc_cv_cc_mfpmath_387"
+
 printf "%s\n" "#define SUPPORT_STATIC_PIE 1" >>confdefs.h
 
 
diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac
index c854bc74ca..9c144e1960 100644
--- a/sysdeps/x86/configure.ac
+++ b/sysdeps/x86/configure.ac
@@ -128,5 +128,15 @@ if test $libc_cv_include_x86_isa_level = yes; then
 fi
 LIBC_CONFIG_VAR([enable-x86-isa-level], [$libc_cv_include_x86_isa_level])
 
+dnl Determine if compiler supports -mfpmath=387
+AC_CACHE_CHECK([if compiler supports -mpfmath=387],
+	       libc_cv_cc_mfpmath_387, [dnl
+LIBC_TRY_CC_OPTION([-Werror -mfpmath=387],
+		   [libc_cv_cc_mfpmath_387="-mfpmath=387"],
+		   [libc_cv_cc_mfpmath_387=])
+])
+LIBC_CONFIG_VAR([config-cflags-mfpath-387],
+		[$libc_cv_cc_mfpmath_387])
+
 dnl Static PIE is supported.
 AC_DEFINE(SUPPORT_STATIC_PIE)
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 68bd42cdd3..2d584dbfeb 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -4,7 +4,10 @@ CPPFLAGS += -I../soft-fp
 
 libm-support += powl_helper
 tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
-	 test-flt-eval-method-387 test-flt-eval-method-sse
+	 test-flt-eval-method-sse
+ifneq ($(config-cflags-mfpath-387),)
+tests += test-flt-eval-method-387
+endif
 CFLAGS-test-fenv-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-clear-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-sse-2.c += -msse2 -mfpmath=sse

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

* [glibc/azanella/clang] x86: Use -mfpmath=387 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=a702538681a3b9e007bfb8008ab2c0b63418721d

commit a702538681a3b9e007bfb8008ab2c0b63418721d
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:02:05 2022 -0300

    x86: Use -mfpmath=387 iff compiler supports it

Diff:
---
 sysdeps/x86/configure    | 24 ++++++++++++++++++++++++
 sysdeps/x86/configure.ac | 10 ++++++++++
 sysdeps/x86/fpu/Makefile |  5 ++++-
 3 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure
index a2f9a7c2c6..5032c94525 100644
--- a/sysdeps/x86/configure
+++ b/sysdeps/x86/configure
@@ -195,6 +195,30 @@ fi
 config_vars="$config_vars
 enable-x86-isa-level = $libc_cv_include_x86_isa_level"
 
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler supports -mpfmath=387" >&5
+printf %s "checking if compiler supports -mpfmath=387... " >&6; }
+if test ${libc_cv_cc_mfpmath_387+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if { ac_try='${CC-cc} -Werror -mfpmath=387 -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_mfpmath_387="-mfpmath=387"
+else $as_nop
+  libc_cv_cc_mfpmath_387=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_mfpmath_387" >&5
+printf "%s\n" "$libc_cv_cc_mfpmath_387" >&6; }
+config_vars="$config_vars
+config-cflags-mfpath-387 = $libc_cv_cc_mfpmath_387"
+
 printf "%s\n" "#define SUPPORT_STATIC_PIE 1" >>confdefs.h
 
 
diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac
index c854bc74ca..9c144e1960 100644
--- a/sysdeps/x86/configure.ac
+++ b/sysdeps/x86/configure.ac
@@ -128,5 +128,15 @@ if test $libc_cv_include_x86_isa_level = yes; then
 fi
 LIBC_CONFIG_VAR([enable-x86-isa-level], [$libc_cv_include_x86_isa_level])
 
+dnl Determine if compiler supports -mfpmath=387
+AC_CACHE_CHECK([if compiler supports -mpfmath=387],
+	       libc_cv_cc_mfpmath_387, [dnl
+LIBC_TRY_CC_OPTION([-Werror -mfpmath=387],
+		   [libc_cv_cc_mfpmath_387="-mfpmath=387"],
+		   [libc_cv_cc_mfpmath_387=])
+])
+LIBC_CONFIG_VAR([config-cflags-mfpath-387],
+		[$libc_cv_cc_mfpmath_387])
+
 dnl Static PIE is supported.
 AC_DEFINE(SUPPORT_STATIC_PIE)
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 68bd42cdd3..2d584dbfeb 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -4,7 +4,10 @@ CPPFLAGS += -I../soft-fp
 
 libm-support += powl_helper
 tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
-	 test-flt-eval-method-387 test-flt-eval-method-sse
+	 test-flt-eval-method-sse
+ifneq ($(config-cflags-mfpath-387),)
+tests += test-flt-eval-method-387
+endif
 CFLAGS-test-fenv-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-clear-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-sse-2.c += -msse2 -mfpmath=sse

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

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

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

commit ecb1339a4e13daf9bffb6517e0e84fde81db8741
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:02:05 2022 -0300

    x86: Use -mfpmath=387 iff compiler supports it

Diff:
---
 sysdeps/x86/configure    | 22 ++++++++++++++++++++++
 sysdeps/x86/configure.ac | 10 ++++++++++
 sysdeps/x86/fpu/Makefile |  5 ++++-
 3 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure
index 6135b17652..bc270a36f3 100644
--- a/sysdeps/x86/configure
+++ b/sysdeps/x86/configure
@@ -190,5 +190,27 @@ fi
 config_vars="$config_vars
 enable-x86-isa-level = $libc_cv_include_x86_isa_level"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -mpfmath=387" >&5
+$as_echo_n "checking if compiler supports -mpfmath=387... " >&6; }
+if ${libc_cv_cc_mfpmath_387+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -mfpmath=387 -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_mfpmath_387="-mfpmath=387"
+else
+  libc_cv_cc_mfpmath_387=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_mfpmath_387" >&5
+$as_echo "$libc_cv_cc_mfpmath_387" >&6; }
+config_vars="$config_vars
+config-cflags-mfpath-387 = $libc_cv_cc_mfpmath_387"
+
 $as_echo "#define SUPPORT_STATIC_PIE 1" >>confdefs.h
 
diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac
index c854bc74ca..9c144e1960 100644
--- a/sysdeps/x86/configure.ac
+++ b/sysdeps/x86/configure.ac
@@ -128,5 +128,15 @@ if test $libc_cv_include_x86_isa_level = yes; then
 fi
 LIBC_CONFIG_VAR([enable-x86-isa-level], [$libc_cv_include_x86_isa_level])
 
+dnl Determine if compiler supports -mfpmath=387
+AC_CACHE_CHECK([if compiler supports -mpfmath=387],
+	       libc_cv_cc_mfpmath_387, [dnl
+LIBC_TRY_CC_OPTION([-Werror -mfpmath=387],
+		   [libc_cv_cc_mfpmath_387="-mfpmath=387"],
+		   [libc_cv_cc_mfpmath_387=])
+])
+LIBC_CONFIG_VAR([config-cflags-mfpath-387],
+		[$libc_cv_cc_mfpmath_387])
+
 dnl Static PIE is supported.
 AC_DEFINE(SUPPORT_STATIC_PIE)
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 68bd42cdd3..2d584dbfeb 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -4,7 +4,10 @@ CPPFLAGS += -I../soft-fp
 
 libm-support += powl_helper
 tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
-	 test-flt-eval-method-387 test-flt-eval-method-sse
+	 test-flt-eval-method-sse
+ifneq ($(config-cflags-mfpath-387),)
+tests += test-flt-eval-method-387
+endif
 CFLAGS-test-fenv-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-clear-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-sse-2.c += -msse2 -mfpmath=sse

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

* [glibc/azanella/clang] x86: Use -mfpmath=387 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=55655233d7022ee0a1ae5cd73896f3b27bf1701f

commit 55655233d7022ee0a1ae5cd73896f3b27bf1701f
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:02:05 2022 -0300

    x86: Use -mfpmath=387 iff compiler supports it

Diff:
---
 sysdeps/x86/configure    | 22 ++++++++++++++++++++++
 sysdeps/x86/configure.ac | 10 ++++++++++
 sysdeps/x86/fpu/Makefile |  5 ++++-
 3 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure
index af6ac34b5b..a4a192a55d 100644
--- a/sysdeps/x86/configure
+++ b/sysdeps/x86/configure
@@ -190,5 +190,27 @@ fi
 config_vars="$config_vars
 enable-x86-isa-level = $libc_cv_include_x86_isa_level"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -mpfmath=387" >&5
+$as_echo_n "checking if compiler supports -mpfmath=387... " >&6; }
+if ${libc_cv_cc_mfpmath_387+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -mfpmath=387 -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_mfpmath_387="-mfpmath=387"
+else
+  libc_cv_cc_mfpmath_387=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_mfpmath_387" >&5
+$as_echo "$libc_cv_cc_mfpmath_387" >&6; }
+config_vars="$config_vars
+config-cflags-mfpath-387 = $libc_cv_cc_mfpmath_387"
+
 $as_echo "#define SUPPORT_STATIC_PIE 1" >>confdefs.h
 
diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac
index 4e2a6d68ff..022ace0dd5 100644
--- a/sysdeps/x86/configure.ac
+++ b/sysdeps/x86/configure.ac
@@ -128,5 +128,15 @@ if test $libc_cv_include_x86_isa_level = yes; then
 fi
 LIBC_CONFIG_VAR([enable-x86-isa-level], [$libc_cv_include_x86_isa_level])
 
+dnl Determine if compiler supports -mfpmath=387
+AC_CACHE_CHECK([if compiler supports -mpfmath=387],
+	       libc_cv_cc_mfpmath_387, [dnl
+LIBC_TRY_CC_OPTION([-Werror -mfpmath=387],
+		   [libc_cv_cc_mfpmath_387="-mfpmath=387"],
+		   [libc_cv_cc_mfpmath_387=])
+])
+LIBC_CONFIG_VAR([config-cflags-mfpath-387],
+		[$libc_cv_cc_mfpmath_387])
+
 dnl Static PIE is supported.
 AC_DEFINE(SUPPORT_STATIC_PIE)
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 68bd42cdd3..2d584dbfeb 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -4,7 +4,10 @@ CPPFLAGS += -I../soft-fp
 
 libm-support += powl_helper
 tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
-	 test-flt-eval-method-387 test-flt-eval-method-sse
+	 test-flt-eval-method-sse
+ifneq ($(config-cflags-mfpath-387),)
+tests += test-flt-eval-method-387
+endif
 CFLAGS-test-fenv-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-clear-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-sse-2.c += -msse2 -mfpmath=sse

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

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

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

commit 75e560f0d442bc14a5d0a498f7e8120cdc005f31
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:02:05 2022 -0300

    x86: Use -mfpmath=387 iff compiler supports it

Diff:
---
 sysdeps/x86/configure    | 22 ++++++++++++++++++++++
 sysdeps/x86/configure.ac | 10 ++++++++++
 sysdeps/x86/fpu/Makefile |  5 ++++-
 3 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure
index af6ac34b5b..a4a192a55d 100644
--- a/sysdeps/x86/configure
+++ b/sysdeps/x86/configure
@@ -190,5 +190,27 @@ fi
 config_vars="$config_vars
 enable-x86-isa-level = $libc_cv_include_x86_isa_level"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -mpfmath=387" >&5
+$as_echo_n "checking if compiler supports -mpfmath=387... " >&6; }
+if ${libc_cv_cc_mfpmath_387+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -mfpmath=387 -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_mfpmath_387="-mfpmath=387"
+else
+  libc_cv_cc_mfpmath_387=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_mfpmath_387" >&5
+$as_echo "$libc_cv_cc_mfpmath_387" >&6; }
+config_vars="$config_vars
+config-cflags-mfpath-387 = $libc_cv_cc_mfpmath_387"
+
 $as_echo "#define SUPPORT_STATIC_PIE 1" >>confdefs.h
 
diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac
index 4e2a6d68ff..022ace0dd5 100644
--- a/sysdeps/x86/configure.ac
+++ b/sysdeps/x86/configure.ac
@@ -128,5 +128,15 @@ if test $libc_cv_include_x86_isa_level = yes; then
 fi
 LIBC_CONFIG_VAR([enable-x86-isa-level], [$libc_cv_include_x86_isa_level])
 
+dnl Determine if compiler supports -mfpmath=387
+AC_CACHE_CHECK([if compiler supports -mpfmath=387],
+	       libc_cv_cc_mfpmath_387, [dnl
+LIBC_TRY_CC_OPTION([-Werror -mfpmath=387],
+		   [libc_cv_cc_mfpmath_387="-mfpmath=387"],
+		   [libc_cv_cc_mfpmath_387=])
+])
+LIBC_CONFIG_VAR([config-cflags-mfpath-387],
+		[$libc_cv_cc_mfpmath_387])
+
 dnl Static PIE is supported.
 AC_DEFINE(SUPPORT_STATIC_PIE)
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 68bd42cdd3..2d584dbfeb 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -4,7 +4,10 @@ CPPFLAGS += -I../soft-fp
 
 libm-support += powl_helper
 tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
-	 test-flt-eval-method-387 test-flt-eval-method-sse
+	 test-flt-eval-method-sse
+ifneq ($(config-cflags-mfpath-387),)
+tests += test-flt-eval-method-387
+endif
 CFLAGS-test-fenv-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-clear-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-sse-2.c += -msse2 -mfpmath=sse

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

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

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

commit 907097b559b7b4e02a26f236bd3591478bb3f729
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:02:05 2022 -0300

    x86: Use -mfpmath=387 iff compiler supports it

Diff:
---
 sysdeps/x86/configure    | 22 ++++++++++++++++++++++
 sysdeps/x86/configure.ac | 10 ++++++++++
 sysdeps/x86/fpu/Makefile |  5 ++++-
 3 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure
index a9c8c2ef67..baa5e40926 100644
--- a/sysdeps/x86/configure
+++ b/sysdeps/x86/configure
@@ -190,5 +190,27 @@ fi
 config_vars="$config_vars
 enable-x86-isa-level = $libc_cv_include_x86_isa_level"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -mpfmath=387" >&5
+$as_echo_n "checking if compiler supports -mpfmath=387... " >&6; }
+if ${libc_cv_cc_mfpmath_387+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -mfpmath=387 -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_mfpmath_387="-mfpmath=387"
+else
+  libc_cv_cc_mfpmath_387=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_mfpmath_387" >&5
+$as_echo "$libc_cv_cc_mfpmath_387" >&6; }
+config_vars="$config_vars
+config-cflags-mfpath-387 = $libc_cv_cc_mfpmath_387"
+
 $as_echo "#define SUPPORT_STATIC_PIE 1" >>confdefs.h
 
diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac
index edd43a2551..47311522ba 100644
--- a/sysdeps/x86/configure.ac
+++ b/sysdeps/x86/configure.ac
@@ -128,5 +128,15 @@ if test $libc_cv_include_x86_isa_level = yes; then
 fi
 LIBC_CONFIG_VAR([enable-x86-isa-level], [$libc_cv_include_x86_isa_level])
 
+dnl Determine if compiler supports -mfpmath=387
+AC_CACHE_CHECK([if compiler supports -mpfmath=387],
+	       libc_cv_cc_mfpmath_387, [dnl
+LIBC_TRY_CC_OPTION([-Werror -mfpmath=387],
+		   [libc_cv_cc_mfpmath_387="-mfpmath=387"],
+		   [libc_cv_cc_mfpmath_387=])
+])
+LIBC_CONFIG_VAR([config-cflags-mfpath-387],
+		[$libc_cv_cc_mfpmath_387])
+
 dnl Static PIE is supported.
 AC_DEFINE(SUPPORT_STATIC_PIE)
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 68bd42cdd3..2d584dbfeb 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -4,7 +4,10 @@ CPPFLAGS += -I../soft-fp
 
 libm-support += powl_helper
 tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
-	 test-flt-eval-method-387 test-flt-eval-method-sse
+	 test-flt-eval-method-sse
+ifneq ($(config-cflags-mfpath-387),)
+tests += test-flt-eval-method-387
+endif
 CFLAGS-test-fenv-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-clear-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-sse-2.c += -msse2 -mfpmath=sse


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

* [glibc/azanella/clang] x86: Use -mfpmath=387 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=907097b559b7b4e02a26f236bd3591478bb3f729

commit 907097b559b7b4e02a26f236bd3591478bb3f729
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:02:05 2022 -0300

    x86: Use -mfpmath=387 iff compiler supports it

Diff:
---
 sysdeps/x86/configure    | 22 ++++++++++++++++++++++
 sysdeps/x86/configure.ac | 10 ++++++++++
 sysdeps/x86/fpu/Makefile |  5 ++++-
 3 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure
index a9c8c2ef67..baa5e40926 100644
--- a/sysdeps/x86/configure
+++ b/sysdeps/x86/configure
@@ -190,5 +190,27 @@ fi
 config_vars="$config_vars
 enable-x86-isa-level = $libc_cv_include_x86_isa_level"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -mpfmath=387" >&5
+$as_echo_n "checking if compiler supports -mpfmath=387... " >&6; }
+if ${libc_cv_cc_mfpmath_387+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -mfpmath=387 -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_mfpmath_387="-mfpmath=387"
+else
+  libc_cv_cc_mfpmath_387=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_mfpmath_387" >&5
+$as_echo "$libc_cv_cc_mfpmath_387" >&6; }
+config_vars="$config_vars
+config-cflags-mfpath-387 = $libc_cv_cc_mfpmath_387"
+
 $as_echo "#define SUPPORT_STATIC_PIE 1" >>confdefs.h
 
diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac
index edd43a2551..47311522ba 100644
--- a/sysdeps/x86/configure.ac
+++ b/sysdeps/x86/configure.ac
@@ -128,5 +128,15 @@ if test $libc_cv_include_x86_isa_level = yes; then
 fi
 LIBC_CONFIG_VAR([enable-x86-isa-level], [$libc_cv_include_x86_isa_level])
 
+dnl Determine if compiler supports -mfpmath=387
+AC_CACHE_CHECK([if compiler supports -mpfmath=387],
+	       libc_cv_cc_mfpmath_387, [dnl
+LIBC_TRY_CC_OPTION([-Werror -mfpmath=387],
+		   [libc_cv_cc_mfpmath_387="-mfpmath=387"],
+		   [libc_cv_cc_mfpmath_387=])
+])
+LIBC_CONFIG_VAR([config-cflags-mfpath-387],
+		[$libc_cv_cc_mfpmath_387])
+
 dnl Static PIE is supported.
 AC_DEFINE(SUPPORT_STATIC_PIE)
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 68bd42cdd3..2d584dbfeb 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -4,7 +4,10 @@ CPPFLAGS += -I../soft-fp
 
 libm-support += powl_helper
 tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
-	 test-flt-eval-method-387 test-flt-eval-method-sse
+	 test-flt-eval-method-sse
+ifneq ($(config-cflags-mfpath-387),)
+tests += test-flt-eval-method-387
+endif
 CFLAGS-test-fenv-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-clear-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-sse-2.c += -msse2 -mfpmath=sse


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

* [glibc/azanella/clang] x86: Use -mfpmath=387 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=0901deff437429c140ed31f9d51a9c4d2ff49baf

commit 0901deff437429c140ed31f9d51a9c4d2ff49baf
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:02:05 2022 -0300

    x86: Use -mfpmath=387 iff compiler supports it

Diff:
---
 sysdeps/x86/configure    | 22 ++++++++++++++++++++++
 sysdeps/x86/configure.ac | 10 ++++++++++
 sysdeps/x86/fpu/Makefile |  5 ++++-
 3 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure
index a9c8c2ef67..baa5e40926 100644
--- a/sysdeps/x86/configure
+++ b/sysdeps/x86/configure
@@ -190,5 +190,27 @@ fi
 config_vars="$config_vars
 enable-x86-isa-level = $libc_cv_include_x86_isa_level"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -mpfmath=387" >&5
+$as_echo_n "checking if compiler supports -mpfmath=387... " >&6; }
+if ${libc_cv_cc_mfpmath_387+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -mfpmath=387 -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_mfpmath_387="-mfpmath=387"
+else
+  libc_cv_cc_mfpmath_387=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_mfpmath_387" >&5
+$as_echo "$libc_cv_cc_mfpmath_387" >&6; }
+config_vars="$config_vars
+config-cflags-mfpath-387 = $libc_cv_cc_mfpmath_387"
+
 $as_echo "#define SUPPORT_STATIC_PIE 1" >>confdefs.h
 
diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac
index edd43a2551..47311522ba 100644
--- a/sysdeps/x86/configure.ac
+++ b/sysdeps/x86/configure.ac
@@ -128,5 +128,15 @@ if test $libc_cv_include_x86_isa_level = yes; then
 fi
 LIBC_CONFIG_VAR([enable-x86-isa-level], [$libc_cv_include_x86_isa_level])
 
+dnl Determine if compiler supports -mfpmath=387
+AC_CACHE_CHECK([if compiler supports -mpfmath=387],
+	       libc_cv_cc_mfpmath_387, [dnl
+LIBC_TRY_CC_OPTION([-Werror -mfpmath=387],
+		   [libc_cv_cc_mfpmath_387="-mfpmath=387"],
+		   [libc_cv_cc_mfpmath_387=])
+])
+LIBC_CONFIG_VAR([config-cflags-mfpath-387],
+		[$libc_cv_cc_mfpmath_387])
+
 dnl Static PIE is supported.
 AC_DEFINE(SUPPORT_STATIC_PIE)
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 68bd42cdd3..2d584dbfeb 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -4,7 +4,10 @@ CPPFLAGS += -I../soft-fp
 
 libm-support += powl_helper
 tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
-	 test-flt-eval-method-387 test-flt-eval-method-sse
+	 test-flt-eval-method-sse
+ifneq ($(config-cflags-mfpath-387),)
+tests += test-flt-eval-method-387
+endif
 CFLAGS-test-fenv-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-clear-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-sse-2.c += -msse2 -mfpmath=sse


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

* [glibc/azanella/clang] x86: Use -mfpmath=387 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=00cf8f37db6f139e1f26e52b9b733b9d448658c4

commit 00cf8f37db6f139e1f26e52b9b733b9d448658c4
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:02:05 2022 -0300

    x86: Use -mfpmath=387 iff compiler supports it

Diff:
---
 sysdeps/x86/configure    | 22 ++++++++++++++++++++++
 sysdeps/x86/configure.ac | 10 ++++++++++
 sysdeps/x86/fpu/Makefile |  5 ++++-
 3 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure
index a9c8c2ef67..baa5e40926 100644
--- a/sysdeps/x86/configure
+++ b/sysdeps/x86/configure
@@ -190,5 +190,27 @@ fi
 config_vars="$config_vars
 enable-x86-isa-level = $libc_cv_include_x86_isa_level"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -mpfmath=387" >&5
+$as_echo_n "checking if compiler supports -mpfmath=387... " >&6; }
+if ${libc_cv_cc_mfpmath_387+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -mfpmath=387 -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_mfpmath_387="-mfpmath=387"
+else
+  libc_cv_cc_mfpmath_387=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_mfpmath_387" >&5
+$as_echo "$libc_cv_cc_mfpmath_387" >&6; }
+config_vars="$config_vars
+config-cflags-mfpath-387 = $libc_cv_cc_mfpmath_387"
+
 $as_echo "#define SUPPORT_STATIC_PIE 1" >>confdefs.h
 
diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac
index edd43a2551..47311522ba 100644
--- a/sysdeps/x86/configure.ac
+++ b/sysdeps/x86/configure.ac
@@ -128,5 +128,15 @@ if test $libc_cv_include_x86_isa_level = yes; then
 fi
 LIBC_CONFIG_VAR([enable-x86-isa-level], [$libc_cv_include_x86_isa_level])
 
+dnl Determine if compiler supports -mfpmath=387
+AC_CACHE_CHECK([if compiler supports -mpfmath=387],
+	       libc_cv_cc_mfpmath_387, [dnl
+LIBC_TRY_CC_OPTION([-Werror -mfpmath=387],
+		   [libc_cv_cc_mfpmath_387="-mfpmath=387"],
+		   [libc_cv_cc_mfpmath_387=])
+])
+LIBC_CONFIG_VAR([config-cflags-mfpath-387],
+		[$libc_cv_cc_mfpmath_387])
+
 dnl Static PIE is supported.
 AC_DEFINE(SUPPORT_STATIC_PIE)
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 68bd42cdd3..2d584dbfeb 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -4,7 +4,10 @@ CPPFLAGS += -I../soft-fp
 
 libm-support += powl_helper
 tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
-	 test-flt-eval-method-387 test-flt-eval-method-sse
+	 test-flt-eval-method-sse
+ifneq ($(config-cflags-mfpath-387),)
+tests += test-flt-eval-method-387
+endif
 CFLAGS-test-fenv-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-clear-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-sse-2.c += -msse2 -mfpmath=sse


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

* [glibc/azanella/clang] x86: Use -mfpmath=387 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=5a088f8300017a84e8844a1cc68e06a98965e117

commit 5a088f8300017a84e8844a1cc68e06a98965e117
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:02:05 2022 -0300

    x86: Use -mfpmath=387 iff compiler supports it

Diff:
---
 sysdeps/x86/configure    | 22 ++++++++++++++++++++++
 sysdeps/x86/configure.ac | 10 ++++++++++
 sysdeps/x86/fpu/Makefile |  5 ++++-
 3 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure
index a9c8c2ef67..baa5e40926 100644
--- a/sysdeps/x86/configure
+++ b/sysdeps/x86/configure
@@ -190,5 +190,27 @@ fi
 config_vars="$config_vars
 enable-x86-isa-level = $libc_cv_include_x86_isa_level"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -mpfmath=387" >&5
+$as_echo_n "checking if compiler supports -mpfmath=387... " >&6; }
+if ${libc_cv_cc_mfpmath_387+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -mfpmath=387 -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_mfpmath_387="-mfpmath=387"
+else
+  libc_cv_cc_mfpmath_387=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_mfpmath_387" >&5
+$as_echo "$libc_cv_cc_mfpmath_387" >&6; }
+config_vars="$config_vars
+config-cflags-mfpath-387 = $libc_cv_cc_mfpmath_387"
+
 $as_echo "#define SUPPORT_STATIC_PIE 1" >>confdefs.h
 
diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac
index edd43a2551..47311522ba 100644
--- a/sysdeps/x86/configure.ac
+++ b/sysdeps/x86/configure.ac
@@ -128,5 +128,15 @@ if test $libc_cv_include_x86_isa_level = yes; then
 fi
 LIBC_CONFIG_VAR([enable-x86-isa-level], [$libc_cv_include_x86_isa_level])
 
+dnl Determine if compiler supports -mfpmath=387
+AC_CACHE_CHECK([if compiler supports -mpfmath=387],
+	       libc_cv_cc_mfpmath_387, [dnl
+LIBC_TRY_CC_OPTION([-Werror -mfpmath=387],
+		   [libc_cv_cc_mfpmath_387="-mfpmath=387"],
+		   [libc_cv_cc_mfpmath_387=])
+])
+LIBC_CONFIG_VAR([config-cflags-mfpath-387],
+		[$libc_cv_cc_mfpmath_387])
+
 dnl Static PIE is supported.
 AC_DEFINE(SUPPORT_STATIC_PIE)
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 68bd42cdd3..2d584dbfeb 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -4,7 +4,10 @@ CPPFLAGS += -I../soft-fp
 
 libm-support += powl_helper
 tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
-	 test-flt-eval-method-387 test-flt-eval-method-sse
+	 test-flt-eval-method-sse
+ifneq ($(config-cflags-mfpath-387),)
+tests += test-flt-eval-method-387
+endif
 CFLAGS-test-fenv-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-clear-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-sse-2.c += -msse2 -mfpmath=sse


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

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

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

commit 4d7488a17f872354a5279b7c4397066d29784639
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:02:05 2022 -0300

    x86: Use -mfpmath=387 iff compiler supports it

Diff:
---
 sysdeps/x86/configure    | 22 ++++++++++++++++++++++
 sysdeps/x86/configure.ac | 10 ++++++++++
 sysdeps/x86/fpu/Makefile |  5 ++++-
 3 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure
index a9c8c2ef67..baa5e40926 100644
--- a/sysdeps/x86/configure
+++ b/sysdeps/x86/configure
@@ -190,5 +190,27 @@ fi
 config_vars="$config_vars
 enable-x86-isa-level = $libc_cv_include_x86_isa_level"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -mpfmath=387" >&5
+$as_echo_n "checking if compiler supports -mpfmath=387... " >&6; }
+if ${libc_cv_cc_mfpmath_387+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -mfpmath=387 -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_mfpmath_387="-mfpmath=387"
+else
+  libc_cv_cc_mfpmath_387=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_mfpmath_387" >&5
+$as_echo "$libc_cv_cc_mfpmath_387" >&6; }
+config_vars="$config_vars
+config-cflags-mfpath-387 = $libc_cv_cc_mfpmath_387"
+
 $as_echo "#define SUPPORT_STATIC_PIE 1" >>confdefs.h
 
diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac
index edd43a2551..47311522ba 100644
--- a/sysdeps/x86/configure.ac
+++ b/sysdeps/x86/configure.ac
@@ -128,5 +128,15 @@ if test $libc_cv_include_x86_isa_level = yes; then
 fi
 LIBC_CONFIG_VAR([enable-x86-isa-level], [$libc_cv_include_x86_isa_level])
 
+dnl Determine if compiler supports -mfpmath=387
+AC_CACHE_CHECK([if compiler supports -mpfmath=387],
+	       libc_cv_cc_mfpmath_387, [dnl
+LIBC_TRY_CC_OPTION([-Werror -mfpmath=387],
+		   [libc_cv_cc_mfpmath_387="-mfpmath=387"],
+		   [libc_cv_cc_mfpmath_387=])
+])
+LIBC_CONFIG_VAR([config-cflags-mfpath-387],
+		[$libc_cv_cc_mfpmath_387])
+
 dnl Static PIE is supported.
 AC_DEFINE(SUPPORT_STATIC_PIE)
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 68bd42cdd3..2d584dbfeb 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -4,7 +4,10 @@ CPPFLAGS += -I../soft-fp
 
 libm-support += powl_helper
 tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
-	 test-flt-eval-method-387 test-flt-eval-method-sse
+	 test-flt-eval-method-sse
+ifneq ($(config-cflags-mfpath-387),)
+tests += test-flt-eval-method-387
+endif
 CFLAGS-test-fenv-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-clear-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-sse-2.c += -msse2 -mfpmath=sse


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

* [glibc/azanella/clang] x86: Use -mfpmath=387 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=5874d51185b4084908766be8e033d8ae8bf7a3b2

commit 5874d51185b4084908766be8e033d8ae8bf7a3b2
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:02:05 2022 -0300

    x86: Use -mfpmath=387 iff compiler supports it

Diff:
---
 sysdeps/x86/configure    | 22 ++++++++++++++++++++++
 sysdeps/x86/configure.ac | 10 ++++++++++
 sysdeps/x86/fpu/Makefile |  5 ++++-
 3 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure
index a9c8c2ef67..baa5e40926 100644
--- a/sysdeps/x86/configure
+++ b/sysdeps/x86/configure
@@ -190,5 +190,27 @@ fi
 config_vars="$config_vars
 enable-x86-isa-level = $libc_cv_include_x86_isa_level"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -mpfmath=387" >&5
+$as_echo_n "checking if compiler supports -mpfmath=387... " >&6; }
+if ${libc_cv_cc_mfpmath_387+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -mfpmath=387 -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_mfpmath_387="-mfpmath=387"
+else
+  libc_cv_cc_mfpmath_387=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_mfpmath_387" >&5
+$as_echo "$libc_cv_cc_mfpmath_387" >&6; }
+config_vars="$config_vars
+config-cflags-mfpath-387 = $libc_cv_cc_mfpmath_387"
+
 $as_echo "#define SUPPORT_STATIC_PIE 1" >>confdefs.h
 
diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac
index edd43a2551..47311522ba 100644
--- a/sysdeps/x86/configure.ac
+++ b/sysdeps/x86/configure.ac
@@ -128,5 +128,15 @@ if test $libc_cv_include_x86_isa_level = yes; then
 fi
 LIBC_CONFIG_VAR([enable-x86-isa-level], [$libc_cv_include_x86_isa_level])
 
+dnl Determine if compiler supports -mfpmath=387
+AC_CACHE_CHECK([if compiler supports -mpfmath=387],
+	       libc_cv_cc_mfpmath_387, [dnl
+LIBC_TRY_CC_OPTION([-Werror -mfpmath=387],
+		   [libc_cv_cc_mfpmath_387="-mfpmath=387"],
+		   [libc_cv_cc_mfpmath_387=])
+])
+LIBC_CONFIG_VAR([config-cflags-mfpath-387],
+		[$libc_cv_cc_mfpmath_387])
+
 dnl Static PIE is supported.
 AC_DEFINE(SUPPORT_STATIC_PIE)
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 68bd42cdd3..2d584dbfeb 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -4,7 +4,10 @@ CPPFLAGS += -I../soft-fp
 
 libm-support += powl_helper
 tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
-	 test-flt-eval-method-387 test-flt-eval-method-sse
+	 test-flt-eval-method-sse
+ifneq ($(config-cflags-mfpath-387),)
+tests += test-flt-eval-method-387
+endif
 CFLAGS-test-fenv-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-clear-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-sse-2.c += -msse2 -mfpmath=sse


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

* [glibc/azanella/clang] x86: Use -mfpmath=387 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=56468a072f7019caa423fca8ff0a57f65938ec66

commit 56468a072f7019caa423fca8ff0a57f65938ec66
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:02:05 2022 -0300

    x86: Use -mfpmath=387 iff compiler supports it

Diff:
---
 sysdeps/x86/configure    | 22 ++++++++++++++++++++++
 sysdeps/x86/configure.ac | 10 ++++++++++
 sysdeps/x86/fpu/Makefile |  5 ++++-
 3 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure
index 46d436fddf..26296b0aea 100644
--- a/sysdeps/x86/configure
+++ b/sysdeps/x86/configure
@@ -190,6 +190,28 @@ fi
 config_vars="$config_vars
 enable-x86-isa-level = $libc_cv_include_x86_isa_level"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -mpfmath=387" >&5
+$as_echo_n "checking if compiler supports -mpfmath=387... " >&6; }
+if ${libc_cv_cc_mfpmath_387+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -mfpmath=387 -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_mfpmath_387="-mfpmath=387"
+else
+  libc_cv_cc_mfpmath_387=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_mfpmath_387" >&5
+$as_echo "$libc_cv_cc_mfpmath_387" >&6; }
+config_vars="$config_vars
+config-cflags-mfpath-387 = $libc_cv_cc_mfpmath_387"
+
 $as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
 
 
diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac
index 918b636891..8c2970864a 100644
--- a/sysdeps/x86/configure.ac
+++ b/sysdeps/x86/configure.ac
@@ -128,6 +128,16 @@ if test $libc_cv_include_x86_isa_level = yes; then
 fi
 LIBC_CONFIG_VAR([enable-x86-isa-level], [$libc_cv_include_x86_isa_level])
 
+dnl Determine if compiler supports -mfpmath=387
+AC_CACHE_CHECK([if compiler supports -mpfmath=387],
+	       libc_cv_cc_mfpmath_387, [dnl
+LIBC_TRY_CC_OPTION([-Werror -mfpmath=387],
+		   [libc_cv_cc_mfpmath_387="-mfpmath=387"],
+		   [libc_cv_cc_mfpmath_387=])
+])
+LIBC_CONFIG_VAR([config-cflags-mfpath-387],
+		[$libc_cv_cc_mfpmath_387])
+
 dnl It is always possible to access static and hidden symbols in an
 dnl position independent way.
 AC_DEFINE(PI_STATIC_AND_HIDDEN)
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 68bd42cdd3..2d584dbfeb 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -4,7 +4,10 @@ CPPFLAGS += -I../soft-fp
 
 libm-support += powl_helper
 tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
-	 test-flt-eval-method-387 test-flt-eval-method-sse
+	 test-flt-eval-method-sse
+ifneq ($(config-cflags-mfpath-387),)
+tests += test-flt-eval-method-387
+endif
 CFLAGS-test-fenv-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-clear-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-sse-2.c += -msse2 -mfpmath=sse


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

* [glibc/azanella/clang] x86: Use -mfpmath=387 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=3209c25fd301f5e74a3c2687af628e823a83c221

commit 3209c25fd301f5e74a3c2687af628e823a83c221
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 24 15:02:05 2022 -0300

    x86: Use -mfpmath=387 iff compiler supports it

Diff:
---
 sysdeps/x86/configure    | 22 ++++++++++++++++++++++
 sysdeps/x86/configure.ac | 10 ++++++++++
 sysdeps/x86/fpu/Makefile |  5 ++++-
 3 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure
index 46d436fddf..26296b0aea 100644
--- a/sysdeps/x86/configure
+++ b/sysdeps/x86/configure
@@ -190,6 +190,28 @@ fi
 config_vars="$config_vars
 enable-x86-isa-level = $libc_cv_include_x86_isa_level"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -mpfmath=387" >&5
+$as_echo_n "checking if compiler supports -mpfmath=387... " >&6; }
+if ${libc_cv_cc_mfpmath_387+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -Werror -mfpmath=387 -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_mfpmath_387="-mfpmath=387"
+else
+  libc_cv_cc_mfpmath_387=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_mfpmath_387" >&5
+$as_echo "$libc_cv_cc_mfpmath_387" >&6; }
+config_vars="$config_vars
+config-cflags-mfpath-387 = $libc_cv_cc_mfpmath_387"
+
 $as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
 
 
diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac
index 918b636891..8c2970864a 100644
--- a/sysdeps/x86/configure.ac
+++ b/sysdeps/x86/configure.ac
@@ -128,6 +128,16 @@ if test $libc_cv_include_x86_isa_level = yes; then
 fi
 LIBC_CONFIG_VAR([enable-x86-isa-level], [$libc_cv_include_x86_isa_level])
 
+dnl Determine if compiler supports -mfpmath=387
+AC_CACHE_CHECK([if compiler supports -mpfmath=387],
+	       libc_cv_cc_mfpmath_387, [dnl
+LIBC_TRY_CC_OPTION([-Werror -mfpmath=387],
+		   [libc_cv_cc_mfpmath_387="-mfpmath=387"],
+		   [libc_cv_cc_mfpmath_387=])
+])
+LIBC_CONFIG_VAR([config-cflags-mfpath-387],
+		[$libc_cv_cc_mfpmath_387])
+
 dnl It is always possible to access static and hidden symbols in an
 dnl position independent way.
 AC_DEFINE(PI_STATIC_AND_HIDDEN)
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 68bd42cdd3..2d584dbfeb 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -4,7 +4,10 @@ CPPFLAGS += -I../soft-fp
 
 libm-support += powl_helper
 tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
-	 test-flt-eval-method-387 test-flt-eval-method-sse
+	 test-flt-eval-method-sse
+ifneq ($(config-cflags-mfpath-387),)
+tests += test-flt-eval-method-387
+endif
 CFLAGS-test-fenv-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-clear-sse.c += -msse2 -mfpmath=sse
 CFLAGS-test-fenv-sse-2.c += -msse2 -mfpmath=sse


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

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

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-04 12:56 [glibc/azanella/clang] x86: Use -mfpmath=387 iff compiler supports it Adhemerval Zanella
  -- strict thread matches above, loose matches on Subject: below --
2024-04-17 20:09 Adhemerval Zanella
2024-04-02 15:55 Adhemerval Zanella
2024-02-09 17:33 Adhemerval Zanella
2024-02-07 14:09 Adhemerval Zanella
2024-01-29 17:59 Adhemerval Zanella
2023-12-21 18:55 Adhemerval Zanella
2023-09-28 17:54 Adhemerval Zanella
2023-08-30 12:38 Adhemerval Zanella
2023-02-09 19:50 Adhemerval Zanella
2022-10-28 17:43 Adhemerval Zanella
2022-10-04 13:01 Adhemerval Zanella
2022-06-09 21:22 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:26 Adhemerval Zanella
2022-04-29 14:05 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).