public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/clang] math: Use -fexcess-precision=standard iff compiler supports it
@ 2022-06-09 13:16 Adhemerval Zanella
0 siblings, 0 replies; 24+ messages in thread
From: Adhemerval Zanella @ 2022-06-09 13:16 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8a38782e63d651d130d04560df23a92e35c9277f
commit 8a38782e63d651d130d04560df23a92e35c9277f
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Mar 10 17:22:41 2022 -0300
math: Use -fexcess-precision=standard iff compiler supports it
Diff:
---
configure | 22 ++++++++++++++++++++++
configure.ac | 8 ++++++++
math/Makefile | 16 +++++++++++++---
support/Makefile | 4 ++--
sysdeps/x86/fpu/Makefile | 4 ++--
5 files changed, 47 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index 48f24a6f9d..94f9e082ed 100755
--- a/configure
+++ b/configure
@@ -6279,6 +6279,28 @@ $as_echo "$libc_cv_wno_maybe_uninitialized" >&6; }
config_vars="$config_vars
config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fexcess-precision=standard" >&5
+$as_echo_n "checking for -fexcess-precision=standard... " >&6; }
+if ${libc_cv_fexcess_precision_standard+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if { ac_try='${CC-cc} -Werror -fexcess-precision=standard -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_fexcess_precision_standard=-fexcess-precision=standard
+else
+ libc_cv_fexcess_precision_standard=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_fexcess_precision_standard" >&5
+$as_echo "$libc_cv_fexcess_precision_standard" >&6; }
+config_vars="$config_vars
+config-cflags-fexcess-precision-standard = $libc_cv_fexcess_precision_standard"
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5
$as_echo_n "checking whether cc puts quotes around section names... " >&6; }
if ${libc_cv_have_section_quotes+:} false; then :
diff --git a/configure.ac b/configure.ac
index bebf3e3bf1..712cbaaaf5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1411,6 +1411,14 @@ AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized,
LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
[$libc_cv_wno_maybe_uninitialized])
+AC_CACHE_CHECK([for -fexcess-precision=standard], libc_cv_fexcess_precision_standard, [dnl
+ LIBC_TRY_CC_OPTION([-Werror -fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=-fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=])
+])
+LIBC_CONFIG_VAR([config-cflags-fexcess-precision-standard],
+ [$libc_cv_fexcess_precision_standard])
+
AC_CACHE_CHECK(whether cc puts quotes around section names,
libc_cv_have_section_quotes,
[cat > conftest.c <<EOF
diff --git a/math/Makefile b/math/Makefile
index 71708f5542..f4ded1586d 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -455,9 +455,9 @@ CFLAGS-test-math-iszero.cc += -std=gnu++11
CFLAGS-test-math-issignaling.cc += -std=gnu++11
CFLAGS-test-math-iscanonical.cc += -std=gnu++11
-CFLAGS-test-iszero-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-iseqsig-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-flt-eval-method.c += -fexcess-precision=standard
+CFLAGS-test-iszero-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-iseqsig-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-flt-eval-method.c += $(config-cflags-fexcess-precision-standard)
CFLAGS-test-fe-snans-always-signal.c += $(config-cflags-signaling-nans)
@@ -776,6 +776,16 @@ CFLAGS-s_modff.c += $(config-cflags-signaling-nans)
CFLAGS-s_modfl.c += $(config-cflags-signaling-nans)
CFLAGS-s_modff128.c += $(config-cflags-signaling-nans)
+CFLAGS-s_llround.c += -Wno-incompatible-library-redeclaration
+CFLAGS-s_fabsl.c += -Wno-ignored-attributes
+CFLAGS-s_fabsf128.c += -Wno-ignored-attributes
+CFLAGS-fraiseexcpt.c += -Wno-ignored-attributes
+CFLAGS-fegetround.c += -Wno-ignored-attributes
+CFLAGS-fesetround.c += -Wno-ignored-attributes
+CFLAGS-fegetenv.c += -Wno-ignored-attributes
+CFLAGS-fesetenv.c += -Wno-ignored-attributes
+CFLAGS-feholdexcpt.c += -Wno-ignored-attributes
+
$(addprefix $(objpfx),\
$(filter-out $(tests-static) $(libm-tests-vector),\
$(tests) $(tests-internal))): $(libm)
diff --git a/support/Makefile b/support/Makefile
index 9b50eac117..f78e65a53f 100644
--- a/support/Makefile
+++ b/support/Makefile
@@ -234,8 +234,8 @@ CFLAGS-support_paths.c = \
# being withing the observed range. The code uses double internally
# in support_timespec_check_in_range and for that computation we use
# -fexcess-precision=standard.
-CFLAGS-timespec.c += -fexcess-precision=standard
-CFLAGS-timespec-time64.c += -fexcess-precision=standard
+CFLAGS-timespec.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-timespec-time64.c += $(config-cflags-fexcess-precision-standard)
ifeq (,$(CXX))
LINKS_DSO_PROGRAM = links-dso-program-c
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 600e42c3db..68bd42cdd3 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -8,7 +8,7 @@ tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
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
-CFLAGS-test-flt-eval-method-387.c += -fexcess-precision=standard -mfpmath=387
-CFLAGS-test-flt-eval-method-sse.c += -fexcess-precision=standard -msse2 \
+CFLAGS-test-flt-eval-method-387.c += $(config-cflags-fexcess-precision-standard) -mfpmath=387
+CFLAGS-test-flt-eval-method-sse.c += $(config-cflags-fexcess-precision-standard) -msse2 \
-mfpmath=sse
endif
^ permalink raw reply [flat|nested] 24+ messages in thread
* [glibc/azanella/clang] math: Use -fexcess-precision=standard iff compiler supports it
@ 2024-04-17 20:06 Adhemerval Zanella
0 siblings, 0 replies; 24+ messages in thread
From: Adhemerval Zanella @ 2024-04-17 20:06 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=706b3d7a47bb50f3534551f41e39bbaa9a5b9924
commit 706b3d7a47bb50f3534551f41e39bbaa9a5b9924
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Mar 10 17:22:41 2022 -0300
math: Use -fexcess-precision=standard iff compiler supports it
Diff:
---
configure | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
configure.ac | 16 ++++++++++++++++
math/Makefile | 6 +++---
support/Makefile | 4 ++--
sysdeps/x86/fpu/Makefile | 4 ++--
5 files changed, 71 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index 6ac17a1078..d31af0b137 100755
--- a/configure
+++ b/configure
@@ -7126,6 +7126,54 @@ printf "%s\n" "$libc_cv_wno_ignored_attributes" >&6; }
config_vars="$config_vars
config-cflags-wno-ignored-attributes = $libc_cv_wno_ignored_attributes"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -Wno-maybe-uninitialized" >&5
+printf %s "checking for -Wno-maybe-uninitialized... " >&6; }
+if test ${libc_cv_wno_maybe_uninitialized+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if { ac_try='${CC-cc} -Werror -Wno-maybe-uninitialized -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_wno_maybe_uninitialized=-Wno-maybe-uninitialized
+else $as_nop
+ libc_cv_wno_maybe_uninitialized=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_wno_maybe_uninitialized" >&5
+printf "%s\n" "$libc_cv_wno_maybe_uninitialized" >&6; }
+config_vars="$config_vars
+config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized"
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -fexcess-precision=standard" >&5
+printf %s "checking for -fexcess-precision=standard... " >&6; }
+if test ${libc_cv_fexcess_precision_standard+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if { ac_try='${CC-cc} -Werror -fexcess-precision=standard -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_fexcess_precision_standard=-fexcess-precision=standard
+else $as_nop
+ libc_cv_fexcess_precision_standard=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_fexcess_precision_standard" >&5
+printf "%s\n" "$libc_cv_fexcess_precision_standard" >&6; }
+config_vars="$config_vars
+config-cflags-fexcess-precision-standard = $libc_cv_fexcess_precision_standard"
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5
printf %s "checking whether cc puts quotes around section names... " >&6; }
if test ${libc_cv_have_section_quotes+y}
diff --git a/configure.ac b/configure.ac
index 1799ddc320..39d4195e55 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1362,6 +1362,22 @@ rm -f conftest*])
LIBC_CONFIG_VAR([config-cflags-wno-ignored-attributes],
[$libc_cv_wno_ignored_attributes])
+AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized, [dnl
+ LIBC_TRY_CC_OPTION([-Werror -Wno-maybe-uninitialized],
+ [libc_cv_wno_maybe_uninitialized=-Wno-maybe-uninitialized],
+ [libc_cv_wno_maybe_uninitialized=])
+])
+LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
+ [$libc_cv_wno_maybe_uninitialized])
+
+AC_CACHE_CHECK([for -fexcess-precision=standard], libc_cv_fexcess_precision_standard, [dnl
+ LIBC_TRY_CC_OPTION([-Werror -fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=-fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=])
+])
+LIBC_CONFIG_VAR([config-cflags-fexcess-precision-standard],
+ [$libc_cv_fexcess_precision_standard])
+
AC_CACHE_CHECK(whether cc puts quotes around section names,
libc_cv_have_section_quotes,
[cat > conftest.c <<EOF
diff --git a/math/Makefile b/math/Makefile
index f8d2e95b32..7a23288f37 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -984,9 +984,9 @@ CFLAGS-test-math-iszero.cc += -std=gnu++11
CFLAGS-test-math-issignaling.cc += -std=gnu++11
CFLAGS-test-math-iscanonical.cc += -std=gnu++11
-CFLAGS-test-iszero-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-iseqsig-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-flt-eval-method.c += -fexcess-precision=standard
+CFLAGS-test-iszero-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-iseqsig-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-flt-eval-method.c += $(config-cflags-fexcess-precision-standard)
CFLAGS-test-fe-snans-always-signal.c += $(config-cflags-signaling-nans)
diff --git a/support/Makefile b/support/Makefile
index aa57207bdc..48779484c8 100644
--- a/support/Makefile
+++ b/support/Makefile
@@ -249,8 +249,8 @@ CFLAGS-.oS += -fexceptions -fasynchronous-unwind-tables
# being within the observed range. The code uses double internally
# in support_timespec_check_in_range and for that computation we use
# -fexcess-precision=standard.
-CFLAGS-timespec.c += -fexcess-precision=standard
-CFLAGS-timespec-time64.c += -fexcess-precision=standard
+CFLAGS-timespec.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-timespec-time64.c += $(config-cflags-fexcess-precision-standard)
# Ensure that general support files use 64-bit time_t
CFLAGS-delayed_exit.c += -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 600e42c3db..68bd42cdd3 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -8,7 +8,7 @@ tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
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
-CFLAGS-test-flt-eval-method-387.c += -fexcess-precision=standard -mfpmath=387
-CFLAGS-test-flt-eval-method-sse.c += -fexcess-precision=standard -msse2 \
+CFLAGS-test-flt-eval-method-387.c += $(config-cflags-fexcess-precision-standard) -mfpmath=387
+CFLAGS-test-flt-eval-method-sse.c += $(config-cflags-fexcess-precision-standard) -msse2 \
-mfpmath=sse
endif
^ permalink raw reply [flat|nested] 24+ messages in thread
* [glibc/azanella/clang] math: Use -fexcess-precision=standard iff compiler supports it
@ 2024-04-02 15:52 Adhemerval Zanella
0 siblings, 0 replies; 24+ messages in thread
From: Adhemerval Zanella @ 2024-04-02 15:52 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8e3ba1a317def79f674abdba32d34a5694a63579
commit 8e3ba1a317def79f674abdba32d34a5694a63579
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Mar 10 17:22:41 2022 -0300
math: Use -fexcess-precision=standard iff compiler supports it
Diff:
---
configure | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
configure.ac | 16 ++++++++++++++++
math/Makefile | 6 +++---
support/Makefile | 4 ++--
sysdeps/x86/fpu/Makefile | 4 ++--
5 files changed, 71 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index 6ac17a1078..d31af0b137 100755
--- a/configure
+++ b/configure
@@ -7126,6 +7126,54 @@ printf "%s\n" "$libc_cv_wno_ignored_attributes" >&6; }
config_vars="$config_vars
config-cflags-wno-ignored-attributes = $libc_cv_wno_ignored_attributes"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -Wno-maybe-uninitialized" >&5
+printf %s "checking for -Wno-maybe-uninitialized... " >&6; }
+if test ${libc_cv_wno_maybe_uninitialized+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if { ac_try='${CC-cc} -Werror -Wno-maybe-uninitialized -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_wno_maybe_uninitialized=-Wno-maybe-uninitialized
+else $as_nop
+ libc_cv_wno_maybe_uninitialized=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_wno_maybe_uninitialized" >&5
+printf "%s\n" "$libc_cv_wno_maybe_uninitialized" >&6; }
+config_vars="$config_vars
+config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized"
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -fexcess-precision=standard" >&5
+printf %s "checking for -fexcess-precision=standard... " >&6; }
+if test ${libc_cv_fexcess_precision_standard+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if { ac_try='${CC-cc} -Werror -fexcess-precision=standard -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_fexcess_precision_standard=-fexcess-precision=standard
+else $as_nop
+ libc_cv_fexcess_precision_standard=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_fexcess_precision_standard" >&5
+printf "%s\n" "$libc_cv_fexcess_precision_standard" >&6; }
+config_vars="$config_vars
+config-cflags-fexcess-precision-standard = $libc_cv_fexcess_precision_standard"
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5
printf %s "checking whether cc puts quotes around section names... " >&6; }
if test ${libc_cv_have_section_quotes+y}
diff --git a/configure.ac b/configure.ac
index 1799ddc320..39d4195e55 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1362,6 +1362,22 @@ rm -f conftest*])
LIBC_CONFIG_VAR([config-cflags-wno-ignored-attributes],
[$libc_cv_wno_ignored_attributes])
+AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized, [dnl
+ LIBC_TRY_CC_OPTION([-Werror -Wno-maybe-uninitialized],
+ [libc_cv_wno_maybe_uninitialized=-Wno-maybe-uninitialized],
+ [libc_cv_wno_maybe_uninitialized=])
+])
+LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
+ [$libc_cv_wno_maybe_uninitialized])
+
+AC_CACHE_CHECK([for -fexcess-precision=standard], libc_cv_fexcess_precision_standard, [dnl
+ LIBC_TRY_CC_OPTION([-Werror -fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=-fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=])
+])
+LIBC_CONFIG_VAR([config-cflags-fexcess-precision-standard],
+ [$libc_cv_fexcess_precision_standard])
+
AC_CACHE_CHECK(whether cc puts quotes around section names,
libc_cv_have_section_quotes,
[cat > conftest.c <<EOF
diff --git a/math/Makefile b/math/Makefile
index 98c5d43a34..6e76d78a89 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -455,9 +455,9 @@ CFLAGS-test-math-iszero.cc += -std=gnu++11
CFLAGS-test-math-issignaling.cc += -std=gnu++11
CFLAGS-test-math-iscanonical.cc += -std=gnu++11
-CFLAGS-test-iszero-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-iseqsig-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-flt-eval-method.c += -fexcess-precision=standard
+CFLAGS-test-iszero-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-iseqsig-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-flt-eval-method.c += $(config-cflags-fexcess-precision-standard)
CFLAGS-test-fe-snans-always-signal.c += $(config-cflags-signaling-nans)
diff --git a/support/Makefile b/support/Makefile
index 362a51f882..1e58711fa0 100644
--- a/support/Makefile
+++ b/support/Makefile
@@ -248,8 +248,8 @@ CFLAGS-.oS += -fexceptions -fasynchronous-unwind-tables
# being within the observed range. The code uses double internally
# in support_timespec_check_in_range and for that computation we use
# -fexcess-precision=standard.
-CFLAGS-timespec.c += -fexcess-precision=standard
-CFLAGS-timespec-time64.c += -fexcess-precision=standard
+CFLAGS-timespec.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-timespec-time64.c += $(config-cflags-fexcess-precision-standard)
# Ensure that general support files use 64-bit time_t
CFLAGS-delayed_exit.c += -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 600e42c3db..68bd42cdd3 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -8,7 +8,7 @@ tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
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
-CFLAGS-test-flt-eval-method-387.c += -fexcess-precision=standard -mfpmath=387
-CFLAGS-test-flt-eval-method-sse.c += -fexcess-precision=standard -msse2 \
+CFLAGS-test-flt-eval-method-387.c += $(config-cflags-fexcess-precision-standard) -mfpmath=387
+CFLAGS-test-flt-eval-method-sse.c += $(config-cflags-fexcess-precision-standard) -msse2 \
-mfpmath=sse
endif
^ permalink raw reply [flat|nested] 24+ messages in thread
* [glibc/azanella/clang] math: Use -fexcess-precision=standard iff compiler supports it
@ 2024-02-09 17:31 Adhemerval Zanella
0 siblings, 0 replies; 24+ messages in thread
From: Adhemerval Zanella @ 2024-02-09 17:31 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=be123324b425662215bb39e76fc0b32977bd78a1
commit be123324b425662215bb39e76fc0b32977bd78a1
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Mar 10 17:22:41 2022 -0300
math: Use -fexcess-precision=standard iff compiler supports it
Diff:
---
configure | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
configure.ac | 16 ++++++++++++++++
math/Makefile | 6 +++---
support/Makefile | 4 ++--
sysdeps/x86/fpu/Makefile | 4 ++--
5 files changed, 71 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index 742c5c7c14..b7c591dfaa 100755
--- a/configure
+++ b/configure
@@ -7123,6 +7123,54 @@ printf "%s\n" "$libc_cv_wno_ignored_attributes" >&6; }
config_vars="$config_vars
config-cflags-wno-ignored-attributes = $libc_cv_wno_ignored_attributes"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -Wno-maybe-uninitialized" >&5
+printf %s "checking for -Wno-maybe-uninitialized... " >&6; }
+if test ${libc_cv_wno_maybe_uninitialized+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if { ac_try='${CC-cc} -Werror -Wno-maybe-uninitialized -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_wno_maybe_uninitialized=-Wno-maybe-uninitialized
+else $as_nop
+ libc_cv_wno_maybe_uninitialized=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_wno_maybe_uninitialized" >&5
+printf "%s\n" "$libc_cv_wno_maybe_uninitialized" >&6; }
+config_vars="$config_vars
+config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized"
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -fexcess-precision=standard" >&5
+printf %s "checking for -fexcess-precision=standard... " >&6; }
+if test ${libc_cv_fexcess_precision_standard+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if { ac_try='${CC-cc} -Werror -fexcess-precision=standard -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_fexcess_precision_standard=-fexcess-precision=standard
+else $as_nop
+ libc_cv_fexcess_precision_standard=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_fexcess_precision_standard" >&5
+printf "%s\n" "$libc_cv_fexcess_precision_standard" >&6; }
+config_vars="$config_vars
+config-cflags-fexcess-precision-standard = $libc_cv_fexcess_precision_standard"
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5
printf %s "checking whether cc puts quotes around section names... " >&6; }
if test ${libc_cv_have_section_quotes+y}
diff --git a/configure.ac b/configure.ac
index c10e4bc306..591f7ee84d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1359,6 +1359,22 @@ rm -f conftest*])
LIBC_CONFIG_VAR([config-cflags-wno-ignored-attributes],
[$libc_cv_wno_ignored_attributes])
+AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized, [dnl
+ LIBC_TRY_CC_OPTION([-Werror -Wno-maybe-uninitialized],
+ [libc_cv_wno_maybe_uninitialized=-Wno-maybe-uninitialized],
+ [libc_cv_wno_maybe_uninitialized=])
+])
+LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
+ [$libc_cv_wno_maybe_uninitialized])
+
+AC_CACHE_CHECK([for -fexcess-precision=standard], libc_cv_fexcess_precision_standard, [dnl
+ LIBC_TRY_CC_OPTION([-Werror -fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=-fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=])
+])
+LIBC_CONFIG_VAR([config-cflags-fexcess-precision-standard],
+ [$libc_cv_fexcess_precision_standard])
+
AC_CACHE_CHECK(whether cc puts quotes around section names,
libc_cv_have_section_quotes,
[cat > conftest.c <<EOF
diff --git a/math/Makefile b/math/Makefile
index e405a70416..9f518dfe96 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -455,9 +455,9 @@ CFLAGS-test-math-iszero.cc += -std=gnu++11
CFLAGS-test-math-issignaling.cc += -std=gnu++11
CFLAGS-test-math-iscanonical.cc += -std=gnu++11
-CFLAGS-test-iszero-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-iseqsig-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-flt-eval-method.c += -fexcess-precision=standard
+CFLAGS-test-iszero-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-iseqsig-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-flt-eval-method.c += $(config-cflags-fexcess-precision-standard)
CFLAGS-test-fe-snans-always-signal.c += $(config-cflags-signaling-nans)
diff --git a/support/Makefile b/support/Makefile
index 362a51f882..1e58711fa0 100644
--- a/support/Makefile
+++ b/support/Makefile
@@ -248,8 +248,8 @@ CFLAGS-.oS += -fexceptions -fasynchronous-unwind-tables
# being within the observed range. The code uses double internally
# in support_timespec_check_in_range and for that computation we use
# -fexcess-precision=standard.
-CFLAGS-timespec.c += -fexcess-precision=standard
-CFLAGS-timespec-time64.c += -fexcess-precision=standard
+CFLAGS-timespec.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-timespec-time64.c += $(config-cflags-fexcess-precision-standard)
# Ensure that general support files use 64-bit time_t
CFLAGS-delayed_exit.c += -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 600e42c3db..68bd42cdd3 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -8,7 +8,7 @@ tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
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
-CFLAGS-test-flt-eval-method-387.c += -fexcess-precision=standard -mfpmath=387
-CFLAGS-test-flt-eval-method-sse.c += -fexcess-precision=standard -msse2 \
+CFLAGS-test-flt-eval-method-387.c += $(config-cflags-fexcess-precision-standard) -mfpmath=387
+CFLAGS-test-flt-eval-method-sse.c += $(config-cflags-fexcess-precision-standard) -msse2 \
-mfpmath=sse
endif
^ permalink raw reply [flat|nested] 24+ messages in thread
* [glibc/azanella/clang] math: Use -fexcess-precision=standard iff compiler supports it
@ 2024-02-07 14:06 Adhemerval Zanella
0 siblings, 0 replies; 24+ messages in thread
From: Adhemerval Zanella @ 2024-02-07 14:06 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2b3f273490f35a5984dae212ad25f0d5d4884393
commit 2b3f273490f35a5984dae212ad25f0d5d4884393
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Mar 10 17:22:41 2022 -0300
math: Use -fexcess-precision=standard iff compiler supports it
Diff:
---
configure | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
configure.ac | 16 ++++++++++++++++
math/Makefile | 6 +++---
support/Makefile | 4 ++--
sysdeps/x86/fpu/Makefile | 4 ++--
5 files changed, 71 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index 742c5c7c14..b7c591dfaa 100755
--- a/configure
+++ b/configure
@@ -7123,6 +7123,54 @@ printf "%s\n" "$libc_cv_wno_ignored_attributes" >&6; }
config_vars="$config_vars
config-cflags-wno-ignored-attributes = $libc_cv_wno_ignored_attributes"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -Wno-maybe-uninitialized" >&5
+printf %s "checking for -Wno-maybe-uninitialized... " >&6; }
+if test ${libc_cv_wno_maybe_uninitialized+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if { ac_try='${CC-cc} -Werror -Wno-maybe-uninitialized -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_wno_maybe_uninitialized=-Wno-maybe-uninitialized
+else $as_nop
+ libc_cv_wno_maybe_uninitialized=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_wno_maybe_uninitialized" >&5
+printf "%s\n" "$libc_cv_wno_maybe_uninitialized" >&6; }
+config_vars="$config_vars
+config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized"
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -fexcess-precision=standard" >&5
+printf %s "checking for -fexcess-precision=standard... " >&6; }
+if test ${libc_cv_fexcess_precision_standard+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if { ac_try='${CC-cc} -Werror -fexcess-precision=standard -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_fexcess_precision_standard=-fexcess-precision=standard
+else $as_nop
+ libc_cv_fexcess_precision_standard=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_fexcess_precision_standard" >&5
+printf "%s\n" "$libc_cv_fexcess_precision_standard" >&6; }
+config_vars="$config_vars
+config-cflags-fexcess-precision-standard = $libc_cv_fexcess_precision_standard"
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5
printf %s "checking whether cc puts quotes around section names... " >&6; }
if test ${libc_cv_have_section_quotes+y}
diff --git a/configure.ac b/configure.ac
index c10e4bc306..591f7ee84d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1359,6 +1359,22 @@ rm -f conftest*])
LIBC_CONFIG_VAR([config-cflags-wno-ignored-attributes],
[$libc_cv_wno_ignored_attributes])
+AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized, [dnl
+ LIBC_TRY_CC_OPTION([-Werror -Wno-maybe-uninitialized],
+ [libc_cv_wno_maybe_uninitialized=-Wno-maybe-uninitialized],
+ [libc_cv_wno_maybe_uninitialized=])
+])
+LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
+ [$libc_cv_wno_maybe_uninitialized])
+
+AC_CACHE_CHECK([for -fexcess-precision=standard], libc_cv_fexcess_precision_standard, [dnl
+ LIBC_TRY_CC_OPTION([-Werror -fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=-fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=])
+])
+LIBC_CONFIG_VAR([config-cflags-fexcess-precision-standard],
+ [$libc_cv_fexcess_precision_standard])
+
AC_CACHE_CHECK(whether cc puts quotes around section names,
libc_cv_have_section_quotes,
[cat > conftest.c <<EOF
diff --git a/math/Makefile b/math/Makefile
index e405a70416..9f518dfe96 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -455,9 +455,9 @@ CFLAGS-test-math-iszero.cc += -std=gnu++11
CFLAGS-test-math-issignaling.cc += -std=gnu++11
CFLAGS-test-math-iscanonical.cc += -std=gnu++11
-CFLAGS-test-iszero-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-iseqsig-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-flt-eval-method.c += -fexcess-precision=standard
+CFLAGS-test-iszero-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-iseqsig-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-flt-eval-method.c += $(config-cflags-fexcess-precision-standard)
CFLAGS-test-fe-snans-always-signal.c += $(config-cflags-signaling-nans)
diff --git a/support/Makefile b/support/Makefile
index 362a51f882..1e58711fa0 100644
--- a/support/Makefile
+++ b/support/Makefile
@@ -248,8 +248,8 @@ CFLAGS-.oS += -fexceptions -fasynchronous-unwind-tables
# being within the observed range. The code uses double internally
# in support_timespec_check_in_range and for that computation we use
# -fexcess-precision=standard.
-CFLAGS-timespec.c += -fexcess-precision=standard
-CFLAGS-timespec-time64.c += -fexcess-precision=standard
+CFLAGS-timespec.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-timespec-time64.c += $(config-cflags-fexcess-precision-standard)
# Ensure that general support files use 64-bit time_t
CFLAGS-delayed_exit.c += -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 600e42c3db..68bd42cdd3 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -8,7 +8,7 @@ tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
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
-CFLAGS-test-flt-eval-method-387.c += -fexcess-precision=standard -mfpmath=387
-CFLAGS-test-flt-eval-method-sse.c += -fexcess-precision=standard -msse2 \
+CFLAGS-test-flt-eval-method-387.c += $(config-cflags-fexcess-precision-standard) -mfpmath=387
+CFLAGS-test-flt-eval-method-sse.c += $(config-cflags-fexcess-precision-standard) -msse2 \
-mfpmath=sse
endif
^ permalink raw reply [flat|nested] 24+ messages in thread
* [glibc/azanella/clang] math: Use -fexcess-precision=standard iff compiler supports it
@ 2024-01-29 17:56 Adhemerval Zanella
0 siblings, 0 replies; 24+ messages in thread
From: Adhemerval Zanella @ 2024-01-29 17:56 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4912f66fbbc65fc6ae480a00f9195a1dfc845de9
commit 4912f66fbbc65fc6ae480a00f9195a1dfc845de9
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Mar 10 17:22:41 2022 -0300
math: Use -fexcess-precision=standard iff compiler supports it
Diff:
---
configure | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
configure.ac | 16 ++++++++++++++++
math/Makefile | 6 +++---
support/Makefile | 4 ++--
sysdeps/x86/fpu/Makefile | 4 ++--
5 files changed, 71 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index 742c5c7c14..b7c591dfaa 100755
--- a/configure
+++ b/configure
@@ -7123,6 +7123,54 @@ printf "%s\n" "$libc_cv_wno_ignored_attributes" >&6; }
config_vars="$config_vars
config-cflags-wno-ignored-attributes = $libc_cv_wno_ignored_attributes"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -Wno-maybe-uninitialized" >&5
+printf %s "checking for -Wno-maybe-uninitialized... " >&6; }
+if test ${libc_cv_wno_maybe_uninitialized+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if { ac_try='${CC-cc} -Werror -Wno-maybe-uninitialized -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_wno_maybe_uninitialized=-Wno-maybe-uninitialized
+else $as_nop
+ libc_cv_wno_maybe_uninitialized=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_wno_maybe_uninitialized" >&5
+printf "%s\n" "$libc_cv_wno_maybe_uninitialized" >&6; }
+config_vars="$config_vars
+config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized"
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -fexcess-precision=standard" >&5
+printf %s "checking for -fexcess-precision=standard... " >&6; }
+if test ${libc_cv_fexcess_precision_standard+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if { ac_try='${CC-cc} -Werror -fexcess-precision=standard -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_fexcess_precision_standard=-fexcess-precision=standard
+else $as_nop
+ libc_cv_fexcess_precision_standard=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_fexcess_precision_standard" >&5
+printf "%s\n" "$libc_cv_fexcess_precision_standard" >&6; }
+config_vars="$config_vars
+config-cflags-fexcess-precision-standard = $libc_cv_fexcess_precision_standard"
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5
printf %s "checking whether cc puts quotes around section names... " >&6; }
if test ${libc_cv_have_section_quotes+y}
diff --git a/configure.ac b/configure.ac
index c10e4bc306..591f7ee84d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1359,6 +1359,22 @@ rm -f conftest*])
LIBC_CONFIG_VAR([config-cflags-wno-ignored-attributes],
[$libc_cv_wno_ignored_attributes])
+AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized, [dnl
+ LIBC_TRY_CC_OPTION([-Werror -Wno-maybe-uninitialized],
+ [libc_cv_wno_maybe_uninitialized=-Wno-maybe-uninitialized],
+ [libc_cv_wno_maybe_uninitialized=])
+])
+LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
+ [$libc_cv_wno_maybe_uninitialized])
+
+AC_CACHE_CHECK([for -fexcess-precision=standard], libc_cv_fexcess_precision_standard, [dnl
+ LIBC_TRY_CC_OPTION([-Werror -fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=-fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=])
+])
+LIBC_CONFIG_VAR([config-cflags-fexcess-precision-standard],
+ [$libc_cv_fexcess_precision_standard])
+
AC_CACHE_CHECK(whether cc puts quotes around section names,
libc_cv_have_section_quotes,
[cat > conftest.c <<EOF
diff --git a/math/Makefile b/math/Makefile
index e405a70416..9f518dfe96 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -455,9 +455,9 @@ CFLAGS-test-math-iszero.cc += -std=gnu++11
CFLAGS-test-math-issignaling.cc += -std=gnu++11
CFLAGS-test-math-iscanonical.cc += -std=gnu++11
-CFLAGS-test-iszero-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-iseqsig-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-flt-eval-method.c += -fexcess-precision=standard
+CFLAGS-test-iszero-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-iseqsig-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-flt-eval-method.c += $(config-cflags-fexcess-precision-standard)
CFLAGS-test-fe-snans-always-signal.c += $(config-cflags-signaling-nans)
diff --git a/support/Makefile b/support/Makefile
index 362a51f882..1e58711fa0 100644
--- a/support/Makefile
+++ b/support/Makefile
@@ -248,8 +248,8 @@ CFLAGS-.oS += -fexceptions -fasynchronous-unwind-tables
# being within the observed range. The code uses double internally
# in support_timespec_check_in_range and for that computation we use
# -fexcess-precision=standard.
-CFLAGS-timespec.c += -fexcess-precision=standard
-CFLAGS-timespec-time64.c += -fexcess-precision=standard
+CFLAGS-timespec.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-timespec-time64.c += $(config-cflags-fexcess-precision-standard)
# Ensure that general support files use 64-bit time_t
CFLAGS-delayed_exit.c += -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 600e42c3db..68bd42cdd3 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -8,7 +8,7 @@ tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
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
-CFLAGS-test-flt-eval-method-387.c += -fexcess-precision=standard -mfpmath=387
-CFLAGS-test-flt-eval-method-sse.c += -fexcess-precision=standard -msse2 \
+CFLAGS-test-flt-eval-method-387.c += $(config-cflags-fexcess-precision-standard) -mfpmath=387
+CFLAGS-test-flt-eval-method-sse.c += $(config-cflags-fexcess-precision-standard) -msse2 \
-mfpmath=sse
endif
^ permalink raw reply [flat|nested] 24+ messages in thread
* [glibc/azanella/clang] math: Use -fexcess-precision=standard iff compiler supports it
@ 2023-12-21 18:53 Adhemerval Zanella
0 siblings, 0 replies; 24+ messages in thread
From: Adhemerval Zanella @ 2023-12-21 18:53 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=10d309753bd56690dbdb1eddea604e50b084c244
commit 10d309753bd56690dbdb1eddea604e50b084c244
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Mar 10 17:22:41 2022 -0300
math: Use -fexcess-precision=standard iff compiler supports it
Diff:
---
configure | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
configure.ac | 16 ++++++++++++++++
math/Makefile | 6 +++---
support/Makefile | 4 ++--
sysdeps/x86/fpu/Makefile | 4 ++--
5 files changed, 71 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index bcb741baa1..95076cc296 100755
--- a/configure
+++ b/configure
@@ -7122,6 +7122,54 @@ printf "%s\n" "$libc_cv_wno_ignored_attributes" >&6; }
config_vars="$config_vars
config-cflags-wno-ignored-attributes = $libc_cv_wno_ignored_attributes"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -Wno-maybe-uninitialized" >&5
+printf %s "checking for -Wno-maybe-uninitialized... " >&6; }
+if test ${libc_cv_wno_maybe_uninitialized+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if { ac_try='${CC-cc} -Werror -Wno-maybe-uninitialized -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_wno_maybe_uninitialized=-Wno-maybe-uninitialized
+else $as_nop
+ libc_cv_wno_maybe_uninitialized=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_wno_maybe_uninitialized" >&5
+printf "%s\n" "$libc_cv_wno_maybe_uninitialized" >&6; }
+config_vars="$config_vars
+config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized"
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -fexcess-precision=standard" >&5
+printf %s "checking for -fexcess-precision=standard... " >&6; }
+if test ${libc_cv_fexcess_precision_standard+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if { ac_try='${CC-cc} -Werror -fexcess-precision=standard -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_fexcess_precision_standard=-fexcess-precision=standard
+else $as_nop
+ libc_cv_fexcess_precision_standard=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_fexcess_precision_standard" >&5
+printf "%s\n" "$libc_cv_fexcess_precision_standard" >&6; }
+config_vars="$config_vars
+config-cflags-fexcess-precision-standard = $libc_cv_fexcess_precision_standard"
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5
printf %s "checking whether cc puts quotes around section names... " >&6; }
if test ${libc_cv_have_section_quotes+y}
diff --git a/configure.ac b/configure.ac
index c10e4bc306..591f7ee84d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1359,6 +1359,22 @@ rm -f conftest*])
LIBC_CONFIG_VAR([config-cflags-wno-ignored-attributes],
[$libc_cv_wno_ignored_attributes])
+AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized, [dnl
+ LIBC_TRY_CC_OPTION([-Werror -Wno-maybe-uninitialized],
+ [libc_cv_wno_maybe_uninitialized=-Wno-maybe-uninitialized],
+ [libc_cv_wno_maybe_uninitialized=])
+])
+LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
+ [$libc_cv_wno_maybe_uninitialized])
+
+AC_CACHE_CHECK([for -fexcess-precision=standard], libc_cv_fexcess_precision_standard, [dnl
+ LIBC_TRY_CC_OPTION([-Werror -fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=-fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=])
+])
+LIBC_CONFIG_VAR([config-cflags-fexcess-precision-standard],
+ [$libc_cv_fexcess_precision_standard])
+
AC_CACHE_CHECK(whether cc puts quotes around section names,
libc_cv_have_section_quotes,
[cat > conftest.c <<EOF
diff --git a/math/Makefile b/math/Makefile
index bf0393b7a7..410e93c58d 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -455,9 +455,9 @@ CFLAGS-test-math-iszero.cc += -std=gnu++11
CFLAGS-test-math-issignaling.cc += -std=gnu++11
CFLAGS-test-math-iscanonical.cc += -std=gnu++11
-CFLAGS-test-iszero-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-iseqsig-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-flt-eval-method.c += -fexcess-precision=standard
+CFLAGS-test-iszero-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-iseqsig-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-flt-eval-method.c += $(config-cflags-fexcess-precision-standard)
CFLAGS-test-fe-snans-always-signal.c += $(config-cflags-signaling-nans)
diff --git a/support/Makefile b/support/Makefile
index 9aa7f23a6e..f96c2666f7 100644
--- a/support/Makefile
+++ b/support/Makefile
@@ -248,8 +248,8 @@ CFLAGS-.oS += -fexceptions -fasynchronous-unwind-tables
# being within the observed range. The code uses double internally
# in support_timespec_check_in_range and for that computation we use
# -fexcess-precision=standard.
-CFLAGS-timespec.c += -fexcess-precision=standard
-CFLAGS-timespec-time64.c += -fexcess-precision=standard
+CFLAGS-timespec.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-timespec-time64.c += $(config-cflags-fexcess-precision-standard)
# Ensure that general support files use 64-bit time_t
CFLAGS-delayed_exit.c += -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 600e42c3db..68bd42cdd3 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -8,7 +8,7 @@ tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
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
-CFLAGS-test-flt-eval-method-387.c += -fexcess-precision=standard -mfpmath=387
-CFLAGS-test-flt-eval-method-sse.c += -fexcess-precision=standard -msse2 \
+CFLAGS-test-flt-eval-method-387.c += $(config-cflags-fexcess-precision-standard) -mfpmath=387
+CFLAGS-test-flt-eval-method-sse.c += $(config-cflags-fexcess-precision-standard) -msse2 \
-mfpmath=sse
endif
^ permalink raw reply [flat|nested] 24+ messages in thread
* [glibc/azanella/clang] math: Use -fexcess-precision=standard iff compiler supports it
@ 2023-09-28 17:51 Adhemerval Zanella
0 siblings, 0 replies; 24+ messages in thread
From: Adhemerval Zanella @ 2023-09-28 17:51 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0a51fe83877be82640b00a0820a7ff36562e16db
commit 0a51fe83877be82640b00a0820a7ff36562e16db
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Mar 10 17:22:41 2022 -0300
math: Use -fexcess-precision=standard iff compiler supports it
Diff:
---
configure | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
configure.ac | 16 ++++++++++++++++
math/Makefile | 6 +++---
support/Makefile | 4 ++--
sysdeps/x86/fpu/Makefile | 4 ++--
5 files changed, 71 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index 7f191206cd..ff97a7a7b8 100755
--- a/configure
+++ b/configure
@@ -7248,6 +7248,54 @@ printf "%s\n" "$libc_cv_wno_ignored_attributes" >&6; }
config_vars="$config_vars
config-cflags-wno-ignored-attributes = $libc_cv_wno_ignored_attributes"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -Wno-maybe-uninitialized" >&5
+printf %s "checking for -Wno-maybe-uninitialized... " >&6; }
+if test ${libc_cv_wno_maybe_uninitialized+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if { ac_try='${CC-cc} -Werror -Wno-maybe-uninitialized -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_wno_maybe_uninitialized=-Wno-maybe-uninitialized
+else $as_nop
+ libc_cv_wno_maybe_uninitialized=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_wno_maybe_uninitialized" >&5
+printf "%s\n" "$libc_cv_wno_maybe_uninitialized" >&6; }
+config_vars="$config_vars
+config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized"
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -fexcess-precision=standard" >&5
+printf %s "checking for -fexcess-precision=standard... " >&6; }
+if test ${libc_cv_fexcess_precision_standard+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if { ac_try='${CC-cc} -Werror -fexcess-precision=standard -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_fexcess_precision_standard=-fexcess-precision=standard
+else $as_nop
+ libc_cv_fexcess_precision_standard=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_fexcess_precision_standard" >&5
+printf "%s\n" "$libc_cv_fexcess_precision_standard" >&6; }
+config_vars="$config_vars
+config-cflags-fexcess-precision-standard = $libc_cv_fexcess_precision_standard"
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5
printf %s "checking whether cc puts quotes around section names... " >&6; }
if test ${libc_cv_have_section_quotes+y}
diff --git a/configure.ac b/configure.ac
index ee99babc36..cac41e728e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1424,6 +1424,22 @@ rm -f conftest*])
LIBC_CONFIG_VAR([config-cflags-wno-ignored-attributes],
[$libc_cv_wno_ignored_attributes])
+AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized, [dnl
+ LIBC_TRY_CC_OPTION([-Werror -Wno-maybe-uninitialized],
+ [libc_cv_wno_maybe_uninitialized=-Wno-maybe-uninitialized],
+ [libc_cv_wno_maybe_uninitialized=])
+])
+LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
+ [$libc_cv_wno_maybe_uninitialized])
+
+AC_CACHE_CHECK([for -fexcess-precision=standard], libc_cv_fexcess_precision_standard, [dnl
+ LIBC_TRY_CC_OPTION([-Werror -fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=-fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=])
+])
+LIBC_CONFIG_VAR([config-cflags-fexcess-precision-standard],
+ [$libc_cv_fexcess_precision_standard])
+
AC_CACHE_CHECK(whether cc puts quotes around section names,
libc_cv_have_section_quotes,
[cat > conftest.c <<EOF
diff --git a/math/Makefile b/math/Makefile
index bf0393b7a7..410e93c58d 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -455,9 +455,9 @@ CFLAGS-test-math-iszero.cc += -std=gnu++11
CFLAGS-test-math-issignaling.cc += -std=gnu++11
CFLAGS-test-math-iscanonical.cc += -std=gnu++11
-CFLAGS-test-iszero-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-iseqsig-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-flt-eval-method.c += -fexcess-precision=standard
+CFLAGS-test-iszero-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-iseqsig-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-flt-eval-method.c += $(config-cflags-fexcess-precision-standard)
CFLAGS-test-fe-snans-always-signal.c += $(config-cflags-signaling-nans)
diff --git a/support/Makefile b/support/Makefile
index 917a858bd1..57132ffa6d 100644
--- a/support/Makefile
+++ b/support/Makefile
@@ -247,8 +247,8 @@ CFLAGS-.oS += -fexceptions -fasynchronous-unwind-tables
# being within the observed range. The code uses double internally
# in support_timespec_check_in_range and for that computation we use
# -fexcess-precision=standard.
-CFLAGS-timespec.c += -fexcess-precision=standard
-CFLAGS-timespec-time64.c += -fexcess-precision=standard
+CFLAGS-timespec.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-timespec-time64.c += $(config-cflags-fexcess-precision-standard)
# Ensure that general support files use 64-bit time_t
CFLAGS-delayed_exit.c += -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 600e42c3db..68bd42cdd3 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -8,7 +8,7 @@ tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
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
-CFLAGS-test-flt-eval-method-387.c += -fexcess-precision=standard -mfpmath=387
-CFLAGS-test-flt-eval-method-sse.c += -fexcess-precision=standard -msse2 \
+CFLAGS-test-flt-eval-method-387.c += $(config-cflags-fexcess-precision-standard) -mfpmath=387
+CFLAGS-test-flt-eval-method-sse.c += $(config-cflags-fexcess-precision-standard) -msse2 \
-mfpmath=sse
endif
^ permalink raw reply [flat|nested] 24+ messages in thread
* [glibc/azanella/clang] math: Use -fexcess-precision=standard iff compiler supports it
@ 2023-08-30 12:36 Adhemerval Zanella
0 siblings, 0 replies; 24+ messages in thread
From: Adhemerval Zanella @ 2023-08-30 12:36 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e22e14174593dafe700d64946fc88242f2238703
commit e22e14174593dafe700d64946fc88242f2238703
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Mar 10 17:22:41 2022 -0300
math: Use -fexcess-precision=standard iff compiler supports it
Diff:
---
configure | 24 ++++++++++++++++++++++++
configure.ac | 8 ++++++++
math/Makefile | 6 +++---
support/Makefile | 4 ++--
sysdeps/x86/fpu/Makefile | 4 ++--
5 files changed, 39 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index e6402558a4..4394ec25bb 100755
--- a/configure
+++ b/configure
@@ -7248,6 +7248,30 @@ printf "%s\n" "$libc_cv_wno_maybe_uninitialized" >&6; }
config_vars="$config_vars
config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -fexcess-precision=standard" >&5
+printf %s "checking for -fexcess-precision=standard... " >&6; }
+if test ${libc_cv_fexcess_precision_standard+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if { ac_try='${CC-cc} -Werror -fexcess-precision=standard -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_fexcess_precision_standard=-fexcess-precision=standard
+else $as_nop
+ libc_cv_fexcess_precision_standard=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_fexcess_precision_standard" >&5
+printf "%s\n" "$libc_cv_fexcess_precision_standard" >&6; }
+config_vars="$config_vars
+config-cflags-fexcess-precision-standard = $libc_cv_fexcess_precision_standard"
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5
printf %s "checking whether cc puts quotes around section names... " >&6; }
if test ${libc_cv_have_section_quotes+y}
diff --git a/configure.ac b/configure.ac
index 546e29443f..b9393cd64b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1424,6 +1424,14 @@ AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized,
LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
[$libc_cv_wno_maybe_uninitialized])
+AC_CACHE_CHECK([for -fexcess-precision=standard], libc_cv_fexcess_precision_standard, [dnl
+ LIBC_TRY_CC_OPTION([-Werror -fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=-fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=])
+])
+LIBC_CONFIG_VAR([config-cflags-fexcess-precision-standard],
+ [$libc_cv_fexcess_precision_standard])
+
AC_CACHE_CHECK(whether cc puts quotes around section names,
libc_cv_have_section_quotes,
[cat > conftest.c <<EOF
diff --git a/math/Makefile b/math/Makefile
index bf0393b7a7..410e93c58d 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -455,9 +455,9 @@ CFLAGS-test-math-iszero.cc += -std=gnu++11
CFLAGS-test-math-issignaling.cc += -std=gnu++11
CFLAGS-test-math-iscanonical.cc += -std=gnu++11
-CFLAGS-test-iszero-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-iseqsig-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-flt-eval-method.c += -fexcess-precision=standard
+CFLAGS-test-iszero-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-iseqsig-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-flt-eval-method.c += $(config-cflags-fexcess-precision-standard)
CFLAGS-test-fe-snans-always-signal.c += $(config-cflags-signaling-nans)
diff --git a/support/Makefile b/support/Makefile
index 917a858bd1..57132ffa6d 100644
--- a/support/Makefile
+++ b/support/Makefile
@@ -247,8 +247,8 @@ CFLAGS-.oS += -fexceptions -fasynchronous-unwind-tables
# being within the observed range. The code uses double internally
# in support_timespec_check_in_range and for that computation we use
# -fexcess-precision=standard.
-CFLAGS-timespec.c += -fexcess-precision=standard
-CFLAGS-timespec-time64.c += -fexcess-precision=standard
+CFLAGS-timespec.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-timespec-time64.c += $(config-cflags-fexcess-precision-standard)
# Ensure that general support files use 64-bit time_t
CFLAGS-delayed_exit.c += -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 600e42c3db..68bd42cdd3 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -8,7 +8,7 @@ tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
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
-CFLAGS-test-flt-eval-method-387.c += -fexcess-precision=standard -mfpmath=387
-CFLAGS-test-flt-eval-method-sse.c += -fexcess-precision=standard -msse2 \
+CFLAGS-test-flt-eval-method-387.c += $(config-cflags-fexcess-precision-standard) -mfpmath=387
+CFLAGS-test-flt-eval-method-sse.c += $(config-cflags-fexcess-precision-standard) -msse2 \
-mfpmath=sse
endif
^ permalink raw reply [flat|nested] 24+ messages in thread
* [glibc/azanella/clang] math: Use -fexcess-precision=standard iff compiler supports it
@ 2023-02-09 19:48 Adhemerval Zanella
0 siblings, 0 replies; 24+ messages in thread
From: Adhemerval Zanella @ 2023-02-09 19:48 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7e5a4ee294e03f42bc3ce1f460f74e7a049a9fa2
commit 7e5a4ee294e03f42bc3ce1f460f74e7a049a9fa2
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Mar 10 17:22:41 2022 -0300
math: Use -fexcess-precision=standard iff compiler supports it
Diff:
---
configure | 22 ++++++++++++++++++++++
configure.ac | 8 ++++++++
math/Makefile | 6 +++---
support/Makefile | 4 ++--
sysdeps/x86/fpu/Makefile | 4 ++--
5 files changed, 37 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index 950af62b2c..c7396f34d2 100755
--- a/configure
+++ b/configure
@@ -6043,6 +6043,28 @@ $as_echo "$libc_cv_wno_maybe_uninitialized" >&6; }
config_vars="$config_vars
config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fexcess-precision=standard" >&5
+$as_echo_n "checking for -fexcess-precision=standard... " >&6; }
+if ${libc_cv_fexcess_precision_standard+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if { ac_try='${CC-cc} -Werror -fexcess-precision=standard -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_fexcess_precision_standard=-fexcess-precision=standard
+else
+ libc_cv_fexcess_precision_standard=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_fexcess_precision_standard" >&5
+$as_echo "$libc_cv_fexcess_precision_standard" >&6; }
+config_vars="$config_vars
+config-cflags-fexcess-precision-standard = $libc_cv_fexcess_precision_standard"
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5
$as_echo_n "checking whether cc puts quotes around section names... " >&6; }
if ${libc_cv_have_section_quotes+:} false; then :
diff --git a/configure.ac b/configure.ac
index 088cb3b860..b23e0f7970 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1440,6 +1440,14 @@ AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized,
LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
[$libc_cv_wno_maybe_uninitialized])
+AC_CACHE_CHECK([for -fexcess-precision=standard], libc_cv_fexcess_precision_standard, [dnl
+ LIBC_TRY_CC_OPTION([-Werror -fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=-fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=])
+])
+LIBC_CONFIG_VAR([config-cflags-fexcess-precision-standard],
+ [$libc_cv_fexcess_precision_standard])
+
AC_CACHE_CHECK(whether cc puts quotes around section names,
libc_cv_have_section_quotes,
[cat > conftest.c <<EOF
diff --git a/math/Makefile b/math/Makefile
index bf0393b7a7..410e93c58d 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -455,9 +455,9 @@ CFLAGS-test-math-iszero.cc += -std=gnu++11
CFLAGS-test-math-issignaling.cc += -std=gnu++11
CFLAGS-test-math-iscanonical.cc += -std=gnu++11
-CFLAGS-test-iszero-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-iseqsig-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-flt-eval-method.c += -fexcess-precision=standard
+CFLAGS-test-iszero-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-iseqsig-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-flt-eval-method.c += $(config-cflags-fexcess-precision-standard)
CFLAGS-test-fe-snans-always-signal.c += $(config-cflags-signaling-nans)
diff --git a/support/Makefile b/support/Makefile
index b29b7eb505..486895ce63 100644
--- a/support/Makefile
+++ b/support/Makefile
@@ -235,8 +235,8 @@ CFLAGS-support_paths.c = \
# being withing the observed range. The code uses double internally
# in support_timespec_check_in_range and for that computation we use
# -fexcess-precision=standard.
-CFLAGS-timespec.c += -fexcess-precision=standard
-CFLAGS-timespec-time64.c += -fexcess-precision=standard
+CFLAGS-timespec.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-timespec-time64.c += $(config-cflags-fexcess-precision-standard)
ifeq (,$(CXX))
LINKS_DSO_PROGRAM = links-dso-program-c
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 600e42c3db..68bd42cdd3 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -8,7 +8,7 @@ tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
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
-CFLAGS-test-flt-eval-method-387.c += -fexcess-precision=standard -mfpmath=387
-CFLAGS-test-flt-eval-method-sse.c += -fexcess-precision=standard -msse2 \
+CFLAGS-test-flt-eval-method-387.c += $(config-cflags-fexcess-precision-standard) -mfpmath=387
+CFLAGS-test-flt-eval-method-sse.c += $(config-cflags-fexcess-precision-standard) -msse2 \
-mfpmath=sse
endif
^ permalink raw reply [flat|nested] 24+ messages in thread
* [glibc/azanella/clang] math: Use -fexcess-precision=standard iff compiler supports it
@ 2022-10-28 17:41 Adhemerval Zanella
0 siblings, 0 replies; 24+ messages in thread
From: Adhemerval Zanella @ 2022-10-28 17:41 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9d14697b933991c6bf7f491922d881b081054c25
commit 9d14697b933991c6bf7f491922d881b081054c25
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Mar 10 17:22:41 2022 -0300
math: Use -fexcess-precision=standard iff compiler supports it
Diff:
---
configure | 22 ++++++++++++++++++++++
configure.ac | 8 ++++++++
math/Makefile | 6 +++---
support/Makefile | 4 ++--
sysdeps/x86/fpu/Makefile | 4 ++--
5 files changed, 37 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index d506cc43f1..8e0894742c 100755
--- a/configure
+++ b/configure
@@ -6337,6 +6337,28 @@ $as_echo "$libc_cv_wno_maybe_uninitialized" >&6; }
config_vars="$config_vars
config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fexcess-precision=standard" >&5
+$as_echo_n "checking for -fexcess-precision=standard... " >&6; }
+if ${libc_cv_fexcess_precision_standard+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if { ac_try='${CC-cc} -Werror -fexcess-precision=standard -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_fexcess_precision_standard=-fexcess-precision=standard
+else
+ libc_cv_fexcess_precision_standard=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_fexcess_precision_standard" >&5
+$as_echo "$libc_cv_fexcess_precision_standard" >&6; }
+config_vars="$config_vars
+config-cflags-fexcess-precision-standard = $libc_cv_fexcess_precision_standard"
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5
$as_echo_n "checking whether cc puts quotes around section names... " >&6; }
if ${libc_cv_have_section_quotes+:} false; then :
diff --git a/configure.ac b/configure.ac
index dd824d90ef..67af290952 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1455,6 +1455,14 @@ AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized,
LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
[$libc_cv_wno_maybe_uninitialized])
+AC_CACHE_CHECK([for -fexcess-precision=standard], libc_cv_fexcess_precision_standard, [dnl
+ LIBC_TRY_CC_OPTION([-Werror -fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=-fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=])
+])
+LIBC_CONFIG_VAR([config-cflags-fexcess-precision-standard],
+ [$libc_cv_fexcess_precision_standard])
+
AC_CACHE_CHECK(whether cc puts quotes around section names,
libc_cv_have_section_quotes,
[cat > conftest.c <<EOF
diff --git a/math/Makefile b/math/Makefile
index dce94d0249..efe5b77cba 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -455,9 +455,9 @@ CFLAGS-test-math-iszero.cc += -std=gnu++11
CFLAGS-test-math-issignaling.cc += -std=gnu++11
CFLAGS-test-math-iscanonical.cc += -std=gnu++11
-CFLAGS-test-iszero-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-iseqsig-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-flt-eval-method.c += -fexcess-precision=standard
+CFLAGS-test-iszero-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-iseqsig-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-flt-eval-method.c += $(config-cflags-fexcess-precision-standard)
CFLAGS-test-fe-snans-always-signal.c += $(config-cflags-signaling-nans)
diff --git a/support/Makefile b/support/Makefile
index 4046b12fbd..2d1dcb5ffd 100644
--- a/support/Makefile
+++ b/support/Makefile
@@ -235,8 +235,8 @@ CFLAGS-support_paths.c = \
# being withing the observed range. The code uses double internally
# in support_timespec_check_in_range and for that computation we use
# -fexcess-precision=standard.
-CFLAGS-timespec.c += -fexcess-precision=standard
-CFLAGS-timespec-time64.c += -fexcess-precision=standard
+CFLAGS-timespec.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-timespec-time64.c += $(config-cflags-fexcess-precision-standard)
ifeq (,$(CXX))
LINKS_DSO_PROGRAM = links-dso-program-c
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 600e42c3db..68bd42cdd3 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -8,7 +8,7 @@ tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
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
-CFLAGS-test-flt-eval-method-387.c += -fexcess-precision=standard -mfpmath=387
-CFLAGS-test-flt-eval-method-sse.c += -fexcess-precision=standard -msse2 \
+CFLAGS-test-flt-eval-method-387.c += $(config-cflags-fexcess-precision-standard) -mfpmath=387
+CFLAGS-test-flt-eval-method-sse.c += $(config-cflags-fexcess-precision-standard) -msse2 \
-mfpmath=sse
endif
^ permalink raw reply [flat|nested] 24+ messages in thread
* [glibc/azanella/clang] math: Use -fexcess-precision=standard iff compiler supports it
@ 2022-10-04 12:59 Adhemerval Zanella
0 siblings, 0 replies; 24+ messages in thread
From: Adhemerval Zanella @ 2022-10-04 12:59 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7f49c287146c97be29e0f2e7b504cfef2663675e
commit 7f49c287146c97be29e0f2e7b504cfef2663675e
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Mar 10 17:22:41 2022 -0300
math: Use -fexcess-precision=standard iff compiler supports it
Diff:
---
configure | 22 ++++++++++++++++++++++
configure.ac | 8 ++++++++
math/Makefile | 6 +++---
support/Makefile | 4 ++--
sysdeps/x86/fpu/Makefile | 4 ++--
5 files changed, 37 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index 42ad611106..5fc7d6f0d4 100755
--- a/configure
+++ b/configure
@@ -6337,6 +6337,28 @@ $as_echo "$libc_cv_wno_maybe_uninitialized" >&6; }
config_vars="$config_vars
config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fexcess-precision=standard" >&5
+$as_echo_n "checking for -fexcess-precision=standard... " >&6; }
+if ${libc_cv_fexcess_precision_standard+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if { ac_try='${CC-cc} -Werror -fexcess-precision=standard -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_fexcess_precision_standard=-fexcess-precision=standard
+else
+ libc_cv_fexcess_precision_standard=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_fexcess_precision_standard" >&5
+$as_echo "$libc_cv_fexcess_precision_standard" >&6; }
+config_vars="$config_vars
+config-cflags-fexcess-precision-standard = $libc_cv_fexcess_precision_standard"
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5
$as_echo_n "checking whether cc puts quotes around section names... " >&6; }
if ${libc_cv_have_section_quotes+:} false; then :
diff --git a/configure.ac b/configure.ac
index 3cd9c8882b..fb698c3d7d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1455,6 +1455,14 @@ AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized,
LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
[$libc_cv_wno_maybe_uninitialized])
+AC_CACHE_CHECK([for -fexcess-precision=standard], libc_cv_fexcess_precision_standard, [dnl
+ LIBC_TRY_CC_OPTION([-Werror -fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=-fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=])
+])
+LIBC_CONFIG_VAR([config-cflags-fexcess-precision-standard],
+ [$libc_cv_fexcess_precision_standard])
+
AC_CACHE_CHECK(whether cc puts quotes around section names,
libc_cv_have_section_quotes,
[cat > conftest.c <<EOF
diff --git a/math/Makefile b/math/Makefile
index dce94d0249..efe5b77cba 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -455,9 +455,9 @@ CFLAGS-test-math-iszero.cc += -std=gnu++11
CFLAGS-test-math-issignaling.cc += -std=gnu++11
CFLAGS-test-math-iscanonical.cc += -std=gnu++11
-CFLAGS-test-iszero-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-iseqsig-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-flt-eval-method.c += -fexcess-precision=standard
+CFLAGS-test-iszero-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-iseqsig-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-flt-eval-method.c += $(config-cflags-fexcess-precision-standard)
CFLAGS-test-fe-snans-always-signal.c += $(config-cflags-signaling-nans)
diff --git a/support/Makefile b/support/Makefile
index 4046b12fbd..2d1dcb5ffd 100644
--- a/support/Makefile
+++ b/support/Makefile
@@ -235,8 +235,8 @@ CFLAGS-support_paths.c = \
# being withing the observed range. The code uses double internally
# in support_timespec_check_in_range and for that computation we use
# -fexcess-precision=standard.
-CFLAGS-timespec.c += -fexcess-precision=standard
-CFLAGS-timespec-time64.c += -fexcess-precision=standard
+CFLAGS-timespec.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-timespec-time64.c += $(config-cflags-fexcess-precision-standard)
ifeq (,$(CXX))
LINKS_DSO_PROGRAM = links-dso-program-c
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 600e42c3db..68bd42cdd3 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -8,7 +8,7 @@ tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
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
-CFLAGS-test-flt-eval-method-387.c += -fexcess-precision=standard -mfpmath=387
-CFLAGS-test-flt-eval-method-sse.c += -fexcess-precision=standard -msse2 \
+CFLAGS-test-flt-eval-method-387.c += $(config-cflags-fexcess-precision-standard) -mfpmath=387
+CFLAGS-test-flt-eval-method-sse.c += $(config-cflags-fexcess-precision-standard) -msse2 \
-mfpmath=sse
endif
^ permalink raw reply [flat|nested] 24+ messages in thread
* [glibc/azanella/clang] math: Use -fexcess-precision=standard iff compiler supports it
@ 2022-06-09 21:19 Adhemerval Zanella
0 siblings, 0 replies; 24+ messages in thread
From: Adhemerval Zanella @ 2022-06-09 21:19 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8a38782e63d651d130d04560df23a92e35c9277f
commit 8a38782e63d651d130d04560df23a92e35c9277f
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Mar 10 17:22:41 2022 -0300
math: Use -fexcess-precision=standard iff compiler supports it
Diff:
---
configure | 22 ++++++++++++++++++++++
configure.ac | 8 ++++++++
math/Makefile | 16 +++++++++++++---
support/Makefile | 4 ++--
sysdeps/x86/fpu/Makefile | 4 ++--
5 files changed, 47 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index 48f24a6f9d..94f9e082ed 100755
--- a/configure
+++ b/configure
@@ -6279,6 +6279,28 @@ $as_echo "$libc_cv_wno_maybe_uninitialized" >&6; }
config_vars="$config_vars
config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fexcess-precision=standard" >&5
+$as_echo_n "checking for -fexcess-precision=standard... " >&6; }
+if ${libc_cv_fexcess_precision_standard+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if { ac_try='${CC-cc} -Werror -fexcess-precision=standard -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_fexcess_precision_standard=-fexcess-precision=standard
+else
+ libc_cv_fexcess_precision_standard=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_fexcess_precision_standard" >&5
+$as_echo "$libc_cv_fexcess_precision_standard" >&6; }
+config_vars="$config_vars
+config-cflags-fexcess-precision-standard = $libc_cv_fexcess_precision_standard"
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5
$as_echo_n "checking whether cc puts quotes around section names... " >&6; }
if ${libc_cv_have_section_quotes+:} false; then :
diff --git a/configure.ac b/configure.ac
index bebf3e3bf1..712cbaaaf5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1411,6 +1411,14 @@ AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized,
LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
[$libc_cv_wno_maybe_uninitialized])
+AC_CACHE_CHECK([for -fexcess-precision=standard], libc_cv_fexcess_precision_standard, [dnl
+ LIBC_TRY_CC_OPTION([-Werror -fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=-fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=])
+])
+LIBC_CONFIG_VAR([config-cflags-fexcess-precision-standard],
+ [$libc_cv_fexcess_precision_standard])
+
AC_CACHE_CHECK(whether cc puts quotes around section names,
libc_cv_have_section_quotes,
[cat > conftest.c <<EOF
diff --git a/math/Makefile b/math/Makefile
index 71708f5542..f4ded1586d 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -455,9 +455,9 @@ CFLAGS-test-math-iszero.cc += -std=gnu++11
CFLAGS-test-math-issignaling.cc += -std=gnu++11
CFLAGS-test-math-iscanonical.cc += -std=gnu++11
-CFLAGS-test-iszero-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-iseqsig-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-flt-eval-method.c += -fexcess-precision=standard
+CFLAGS-test-iszero-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-iseqsig-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-flt-eval-method.c += $(config-cflags-fexcess-precision-standard)
CFLAGS-test-fe-snans-always-signal.c += $(config-cflags-signaling-nans)
@@ -776,6 +776,16 @@ CFLAGS-s_modff.c += $(config-cflags-signaling-nans)
CFLAGS-s_modfl.c += $(config-cflags-signaling-nans)
CFLAGS-s_modff128.c += $(config-cflags-signaling-nans)
+CFLAGS-s_llround.c += -Wno-incompatible-library-redeclaration
+CFLAGS-s_fabsl.c += -Wno-ignored-attributes
+CFLAGS-s_fabsf128.c += -Wno-ignored-attributes
+CFLAGS-fraiseexcpt.c += -Wno-ignored-attributes
+CFLAGS-fegetround.c += -Wno-ignored-attributes
+CFLAGS-fesetround.c += -Wno-ignored-attributes
+CFLAGS-fegetenv.c += -Wno-ignored-attributes
+CFLAGS-fesetenv.c += -Wno-ignored-attributes
+CFLAGS-feholdexcpt.c += -Wno-ignored-attributes
+
$(addprefix $(objpfx),\
$(filter-out $(tests-static) $(libm-tests-vector),\
$(tests) $(tests-internal))): $(libm)
diff --git a/support/Makefile b/support/Makefile
index 9b50eac117..f78e65a53f 100644
--- a/support/Makefile
+++ b/support/Makefile
@@ -234,8 +234,8 @@ CFLAGS-support_paths.c = \
# being withing the observed range. The code uses double internally
# in support_timespec_check_in_range and for that computation we use
# -fexcess-precision=standard.
-CFLAGS-timespec.c += -fexcess-precision=standard
-CFLAGS-timespec-time64.c += -fexcess-precision=standard
+CFLAGS-timespec.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-timespec-time64.c += $(config-cflags-fexcess-precision-standard)
ifeq (,$(CXX))
LINKS_DSO_PROGRAM = links-dso-program-c
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 600e42c3db..68bd42cdd3 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -8,7 +8,7 @@ tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
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
-CFLAGS-test-flt-eval-method-387.c += -fexcess-precision=standard -mfpmath=387
-CFLAGS-test-flt-eval-method-sse.c += -fexcess-precision=standard -msse2 \
+CFLAGS-test-flt-eval-method-387.c += $(config-cflags-fexcess-precision-standard) -mfpmath=387
+CFLAGS-test-flt-eval-method-sse.c += $(config-cflags-fexcess-precision-standard) -msse2 \
-mfpmath=sse
endif
^ permalink raw reply [flat|nested] 24+ messages in thread
* [glibc/azanella/clang] math: Use -fexcess-precision=standard iff compiler supports it
@ 2022-06-03 14:05 Adhemerval Zanella
0 siblings, 0 replies; 24+ messages in thread
From: Adhemerval Zanella @ 2022-06-03 14:05 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c9e5791c5dd777927f40166c4f1ce4bd31c97ded
commit c9e5791c5dd777927f40166c4f1ce4bd31c97ded
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Mar 10 17:22:41 2022 -0300
math: Use -fexcess-precision=standard iff compiler supports it
Diff:
---
configure | 22 ++++++++++++++++++++++
configure.ac | 8 ++++++++
math/Makefile | 16 +++++++++++++---
support/Makefile | 4 ++--
sysdeps/x86/fpu/Makefile | 4 ++--
5 files changed, 47 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index 48f24a6f9d..94f9e082ed 100755
--- a/configure
+++ b/configure
@@ -6279,6 +6279,28 @@ $as_echo "$libc_cv_wno_maybe_uninitialized" >&6; }
config_vars="$config_vars
config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fexcess-precision=standard" >&5
+$as_echo_n "checking for -fexcess-precision=standard... " >&6; }
+if ${libc_cv_fexcess_precision_standard+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if { ac_try='${CC-cc} -Werror -fexcess-precision=standard -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_fexcess_precision_standard=-fexcess-precision=standard
+else
+ libc_cv_fexcess_precision_standard=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_fexcess_precision_standard" >&5
+$as_echo "$libc_cv_fexcess_precision_standard" >&6; }
+config_vars="$config_vars
+config-cflags-fexcess-precision-standard = $libc_cv_fexcess_precision_standard"
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5
$as_echo_n "checking whether cc puts quotes around section names... " >&6; }
if ${libc_cv_have_section_quotes+:} false; then :
diff --git a/configure.ac b/configure.ac
index bebf3e3bf1..712cbaaaf5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1411,6 +1411,14 @@ AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized,
LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
[$libc_cv_wno_maybe_uninitialized])
+AC_CACHE_CHECK([for -fexcess-precision=standard], libc_cv_fexcess_precision_standard, [dnl
+ LIBC_TRY_CC_OPTION([-Werror -fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=-fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=])
+])
+LIBC_CONFIG_VAR([config-cflags-fexcess-precision-standard],
+ [$libc_cv_fexcess_precision_standard])
+
AC_CACHE_CHECK(whether cc puts quotes around section names,
libc_cv_have_section_quotes,
[cat > conftest.c <<EOF
diff --git a/math/Makefile b/math/Makefile
index 71708f5542..f4ded1586d 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -455,9 +455,9 @@ CFLAGS-test-math-iszero.cc += -std=gnu++11
CFLAGS-test-math-issignaling.cc += -std=gnu++11
CFLAGS-test-math-iscanonical.cc += -std=gnu++11
-CFLAGS-test-iszero-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-iseqsig-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-flt-eval-method.c += -fexcess-precision=standard
+CFLAGS-test-iszero-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-iseqsig-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-flt-eval-method.c += $(config-cflags-fexcess-precision-standard)
CFLAGS-test-fe-snans-always-signal.c += $(config-cflags-signaling-nans)
@@ -776,6 +776,16 @@ CFLAGS-s_modff.c += $(config-cflags-signaling-nans)
CFLAGS-s_modfl.c += $(config-cflags-signaling-nans)
CFLAGS-s_modff128.c += $(config-cflags-signaling-nans)
+CFLAGS-s_llround.c += -Wno-incompatible-library-redeclaration
+CFLAGS-s_fabsl.c += -Wno-ignored-attributes
+CFLAGS-s_fabsf128.c += -Wno-ignored-attributes
+CFLAGS-fraiseexcpt.c += -Wno-ignored-attributes
+CFLAGS-fegetround.c += -Wno-ignored-attributes
+CFLAGS-fesetround.c += -Wno-ignored-attributes
+CFLAGS-fegetenv.c += -Wno-ignored-attributes
+CFLAGS-fesetenv.c += -Wno-ignored-attributes
+CFLAGS-feholdexcpt.c += -Wno-ignored-attributes
+
$(addprefix $(objpfx),\
$(filter-out $(tests-static) $(libm-tests-vector),\
$(tests) $(tests-internal))): $(libm)
diff --git a/support/Makefile b/support/Makefile
index 9b50eac117..f78e65a53f 100644
--- a/support/Makefile
+++ b/support/Makefile
@@ -234,8 +234,8 @@ CFLAGS-support_paths.c = \
# being withing the observed range. The code uses double internally
# in support_timespec_check_in_range and for that computation we use
# -fexcess-precision=standard.
-CFLAGS-timespec.c += -fexcess-precision=standard
-CFLAGS-timespec-time64.c += -fexcess-precision=standard
+CFLAGS-timespec.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-timespec-time64.c += $(config-cflags-fexcess-precision-standard)
ifeq (,$(CXX))
LINKS_DSO_PROGRAM = links-dso-program-c
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 600e42c3db..68bd42cdd3 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -8,7 +8,7 @@ tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
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
-CFLAGS-test-flt-eval-method-387.c += -fexcess-precision=standard -mfpmath=387
-CFLAGS-test-flt-eval-method-sse.c += -fexcess-precision=standard -msse2 \
+CFLAGS-test-flt-eval-method-387.c += $(config-cflags-fexcess-precision-standard) -mfpmath=387
+CFLAGS-test-flt-eval-method-sse.c += $(config-cflags-fexcess-precision-standard) -msse2 \
-mfpmath=sse
endif
^ permalink raw reply [flat|nested] 24+ messages in thread
* [glibc/azanella/clang] math: Use -fexcess-precision=standard iff compiler supports it
@ 2022-05-13 14:19 Adhemerval Zanella
0 siblings, 0 replies; 24+ messages in thread
From: Adhemerval Zanella @ 2022-05-13 14:19 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=244e791e4993000a08d0a436d3ed6157c7fb5cdf
commit 244e791e4993000a08d0a436d3ed6157c7fb5cdf
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Mar 10 17:22:41 2022 -0300
math: Use -fexcess-precision=standard iff compiler supports it
Diff:
---
configure | 22 ++++++++++++++++++++++
configure.ac | 8 ++++++++
math/Makefile | 16 +++++++++++++---
support/Makefile | 4 ++--
sysdeps/x86/fpu/Makefile | 4 ++--
5 files changed, 47 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index 48f24a6f9d..94f9e082ed 100755
--- a/configure
+++ b/configure
@@ -6279,6 +6279,28 @@ $as_echo "$libc_cv_wno_maybe_uninitialized" >&6; }
config_vars="$config_vars
config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fexcess-precision=standard" >&5
+$as_echo_n "checking for -fexcess-precision=standard... " >&6; }
+if ${libc_cv_fexcess_precision_standard+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if { ac_try='${CC-cc} -Werror -fexcess-precision=standard -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_fexcess_precision_standard=-fexcess-precision=standard
+else
+ libc_cv_fexcess_precision_standard=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_fexcess_precision_standard" >&5
+$as_echo "$libc_cv_fexcess_precision_standard" >&6; }
+config_vars="$config_vars
+config-cflags-fexcess-precision-standard = $libc_cv_fexcess_precision_standard"
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5
$as_echo_n "checking whether cc puts quotes around section names... " >&6; }
if ${libc_cv_have_section_quotes+:} false; then :
diff --git a/configure.ac b/configure.ac
index bebf3e3bf1..712cbaaaf5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1411,6 +1411,14 @@ AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized,
LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
[$libc_cv_wno_maybe_uninitialized])
+AC_CACHE_CHECK([for -fexcess-precision=standard], libc_cv_fexcess_precision_standard, [dnl
+ LIBC_TRY_CC_OPTION([-Werror -fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=-fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=])
+])
+LIBC_CONFIG_VAR([config-cflags-fexcess-precision-standard],
+ [$libc_cv_fexcess_precision_standard])
+
AC_CACHE_CHECK(whether cc puts quotes around section names,
libc_cv_have_section_quotes,
[cat > conftest.c <<EOF
diff --git a/math/Makefile b/math/Makefile
index 71708f5542..f4ded1586d 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -455,9 +455,9 @@ CFLAGS-test-math-iszero.cc += -std=gnu++11
CFLAGS-test-math-issignaling.cc += -std=gnu++11
CFLAGS-test-math-iscanonical.cc += -std=gnu++11
-CFLAGS-test-iszero-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-iseqsig-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-flt-eval-method.c += -fexcess-precision=standard
+CFLAGS-test-iszero-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-iseqsig-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-flt-eval-method.c += $(config-cflags-fexcess-precision-standard)
CFLAGS-test-fe-snans-always-signal.c += $(config-cflags-signaling-nans)
@@ -776,6 +776,16 @@ CFLAGS-s_modff.c += $(config-cflags-signaling-nans)
CFLAGS-s_modfl.c += $(config-cflags-signaling-nans)
CFLAGS-s_modff128.c += $(config-cflags-signaling-nans)
+CFLAGS-s_llround.c += -Wno-incompatible-library-redeclaration
+CFLAGS-s_fabsl.c += -Wno-ignored-attributes
+CFLAGS-s_fabsf128.c += -Wno-ignored-attributes
+CFLAGS-fraiseexcpt.c += -Wno-ignored-attributes
+CFLAGS-fegetround.c += -Wno-ignored-attributes
+CFLAGS-fesetround.c += -Wno-ignored-attributes
+CFLAGS-fegetenv.c += -Wno-ignored-attributes
+CFLAGS-fesetenv.c += -Wno-ignored-attributes
+CFLAGS-feholdexcpt.c += -Wno-ignored-attributes
+
$(addprefix $(objpfx),\
$(filter-out $(tests-static) $(libm-tests-vector),\
$(tests) $(tests-internal))): $(libm)
diff --git a/support/Makefile b/support/Makefile
index 9b50eac117..f78e65a53f 100644
--- a/support/Makefile
+++ b/support/Makefile
@@ -234,8 +234,8 @@ CFLAGS-support_paths.c = \
# being withing the observed range. The code uses double internally
# in support_timespec_check_in_range and for that computation we use
# -fexcess-precision=standard.
-CFLAGS-timespec.c += -fexcess-precision=standard
-CFLAGS-timespec-time64.c += -fexcess-precision=standard
+CFLAGS-timespec.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-timespec-time64.c += $(config-cflags-fexcess-precision-standard)
ifeq (,$(CXX))
LINKS_DSO_PROGRAM = links-dso-program-c
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 600e42c3db..68bd42cdd3 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -8,7 +8,7 @@ tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
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
-CFLAGS-test-flt-eval-method-387.c += -fexcess-precision=standard -mfpmath=387
-CFLAGS-test-flt-eval-method-sse.c += -fexcess-precision=standard -msse2 \
+CFLAGS-test-flt-eval-method-387.c += $(config-cflags-fexcess-precision-standard) -mfpmath=387
+CFLAGS-test-flt-eval-method-sse.c += $(config-cflags-fexcess-precision-standard) -msse2 \
-mfpmath=sse
endif
^ permalink raw reply [flat|nested] 24+ messages in thread
* [glibc/azanella/clang] math: Use -fexcess-precision=standard iff compiler supports it
@ 2022-05-12 19:33 Adhemerval Zanella
0 siblings, 0 replies; 24+ messages in thread
From: Adhemerval Zanella @ 2022-05-12 19:33 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=66903da9a11e3d8ef80a123d9c23c02f15486b47
commit 66903da9a11e3d8ef80a123d9c23c02f15486b47
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Mar 10 17:22:41 2022 -0300
math: Use -fexcess-precision=standard iff compiler supports it
Diff:
---
configure | 22 ++++++++++++++++++++++
configure.ac | 8 ++++++++
math/Makefile | 16 +++++++++++++---
support/Makefile | 4 ++--
sysdeps/x86/fpu/Makefile | 4 ++--
5 files changed, 47 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index 48f24a6f9d..94f9e082ed 100755
--- a/configure
+++ b/configure
@@ -6279,6 +6279,28 @@ $as_echo "$libc_cv_wno_maybe_uninitialized" >&6; }
config_vars="$config_vars
config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fexcess-precision=standard" >&5
+$as_echo_n "checking for -fexcess-precision=standard... " >&6; }
+if ${libc_cv_fexcess_precision_standard+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if { ac_try='${CC-cc} -Werror -fexcess-precision=standard -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_fexcess_precision_standard=-fexcess-precision=standard
+else
+ libc_cv_fexcess_precision_standard=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_fexcess_precision_standard" >&5
+$as_echo "$libc_cv_fexcess_precision_standard" >&6; }
+config_vars="$config_vars
+config-cflags-fexcess-precision-standard = $libc_cv_fexcess_precision_standard"
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5
$as_echo_n "checking whether cc puts quotes around section names... " >&6; }
if ${libc_cv_have_section_quotes+:} false; then :
diff --git a/configure.ac b/configure.ac
index bebf3e3bf1..712cbaaaf5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1411,6 +1411,14 @@ AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized,
LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
[$libc_cv_wno_maybe_uninitialized])
+AC_CACHE_CHECK([for -fexcess-precision=standard], libc_cv_fexcess_precision_standard, [dnl
+ LIBC_TRY_CC_OPTION([-Werror -fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=-fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=])
+])
+LIBC_CONFIG_VAR([config-cflags-fexcess-precision-standard],
+ [$libc_cv_fexcess_precision_standard])
+
AC_CACHE_CHECK(whether cc puts quotes around section names,
libc_cv_have_section_quotes,
[cat > conftest.c <<EOF
diff --git a/math/Makefile b/math/Makefile
index 71708f5542..f4ded1586d 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -455,9 +455,9 @@ CFLAGS-test-math-iszero.cc += -std=gnu++11
CFLAGS-test-math-issignaling.cc += -std=gnu++11
CFLAGS-test-math-iscanonical.cc += -std=gnu++11
-CFLAGS-test-iszero-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-iseqsig-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-flt-eval-method.c += -fexcess-precision=standard
+CFLAGS-test-iszero-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-iseqsig-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-flt-eval-method.c += $(config-cflags-fexcess-precision-standard)
CFLAGS-test-fe-snans-always-signal.c += $(config-cflags-signaling-nans)
@@ -776,6 +776,16 @@ CFLAGS-s_modff.c += $(config-cflags-signaling-nans)
CFLAGS-s_modfl.c += $(config-cflags-signaling-nans)
CFLAGS-s_modff128.c += $(config-cflags-signaling-nans)
+CFLAGS-s_llround.c += -Wno-incompatible-library-redeclaration
+CFLAGS-s_fabsl.c += -Wno-ignored-attributes
+CFLAGS-s_fabsf128.c += -Wno-ignored-attributes
+CFLAGS-fraiseexcpt.c += -Wno-ignored-attributes
+CFLAGS-fegetround.c += -Wno-ignored-attributes
+CFLAGS-fesetround.c += -Wno-ignored-attributes
+CFLAGS-fegetenv.c += -Wno-ignored-attributes
+CFLAGS-fesetenv.c += -Wno-ignored-attributes
+CFLAGS-feholdexcpt.c += -Wno-ignored-attributes
+
$(addprefix $(objpfx),\
$(filter-out $(tests-static) $(libm-tests-vector),\
$(tests) $(tests-internal))): $(libm)
diff --git a/support/Makefile b/support/Makefile
index 9b50eac117..f78e65a53f 100644
--- a/support/Makefile
+++ b/support/Makefile
@@ -234,8 +234,8 @@ CFLAGS-support_paths.c = \
# being withing the observed range. The code uses double internally
# in support_timespec_check_in_range and for that computation we use
# -fexcess-precision=standard.
-CFLAGS-timespec.c += -fexcess-precision=standard
-CFLAGS-timespec-time64.c += -fexcess-precision=standard
+CFLAGS-timespec.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-timespec-time64.c += $(config-cflags-fexcess-precision-standard)
ifeq (,$(CXX))
LINKS_DSO_PROGRAM = links-dso-program-c
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 600e42c3db..68bd42cdd3 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -8,7 +8,7 @@ tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
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
-CFLAGS-test-flt-eval-method-387.c += -fexcess-precision=standard -mfpmath=387
-CFLAGS-test-flt-eval-method-sse.c += -fexcess-precision=standard -msse2 \
+CFLAGS-test-flt-eval-method-387.c += $(config-cflags-fexcess-precision-standard) -mfpmath=387
+CFLAGS-test-flt-eval-method-sse.c += $(config-cflags-fexcess-precision-standard) -msse2 \
-mfpmath=sse
endif
^ permalink raw reply [flat|nested] 24+ messages in thread
* [glibc/azanella/clang] math: Use -fexcess-precision=standard iff compiler supports it
@ 2022-05-10 18:23 Adhemerval Zanella
0 siblings, 0 replies; 24+ messages in thread
From: Adhemerval Zanella @ 2022-05-10 18:23 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e0caa8f81129fa8115428526267002087fdaf43d
commit e0caa8f81129fa8115428526267002087fdaf43d
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Mar 10 17:22:41 2022 -0300
math: Use -fexcess-precision=standard iff compiler supports it
Diff:
---
configure | 22 ++++++++++++++++++++++
configure.ac | 8 ++++++++
math/Makefile | 16 +++++++++++++---
support/Makefile | 4 ++--
sysdeps/x86/fpu/Makefile | 4 ++--
5 files changed, 47 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index 48f24a6f9d..94f9e082ed 100755
--- a/configure
+++ b/configure
@@ -6279,6 +6279,28 @@ $as_echo "$libc_cv_wno_maybe_uninitialized" >&6; }
config_vars="$config_vars
config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fexcess-precision=standard" >&5
+$as_echo_n "checking for -fexcess-precision=standard... " >&6; }
+if ${libc_cv_fexcess_precision_standard+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if { ac_try='${CC-cc} -Werror -fexcess-precision=standard -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_fexcess_precision_standard=-fexcess-precision=standard
+else
+ libc_cv_fexcess_precision_standard=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_fexcess_precision_standard" >&5
+$as_echo "$libc_cv_fexcess_precision_standard" >&6; }
+config_vars="$config_vars
+config-cflags-fexcess-precision-standard = $libc_cv_fexcess_precision_standard"
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5
$as_echo_n "checking whether cc puts quotes around section names... " >&6; }
if ${libc_cv_have_section_quotes+:} false; then :
diff --git a/configure.ac b/configure.ac
index bebf3e3bf1..712cbaaaf5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1411,6 +1411,14 @@ AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized,
LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
[$libc_cv_wno_maybe_uninitialized])
+AC_CACHE_CHECK([for -fexcess-precision=standard], libc_cv_fexcess_precision_standard, [dnl
+ LIBC_TRY_CC_OPTION([-Werror -fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=-fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=])
+])
+LIBC_CONFIG_VAR([config-cflags-fexcess-precision-standard],
+ [$libc_cv_fexcess_precision_standard])
+
AC_CACHE_CHECK(whether cc puts quotes around section names,
libc_cv_have_section_quotes,
[cat > conftest.c <<EOF
diff --git a/math/Makefile b/math/Makefile
index 71708f5542..f4ded1586d 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -455,9 +455,9 @@ CFLAGS-test-math-iszero.cc += -std=gnu++11
CFLAGS-test-math-issignaling.cc += -std=gnu++11
CFLAGS-test-math-iscanonical.cc += -std=gnu++11
-CFLAGS-test-iszero-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-iseqsig-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-flt-eval-method.c += -fexcess-precision=standard
+CFLAGS-test-iszero-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-iseqsig-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-flt-eval-method.c += $(config-cflags-fexcess-precision-standard)
CFLAGS-test-fe-snans-always-signal.c += $(config-cflags-signaling-nans)
@@ -776,6 +776,16 @@ CFLAGS-s_modff.c += $(config-cflags-signaling-nans)
CFLAGS-s_modfl.c += $(config-cflags-signaling-nans)
CFLAGS-s_modff128.c += $(config-cflags-signaling-nans)
+CFLAGS-s_llround.c += -Wno-incompatible-library-redeclaration
+CFLAGS-s_fabsl.c += -Wno-ignored-attributes
+CFLAGS-s_fabsf128.c += -Wno-ignored-attributes
+CFLAGS-fraiseexcpt.c += -Wno-ignored-attributes
+CFLAGS-fegetround.c += -Wno-ignored-attributes
+CFLAGS-fesetround.c += -Wno-ignored-attributes
+CFLAGS-fegetenv.c += -Wno-ignored-attributes
+CFLAGS-fesetenv.c += -Wno-ignored-attributes
+CFLAGS-feholdexcpt.c += -Wno-ignored-attributes
+
$(addprefix $(objpfx),\
$(filter-out $(tests-static) $(libm-tests-vector),\
$(tests) $(tests-internal))): $(libm)
diff --git a/support/Makefile b/support/Makefile
index 9b50eac117..f78e65a53f 100644
--- a/support/Makefile
+++ b/support/Makefile
@@ -234,8 +234,8 @@ CFLAGS-support_paths.c = \
# being withing the observed range. The code uses double internally
# in support_timespec_check_in_range and for that computation we use
# -fexcess-precision=standard.
-CFLAGS-timespec.c += -fexcess-precision=standard
-CFLAGS-timespec-time64.c += -fexcess-precision=standard
+CFLAGS-timespec.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-timespec-time64.c += $(config-cflags-fexcess-precision-standard)
ifeq (,$(CXX))
LINKS_DSO_PROGRAM = links-dso-program-c
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 600e42c3db..68bd42cdd3 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -8,7 +8,7 @@ tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
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
-CFLAGS-test-flt-eval-method-387.c += -fexcess-precision=standard -mfpmath=387
-CFLAGS-test-flt-eval-method-sse.c += -fexcess-precision=standard -msse2 \
+CFLAGS-test-flt-eval-method-387.c += $(config-cflags-fexcess-precision-standard) -mfpmath=387
+CFLAGS-test-flt-eval-method-sse.c += $(config-cflags-fexcess-precision-standard) -msse2 \
-mfpmath=sse
endif
^ permalink raw reply [flat|nested] 24+ messages in thread
* [glibc/azanella/clang] math: Use -fexcess-precision=standard iff compiler supports it
@ 2022-04-29 14:03 Adhemerval Zanella
0 siblings, 0 replies; 24+ messages in thread
From: Adhemerval Zanella @ 2022-04-29 14:03 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a46390b272b32f66bab3387205a69b19da40c0f1
commit a46390b272b32f66bab3387205a69b19da40c0f1
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Mar 10 17:22:41 2022 -0300
math: Use -fexcess-precision=standard iff compiler supports it
Diff:
---
configure | 22 ++++++++++++++++++++++
configure.ac | 8 ++++++++
math/Makefile | 16 +++++++++++++---
support/Makefile | 4 ++--
sysdeps/x86/fpu/Makefile | 4 ++--
5 files changed, 47 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index 60819646fd..4999f69f6a 100755
--- a/configure
+++ b/configure
@@ -6307,6 +6307,28 @@ $as_echo "$libc_cv_wno_maybe_uninitialized" >&6; }
config_vars="$config_vars
config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fexcess-precision=standard" >&5
+$as_echo_n "checking for -fexcess-precision=standard... " >&6; }
+if ${libc_cv_fexcess_precision_standard+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if { ac_try='${CC-cc} -Werror -fexcess-precision=standard -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_fexcess_precision_standard=-fexcess-precision=standard
+else
+ libc_cv_fexcess_precision_standard=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_fexcess_precision_standard" >&5
+$as_echo "$libc_cv_fexcess_precision_standard" >&6; }
+config_vars="$config_vars
+config-cflags-fexcess-precision-standard = $libc_cv_fexcess_precision_standard"
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5
$as_echo_n "checking whether cc puts quotes around section names... " >&6; }
if ${libc_cv_have_section_quotes+:} false; then :
diff --git a/configure.ac b/configure.ac
index 712464126a..93d4198599 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1427,6 +1427,14 @@ AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized,
LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
[$libc_cv_wno_maybe_uninitialized])
+AC_CACHE_CHECK([for -fexcess-precision=standard], libc_cv_fexcess_precision_standard, [dnl
+ LIBC_TRY_CC_OPTION([-Werror -fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=-fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=])
+])
+LIBC_CONFIG_VAR([config-cflags-fexcess-precision-standard],
+ [$libc_cv_fexcess_precision_standard])
+
AC_CACHE_CHECK(whether cc puts quotes around section names,
libc_cv_have_section_quotes,
[cat > conftest.c <<EOF
diff --git a/math/Makefile b/math/Makefile
index 71708f5542..f4ded1586d 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -455,9 +455,9 @@ CFLAGS-test-math-iszero.cc += -std=gnu++11
CFLAGS-test-math-issignaling.cc += -std=gnu++11
CFLAGS-test-math-iscanonical.cc += -std=gnu++11
-CFLAGS-test-iszero-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-iseqsig-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-flt-eval-method.c += -fexcess-precision=standard
+CFLAGS-test-iszero-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-iseqsig-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-flt-eval-method.c += $(config-cflags-fexcess-precision-standard)
CFLAGS-test-fe-snans-always-signal.c += $(config-cflags-signaling-nans)
@@ -776,6 +776,16 @@ CFLAGS-s_modff.c += $(config-cflags-signaling-nans)
CFLAGS-s_modfl.c += $(config-cflags-signaling-nans)
CFLAGS-s_modff128.c += $(config-cflags-signaling-nans)
+CFLAGS-s_llround.c += -Wno-incompatible-library-redeclaration
+CFLAGS-s_fabsl.c += -Wno-ignored-attributes
+CFLAGS-s_fabsf128.c += -Wno-ignored-attributes
+CFLAGS-fraiseexcpt.c += -Wno-ignored-attributes
+CFLAGS-fegetround.c += -Wno-ignored-attributes
+CFLAGS-fesetround.c += -Wno-ignored-attributes
+CFLAGS-fegetenv.c += -Wno-ignored-attributes
+CFLAGS-fesetenv.c += -Wno-ignored-attributes
+CFLAGS-feholdexcpt.c += -Wno-ignored-attributes
+
$(addprefix $(objpfx),\
$(filter-out $(tests-static) $(libm-tests-vector),\
$(tests) $(tests-internal))): $(libm)
diff --git a/support/Makefile b/support/Makefile
index 9b50eac117..f78e65a53f 100644
--- a/support/Makefile
+++ b/support/Makefile
@@ -234,8 +234,8 @@ CFLAGS-support_paths.c = \
# being withing the observed range. The code uses double internally
# in support_timespec_check_in_range and for that computation we use
# -fexcess-precision=standard.
-CFLAGS-timespec.c += -fexcess-precision=standard
-CFLAGS-timespec-time64.c += -fexcess-precision=standard
+CFLAGS-timespec.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-timespec-time64.c += $(config-cflags-fexcess-precision-standard)
ifeq (,$(CXX))
LINKS_DSO_PROGRAM = links-dso-program-c
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 600e42c3db..68bd42cdd3 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -8,7 +8,7 @@ tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
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
-CFLAGS-test-flt-eval-method-387.c += -fexcess-precision=standard -mfpmath=387
-CFLAGS-test-flt-eval-method-sse.c += -fexcess-precision=standard -msse2 \
+CFLAGS-test-flt-eval-method-387.c += $(config-cflags-fexcess-precision-standard) -mfpmath=387
+CFLAGS-test-flt-eval-method-sse.c += $(config-cflags-fexcess-precision-standard) -msse2 \
-mfpmath=sse
endif
^ permalink raw reply [flat|nested] 24+ messages in thread
* [glibc/azanella/clang] math: Use -fexcess-precision=standard iff compiler supports it
@ 2022-04-04 12:54 Adhemerval Zanella
0 siblings, 0 replies; 24+ messages in thread
From: Adhemerval Zanella @ 2022-04-04 12:54 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0f75065bc6f3d65e364677e136c1e37a6a9bab23
commit 0f75065bc6f3d65e364677e136c1e37a6a9bab23
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Mar 10 17:22:41 2022 -0300
math: Use -fexcess-precision=standard iff compiler supports it
Diff:
---
configure | 22 ++++++++++++++++++++++
configure.ac | 8 ++++++++
math/Makefile | 16 +++++++++++++---
support/Makefile | 4 ++--
sysdeps/x86/fpu/Makefile | 4 ++--
5 files changed, 47 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index ce99af633a..105c917e72 100755
--- a/configure
+++ b/configure
@@ -6434,6 +6434,28 @@ $as_echo "$libc_cv_wno_maybe_uninitialized" >&6; }
config_vars="$config_vars
config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fexcess-precision=standard" >&5
+$as_echo_n "checking for -fexcess-precision=standard... " >&6; }
+if ${libc_cv_fexcess_precision_standard+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if { ac_try='${CC-cc} -Werror -fexcess-precision=standard -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_fexcess_precision_standard=-fexcess-precision=standard
+else
+ libc_cv_fexcess_precision_standard=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_fexcess_precision_standard" >&5
+$as_echo "$libc_cv_fexcess_precision_standard" >&6; }
+config_vars="$config_vars
+config-cflags-fexcess-precision-standard = $libc_cv_fexcess_precision_standard"
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5
$as_echo_n "checking whether cc puts quotes around section names... " >&6; }
if ${libc_cv_have_section_quotes+:} false; then :
diff --git a/configure.ac b/configure.ac
index f7d556db88..63336dd144 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1543,6 +1543,14 @@ AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized,
LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
[$libc_cv_wno_maybe_uninitialized])
+AC_CACHE_CHECK([for -fexcess-precision=standard], libc_cv_fexcess_precision_standard, [dnl
+ LIBC_TRY_CC_OPTION([-Werror -fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=-fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=])
+])
+LIBC_CONFIG_VAR([config-cflags-fexcess-precision-standard],
+ [$libc_cv_fexcess_precision_standard])
+
AC_CACHE_CHECK(whether cc puts quotes around section names,
libc_cv_have_section_quotes,
[cat > conftest.c <<EOF
diff --git a/math/Makefile b/math/Makefile
index 71708f5542..f4ded1586d 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -455,9 +455,9 @@ CFLAGS-test-math-iszero.cc += -std=gnu++11
CFLAGS-test-math-issignaling.cc += -std=gnu++11
CFLAGS-test-math-iscanonical.cc += -std=gnu++11
-CFLAGS-test-iszero-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-iseqsig-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-flt-eval-method.c += -fexcess-precision=standard
+CFLAGS-test-iszero-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-iseqsig-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-flt-eval-method.c += $(config-cflags-fexcess-precision-standard)
CFLAGS-test-fe-snans-always-signal.c += $(config-cflags-signaling-nans)
@@ -776,6 +776,16 @@ CFLAGS-s_modff.c += $(config-cflags-signaling-nans)
CFLAGS-s_modfl.c += $(config-cflags-signaling-nans)
CFLAGS-s_modff128.c += $(config-cflags-signaling-nans)
+CFLAGS-s_llround.c += -Wno-incompatible-library-redeclaration
+CFLAGS-s_fabsl.c += -Wno-ignored-attributes
+CFLAGS-s_fabsf128.c += -Wno-ignored-attributes
+CFLAGS-fraiseexcpt.c += -Wno-ignored-attributes
+CFLAGS-fegetround.c += -Wno-ignored-attributes
+CFLAGS-fesetround.c += -Wno-ignored-attributes
+CFLAGS-fegetenv.c += -Wno-ignored-attributes
+CFLAGS-fesetenv.c += -Wno-ignored-attributes
+CFLAGS-feholdexcpt.c += -Wno-ignored-attributes
+
$(addprefix $(objpfx),\
$(filter-out $(tests-static) $(libm-tests-vector),\
$(tests) $(tests-internal))): $(libm)
diff --git a/support/Makefile b/support/Makefile
index 5ddcb8d158..1a157eea4e 100644
--- a/support/Makefile
+++ b/support/Makefile
@@ -232,8 +232,8 @@ CFLAGS-support_paths.c = \
# being withing the observed range. The code uses double internally
# in support_timespec_check_in_range and for that computation we use
# -fexcess-precision=standard.
-CFLAGS-timespec.c += -fexcess-precision=standard
-CFLAGS-timespec-time64.c += -fexcess-precision=standard
+CFLAGS-timespec.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-timespec-time64.c += $(config-cflags-fexcess-precision-standard)
ifeq (,$(CXX))
LINKS_DSO_PROGRAM = links-dso-program-c
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 600e42c3db..68bd42cdd3 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -8,7 +8,7 @@ tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
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
-CFLAGS-test-flt-eval-method-387.c += -fexcess-precision=standard -mfpmath=387
-CFLAGS-test-flt-eval-method-sse.c += -fexcess-precision=standard -msse2 \
+CFLAGS-test-flt-eval-method-387.c += $(config-cflags-fexcess-precision-standard) -mfpmath=387
+CFLAGS-test-flt-eval-method-sse.c += $(config-cflags-fexcess-precision-standard) -msse2 \
-mfpmath=sse
endif
^ permalink raw reply [flat|nested] 24+ messages in thread
* [glibc/azanella/clang] math: Use -fexcess-precision=standard iff compiler supports it
@ 2022-03-31 19:06 Adhemerval Zanella
0 siblings, 0 replies; 24+ messages in thread
From: Adhemerval Zanella @ 2022-03-31 19:06 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e09b0183a276a058ac90212cb5a3f7d7cc2c9eff
commit e09b0183a276a058ac90212cb5a3f7d7cc2c9eff
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Mar 10 17:22:41 2022 -0300
math: Use -fexcess-precision=standard iff compiler supports it
Diff:
---
configure | 22 ++++++++++++++++++++++
configure.ac | 8 ++++++++
math/Makefile | 16 +++++++++++++---
support/Makefile | 4 ++--
sysdeps/x86/fpu/Makefile | 4 ++--
5 files changed, 47 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index ce99af633a..105c917e72 100755
--- a/configure
+++ b/configure
@@ -6434,6 +6434,28 @@ $as_echo "$libc_cv_wno_maybe_uninitialized" >&6; }
config_vars="$config_vars
config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fexcess-precision=standard" >&5
+$as_echo_n "checking for -fexcess-precision=standard... " >&6; }
+if ${libc_cv_fexcess_precision_standard+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if { ac_try='${CC-cc} -Werror -fexcess-precision=standard -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_fexcess_precision_standard=-fexcess-precision=standard
+else
+ libc_cv_fexcess_precision_standard=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_fexcess_precision_standard" >&5
+$as_echo "$libc_cv_fexcess_precision_standard" >&6; }
+config_vars="$config_vars
+config-cflags-fexcess-precision-standard = $libc_cv_fexcess_precision_standard"
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5
$as_echo_n "checking whether cc puts quotes around section names... " >&6; }
if ${libc_cv_have_section_quotes+:} false; then :
diff --git a/configure.ac b/configure.ac
index f7d556db88..63336dd144 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1543,6 +1543,14 @@ AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized,
LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
[$libc_cv_wno_maybe_uninitialized])
+AC_CACHE_CHECK([for -fexcess-precision=standard], libc_cv_fexcess_precision_standard, [dnl
+ LIBC_TRY_CC_OPTION([-Werror -fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=-fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=])
+])
+LIBC_CONFIG_VAR([config-cflags-fexcess-precision-standard],
+ [$libc_cv_fexcess_precision_standard])
+
AC_CACHE_CHECK(whether cc puts quotes around section names,
libc_cv_have_section_quotes,
[cat > conftest.c <<EOF
diff --git a/math/Makefile b/math/Makefile
index 71708f5542..f4ded1586d 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -455,9 +455,9 @@ CFLAGS-test-math-iszero.cc += -std=gnu++11
CFLAGS-test-math-issignaling.cc += -std=gnu++11
CFLAGS-test-math-iscanonical.cc += -std=gnu++11
-CFLAGS-test-iszero-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-iseqsig-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-flt-eval-method.c += -fexcess-precision=standard
+CFLAGS-test-iszero-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-iseqsig-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-flt-eval-method.c += $(config-cflags-fexcess-precision-standard)
CFLAGS-test-fe-snans-always-signal.c += $(config-cflags-signaling-nans)
@@ -776,6 +776,16 @@ CFLAGS-s_modff.c += $(config-cflags-signaling-nans)
CFLAGS-s_modfl.c += $(config-cflags-signaling-nans)
CFLAGS-s_modff128.c += $(config-cflags-signaling-nans)
+CFLAGS-s_llround.c += -Wno-incompatible-library-redeclaration
+CFLAGS-s_fabsl.c += -Wno-ignored-attributes
+CFLAGS-s_fabsf128.c += -Wno-ignored-attributes
+CFLAGS-fraiseexcpt.c += -Wno-ignored-attributes
+CFLAGS-fegetround.c += -Wno-ignored-attributes
+CFLAGS-fesetround.c += -Wno-ignored-attributes
+CFLAGS-fegetenv.c += -Wno-ignored-attributes
+CFLAGS-fesetenv.c += -Wno-ignored-attributes
+CFLAGS-feholdexcpt.c += -Wno-ignored-attributes
+
$(addprefix $(objpfx),\
$(filter-out $(tests-static) $(libm-tests-vector),\
$(tests) $(tests-internal))): $(libm)
diff --git a/support/Makefile b/support/Makefile
index 5ddcb8d158..1a157eea4e 100644
--- a/support/Makefile
+++ b/support/Makefile
@@ -232,8 +232,8 @@ CFLAGS-support_paths.c = \
# being withing the observed range. The code uses double internally
# in support_timespec_check_in_range and for that computation we use
# -fexcess-precision=standard.
-CFLAGS-timespec.c += -fexcess-precision=standard
-CFLAGS-timespec-time64.c += -fexcess-precision=standard
+CFLAGS-timespec.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-timespec-time64.c += $(config-cflags-fexcess-precision-standard)
ifeq (,$(CXX))
LINKS_DSO_PROGRAM = links-dso-program-c
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 600e42c3db..68bd42cdd3 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -8,7 +8,7 @@ tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
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
-CFLAGS-test-flt-eval-method-387.c += -fexcess-precision=standard -mfpmath=387
-CFLAGS-test-flt-eval-method-sse.c += -fexcess-precision=standard -msse2 \
+CFLAGS-test-flt-eval-method-387.c += $(config-cflags-fexcess-precision-standard) -mfpmath=387
+CFLAGS-test-flt-eval-method-sse.c += $(config-cflags-fexcess-precision-standard) -msse2 \
-mfpmath=sse
endif
^ permalink raw reply [flat|nested] 24+ messages in thread
* [glibc/azanella/clang] math: Use -fexcess-precision=standard iff compiler supports it
@ 2022-03-29 20:29 Adhemerval Zanella
0 siblings, 0 replies; 24+ messages in thread
From: Adhemerval Zanella @ 2022-03-29 20:29 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e49076d6b3b6d809118479a2f12f78cdbc47b3ed
commit e49076d6b3b6d809118479a2f12f78cdbc47b3ed
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Mar 10 17:22:41 2022 -0300
math: Use -fexcess-precision=standard iff compiler supports it
Diff:
---
configure | 22 ++++++++++++++++++++++
configure.ac | 8 ++++++++
math/Makefile | 16 +++++++++++++---
support/Makefile | 4 ++--
sysdeps/x86/fpu/Makefile | 4 ++--
5 files changed, 47 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index ce99af633a..105c917e72 100755
--- a/configure
+++ b/configure
@@ -6434,6 +6434,28 @@ $as_echo "$libc_cv_wno_maybe_uninitialized" >&6; }
config_vars="$config_vars
config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fexcess-precision=standard" >&5
+$as_echo_n "checking for -fexcess-precision=standard... " >&6; }
+if ${libc_cv_fexcess_precision_standard+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if { ac_try='${CC-cc} -Werror -fexcess-precision=standard -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_fexcess_precision_standard=-fexcess-precision=standard
+else
+ libc_cv_fexcess_precision_standard=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_fexcess_precision_standard" >&5
+$as_echo "$libc_cv_fexcess_precision_standard" >&6; }
+config_vars="$config_vars
+config-cflags-fexcess-precision-standard = $libc_cv_fexcess_precision_standard"
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5
$as_echo_n "checking whether cc puts quotes around section names... " >&6; }
if ${libc_cv_have_section_quotes+:} false; then :
diff --git a/configure.ac b/configure.ac
index f7d556db88..63336dd144 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1543,6 +1543,14 @@ AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized,
LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
[$libc_cv_wno_maybe_uninitialized])
+AC_CACHE_CHECK([for -fexcess-precision=standard], libc_cv_fexcess_precision_standard, [dnl
+ LIBC_TRY_CC_OPTION([-Werror -fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=-fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=])
+])
+LIBC_CONFIG_VAR([config-cflags-fexcess-precision-standard],
+ [$libc_cv_fexcess_precision_standard])
+
AC_CACHE_CHECK(whether cc puts quotes around section names,
libc_cv_have_section_quotes,
[cat > conftest.c <<EOF
diff --git a/math/Makefile b/math/Makefile
index 71708f5542..f4ded1586d 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -455,9 +455,9 @@ CFLAGS-test-math-iszero.cc += -std=gnu++11
CFLAGS-test-math-issignaling.cc += -std=gnu++11
CFLAGS-test-math-iscanonical.cc += -std=gnu++11
-CFLAGS-test-iszero-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-iseqsig-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-flt-eval-method.c += -fexcess-precision=standard
+CFLAGS-test-iszero-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-iseqsig-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-flt-eval-method.c += $(config-cflags-fexcess-precision-standard)
CFLAGS-test-fe-snans-always-signal.c += $(config-cflags-signaling-nans)
@@ -776,6 +776,16 @@ CFLAGS-s_modff.c += $(config-cflags-signaling-nans)
CFLAGS-s_modfl.c += $(config-cflags-signaling-nans)
CFLAGS-s_modff128.c += $(config-cflags-signaling-nans)
+CFLAGS-s_llround.c += -Wno-incompatible-library-redeclaration
+CFLAGS-s_fabsl.c += -Wno-ignored-attributes
+CFLAGS-s_fabsf128.c += -Wno-ignored-attributes
+CFLAGS-fraiseexcpt.c += -Wno-ignored-attributes
+CFLAGS-fegetround.c += -Wno-ignored-attributes
+CFLAGS-fesetround.c += -Wno-ignored-attributes
+CFLAGS-fegetenv.c += -Wno-ignored-attributes
+CFLAGS-fesetenv.c += -Wno-ignored-attributes
+CFLAGS-feholdexcpt.c += -Wno-ignored-attributes
+
$(addprefix $(objpfx),\
$(filter-out $(tests-static) $(libm-tests-vector),\
$(tests) $(tests-internal))): $(libm)
diff --git a/support/Makefile b/support/Makefile
index 5ddcb8d158..1a157eea4e 100644
--- a/support/Makefile
+++ b/support/Makefile
@@ -232,8 +232,8 @@ CFLAGS-support_paths.c = \
# being withing the observed range. The code uses double internally
# in support_timespec_check_in_range and for that computation we use
# -fexcess-precision=standard.
-CFLAGS-timespec.c += -fexcess-precision=standard
-CFLAGS-timespec-time64.c += -fexcess-precision=standard
+CFLAGS-timespec.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-timespec-time64.c += $(config-cflags-fexcess-precision-standard)
ifeq (,$(CXX))
LINKS_DSO_PROGRAM = links-dso-program-c
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 600e42c3db..68bd42cdd3 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -8,7 +8,7 @@ tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
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
-CFLAGS-test-flt-eval-method-387.c += -fexcess-precision=standard -mfpmath=387
-CFLAGS-test-flt-eval-method-sse.c += -fexcess-precision=standard -msse2 \
+CFLAGS-test-flt-eval-method-387.c += $(config-cflags-fexcess-precision-standard) -mfpmath=387
+CFLAGS-test-flt-eval-method-sse.c += $(config-cflags-fexcess-precision-standard) -msse2 \
-mfpmath=sse
endif
^ permalink raw reply [flat|nested] 24+ messages in thread
* [glibc/azanella/clang] math: Use -fexcess-precision=standard iff compiler supports it
@ 2022-03-16 18:03 Adhemerval Zanella
0 siblings, 0 replies; 24+ messages in thread
From: Adhemerval Zanella @ 2022-03-16 18:03 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7f921560de29bda362ac46ac618d4ad88677e90c
commit 7f921560de29bda362ac46ac618d4ad88677e90c
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Mar 10 17:22:41 2022 -0300
math: Use -fexcess-precision=standard iff compiler supports it
Diff:
---
configure | 22 ++++++++++++++++++++++
configure.ac | 8 ++++++++
math/Makefile | 16 +++++++++++++---
support/Makefile | 4 ++--
sysdeps/x86/fpu/Makefile | 4 ++--
5 files changed, 47 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index e0589dbebe..ff0a3841d2 100755
--- a/configure
+++ b/configure
@@ -6435,6 +6435,28 @@ $as_echo "$libc_cv_wno_maybe_uninitialized" >&6; }
config_vars="$config_vars
config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fexcess-precision=standard" >&5
+$as_echo_n "checking for -fexcess-precision=standard... " >&6; }
+if ${libc_cv_fexcess_precision_standard+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if { ac_try='${CC-cc} -Werror -fexcess-precision=standard -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_fexcess_precision_standard=-fexcess-precision=standard
+else
+ libc_cv_fexcess_precision_standard=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_fexcess_precision_standard" >&5
+$as_echo "$libc_cv_fexcess_precision_standard" >&6; }
+config_vars="$config_vars
+config-cflags-fexcess-precision-standard = $libc_cv_fexcess_precision_standard"
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5
$as_echo_n "checking whether cc puts quotes around section names... " >&6; }
if ${libc_cv_have_section_quotes+:} false; then :
diff --git a/configure.ac b/configure.ac
index d5b5b5e88c..dd8fb99867 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1543,6 +1543,14 @@ AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized,
LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
[$libc_cv_wno_maybe_uninitialized])
+AC_CACHE_CHECK([for -fexcess-precision=standard], libc_cv_fexcess_precision_standard, [dnl
+ LIBC_TRY_CC_OPTION([-Werror -fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=-fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=])
+])
+LIBC_CONFIG_VAR([config-cflags-fexcess-precision-standard],
+ [$libc_cv_fexcess_precision_standard])
+
AC_CACHE_CHECK(whether cc puts quotes around section names,
libc_cv_have_section_quotes,
[cat > conftest.c <<EOF
diff --git a/math/Makefile b/math/Makefile
index a4932b3d0b..b0bc84c49b 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -452,9 +452,9 @@ CFLAGS-test-math-iszero.cc += -std=gnu++11
CFLAGS-test-math-issignaling.cc += -std=gnu++11
CFLAGS-test-math-iscanonical.cc += -std=gnu++11
-CFLAGS-test-iszero-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-iseqsig-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-flt-eval-method.c += -fexcess-precision=standard
+CFLAGS-test-iszero-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-iseqsig-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-flt-eval-method.c += $(config-cflags-fexcess-precision-standard)
CFLAGS-test-fe-snans-always-signal.c += $(config-cflags-signaling-nans)
@@ -773,6 +773,16 @@ CFLAGS-s_modff.c += $(config-cflags-signaling-nans)
CFLAGS-s_modfl.c += $(config-cflags-signaling-nans)
CFLAGS-s_modff128.c += $(config-cflags-signaling-nans)
+CFLAGS-s_llround.c += -Wno-incompatible-library-redeclaration
+CFLAGS-s_fabsl.c += -Wno-ignored-attributes
+CFLAGS-s_fabsf128.c += -Wno-ignored-attributes
+CFLAGS-fraiseexcpt.c += -Wno-ignored-attributes
+CFLAGS-fegetround.c += -Wno-ignored-attributes
+CFLAGS-fesetround.c += -Wno-ignored-attributes
+CFLAGS-fegetenv.c += -Wno-ignored-attributes
+CFLAGS-fesetenv.c += -Wno-ignored-attributes
+CFLAGS-feholdexcpt.c += -Wno-ignored-attributes
+
$(addprefix $(objpfx),\
$(filter-out $(tests-static) $(libm-tests-vector),\
$(tests) $(tests-internal))): $(libm)
diff --git a/support/Makefile b/support/Makefile
index 5ddcb8d158..1a157eea4e 100644
--- a/support/Makefile
+++ b/support/Makefile
@@ -232,8 +232,8 @@ CFLAGS-support_paths.c = \
# being withing the observed range. The code uses double internally
# in support_timespec_check_in_range and for that computation we use
# -fexcess-precision=standard.
-CFLAGS-timespec.c += -fexcess-precision=standard
-CFLAGS-timespec-time64.c += -fexcess-precision=standard
+CFLAGS-timespec.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-timespec-time64.c += $(config-cflags-fexcess-precision-standard)
ifeq (,$(CXX))
LINKS_DSO_PROGRAM = links-dso-program-c
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 600e42c3db..68bd42cdd3 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -8,7 +8,7 @@ tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
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
-CFLAGS-test-flt-eval-method-387.c += -fexcess-precision=standard -mfpmath=387
-CFLAGS-test-flt-eval-method-sse.c += -fexcess-precision=standard -msse2 \
+CFLAGS-test-flt-eval-method-387.c += $(config-cflags-fexcess-precision-standard) -mfpmath=387
+CFLAGS-test-flt-eval-method-sse.c += $(config-cflags-fexcess-precision-standard) -msse2 \
-mfpmath=sse
endif
^ permalink raw reply [flat|nested] 24+ messages in thread
* [glibc/azanella/clang] math: Use -fexcess-precision=standard iff compiler supports it
@ 2022-03-15 18:40 Adhemerval Zanella
0 siblings, 0 replies; 24+ messages in thread
From: Adhemerval Zanella @ 2022-03-15 18:40 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b96bfbb7fe9a4041bd34a8ff5c8a978d23816392
commit b96bfbb7fe9a4041bd34a8ff5c8a978d23816392
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Mar 10 17:22:41 2022 -0300
math: Use -fexcess-precision=standard iff compiler supports it
Diff:
---
configure | 22 ++++++++++++++++++++++
configure.ac | 8 ++++++++
math/Makefile | 16 +++++++++++++---
support/Makefile | 4 ++--
sysdeps/x86/fpu/Makefile | 4 ++--
5 files changed, 47 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index e0589dbebe..ff0a3841d2 100755
--- a/configure
+++ b/configure
@@ -6435,6 +6435,28 @@ $as_echo "$libc_cv_wno_maybe_uninitialized" >&6; }
config_vars="$config_vars
config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fexcess-precision=standard" >&5
+$as_echo_n "checking for -fexcess-precision=standard... " >&6; }
+if ${libc_cv_fexcess_precision_standard+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if { ac_try='${CC-cc} -Werror -fexcess-precision=standard -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_fexcess_precision_standard=-fexcess-precision=standard
+else
+ libc_cv_fexcess_precision_standard=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_fexcess_precision_standard" >&5
+$as_echo "$libc_cv_fexcess_precision_standard" >&6; }
+config_vars="$config_vars
+config-cflags-fexcess-precision-standard = $libc_cv_fexcess_precision_standard"
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5
$as_echo_n "checking whether cc puts quotes around section names... " >&6; }
if ${libc_cv_have_section_quotes+:} false; then :
diff --git a/configure.ac b/configure.ac
index d5b5b5e88c..dd8fb99867 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1543,6 +1543,14 @@ AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized,
LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
[$libc_cv_wno_maybe_uninitialized])
+AC_CACHE_CHECK([for -fexcess-precision=standard], libc_cv_fexcess_precision_standard, [dnl
+ LIBC_TRY_CC_OPTION([-Werror -fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=-fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=])
+])
+LIBC_CONFIG_VAR([config-cflags-fexcess-precision-standard],
+ [$libc_cv_fexcess_precision_standard])
+
AC_CACHE_CHECK(whether cc puts quotes around section names,
libc_cv_have_section_quotes,
[cat > conftest.c <<EOF
diff --git a/math/Makefile b/math/Makefile
index a4932b3d0b..b0bc84c49b 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -452,9 +452,9 @@ CFLAGS-test-math-iszero.cc += -std=gnu++11
CFLAGS-test-math-issignaling.cc += -std=gnu++11
CFLAGS-test-math-iscanonical.cc += -std=gnu++11
-CFLAGS-test-iszero-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-iseqsig-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-flt-eval-method.c += -fexcess-precision=standard
+CFLAGS-test-iszero-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-iseqsig-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-flt-eval-method.c += $(config-cflags-fexcess-precision-standard)
CFLAGS-test-fe-snans-always-signal.c += $(config-cflags-signaling-nans)
@@ -773,6 +773,16 @@ CFLAGS-s_modff.c += $(config-cflags-signaling-nans)
CFLAGS-s_modfl.c += $(config-cflags-signaling-nans)
CFLAGS-s_modff128.c += $(config-cflags-signaling-nans)
+CFLAGS-s_llround.c += -Wno-incompatible-library-redeclaration
+CFLAGS-s_fabsl.c += -Wno-ignored-attributes
+CFLAGS-s_fabsf128.c += -Wno-ignored-attributes
+CFLAGS-fraiseexcpt.c += -Wno-ignored-attributes
+CFLAGS-fegetround.c += -Wno-ignored-attributes
+CFLAGS-fesetround.c += -Wno-ignored-attributes
+CFLAGS-fegetenv.c += -Wno-ignored-attributes
+CFLAGS-fesetenv.c += -Wno-ignored-attributes
+CFLAGS-feholdexcpt.c += -Wno-ignored-attributes
+
$(addprefix $(objpfx),\
$(filter-out $(tests-static) $(libm-tests-vector),\
$(tests) $(tests-internal))): $(libm)
diff --git a/support/Makefile b/support/Makefile
index 5ddcb8d158..1a157eea4e 100644
--- a/support/Makefile
+++ b/support/Makefile
@@ -232,8 +232,8 @@ CFLAGS-support_paths.c = \
# being withing the observed range. The code uses double internally
# in support_timespec_check_in_range and for that computation we use
# -fexcess-precision=standard.
-CFLAGS-timespec.c += -fexcess-precision=standard
-CFLAGS-timespec-time64.c += -fexcess-precision=standard
+CFLAGS-timespec.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-timespec-time64.c += $(config-cflags-fexcess-precision-standard)
ifeq (,$(CXX))
LINKS_DSO_PROGRAM = links-dso-program-c
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 600e42c3db..68bd42cdd3 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -8,7 +8,7 @@ tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
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
-CFLAGS-test-flt-eval-method-387.c += -fexcess-precision=standard -mfpmath=387
-CFLAGS-test-flt-eval-method-sse.c += -fexcess-precision=standard -msse2 \
+CFLAGS-test-flt-eval-method-387.c += $(config-cflags-fexcess-precision-standard) -mfpmath=387
+CFLAGS-test-flt-eval-method-sse.c += $(config-cflags-fexcess-precision-standard) -msse2 \
-mfpmath=sse
endif
^ permalink raw reply [flat|nested] 24+ messages in thread
* [glibc/azanella/clang] math: Use -fexcess-precision=standard iff compiler supports it
@ 2022-03-11 17:24 Adhemerval Zanella
0 siblings, 0 replies; 24+ messages in thread
From: Adhemerval Zanella @ 2022-03-11 17:24 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=45a7e037b060e5ea18c4c0e32472ba5436b59d11
commit 45a7e037b060e5ea18c4c0e32472ba5436b59d11
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Mar 10 17:22:41 2022 -0300
math: Use -fexcess-precision=standard iff compiler supports it
Diff:
---
configure | 22 ++++++++++++++++++++++
configure.ac | 8 ++++++++
math/Makefile | 16 +++++++++++++---
support/Makefile | 4 ++--
sysdeps/x86/fpu/Makefile | 4 ++--
5 files changed, 47 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index e0589dbebe..ff0a3841d2 100755
--- a/configure
+++ b/configure
@@ -6435,6 +6435,28 @@ $as_echo "$libc_cv_wno_maybe_uninitialized" >&6; }
config_vars="$config_vars
config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fexcess-precision=standard" >&5
+$as_echo_n "checking for -fexcess-precision=standard... " >&6; }
+if ${libc_cv_fexcess_precision_standard+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if { ac_try='${CC-cc} -Werror -fexcess-precision=standard -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_fexcess_precision_standard=-fexcess-precision=standard
+else
+ libc_cv_fexcess_precision_standard=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_fexcess_precision_standard" >&5
+$as_echo "$libc_cv_fexcess_precision_standard" >&6; }
+config_vars="$config_vars
+config-cflags-fexcess-precision-standard = $libc_cv_fexcess_precision_standard"
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5
$as_echo_n "checking whether cc puts quotes around section names... " >&6; }
if ${libc_cv_have_section_quotes+:} false; then :
diff --git a/configure.ac b/configure.ac
index d5b5b5e88c..dd8fb99867 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1543,6 +1543,14 @@ AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized,
LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized],
[$libc_cv_wno_maybe_uninitialized])
+AC_CACHE_CHECK([for -fexcess-precision=standard], libc_cv_fexcess_precision_standard, [dnl
+ LIBC_TRY_CC_OPTION([-Werror -fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=-fexcess-precision=standard],
+ [libc_cv_fexcess_precision_standard=])
+])
+LIBC_CONFIG_VAR([config-cflags-fexcess-precision-standard],
+ [$libc_cv_fexcess_precision_standard])
+
AC_CACHE_CHECK(whether cc puts quotes around section names,
libc_cv_have_section_quotes,
[cat > conftest.c <<EOF
diff --git a/math/Makefile b/math/Makefile
index a4932b3d0b..b0bc84c49b 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -452,9 +452,9 @@ CFLAGS-test-math-iszero.cc += -std=gnu++11
CFLAGS-test-math-issignaling.cc += -std=gnu++11
CFLAGS-test-math-iscanonical.cc += -std=gnu++11
-CFLAGS-test-iszero-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-iseqsig-excess-precision.c += -fexcess-precision=standard
-CFLAGS-test-flt-eval-method.c += -fexcess-precision=standard
+CFLAGS-test-iszero-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-iseqsig-excess-precision.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-test-flt-eval-method.c += $(config-cflags-fexcess-precision-standard)
CFLAGS-test-fe-snans-always-signal.c += $(config-cflags-signaling-nans)
@@ -773,6 +773,16 @@ CFLAGS-s_modff.c += $(config-cflags-signaling-nans)
CFLAGS-s_modfl.c += $(config-cflags-signaling-nans)
CFLAGS-s_modff128.c += $(config-cflags-signaling-nans)
+CFLAGS-s_llround.c += -Wno-incompatible-library-redeclaration
+CFLAGS-s_fabsl.c += -Wno-ignored-attributes
+CFLAGS-s_fabsf128.c += -Wno-ignored-attributes
+CFLAGS-fraiseexcpt.c += -Wno-ignored-attributes
+CFLAGS-fegetround.c += -Wno-ignored-attributes
+CFLAGS-fesetround.c += -Wno-ignored-attributes
+CFLAGS-fegetenv.c += -Wno-ignored-attributes
+CFLAGS-fesetenv.c += -Wno-ignored-attributes
+CFLAGS-feholdexcpt.c += -Wno-ignored-attributes
+
$(addprefix $(objpfx),\
$(filter-out $(tests-static) $(libm-tests-vector),\
$(tests) $(tests-internal))): $(libm)
diff --git a/support/Makefile b/support/Makefile
index 5ddcb8d158..1a157eea4e 100644
--- a/support/Makefile
+++ b/support/Makefile
@@ -232,8 +232,8 @@ CFLAGS-support_paths.c = \
# being withing the observed range. The code uses double internally
# in support_timespec_check_in_range and for that computation we use
# -fexcess-precision=standard.
-CFLAGS-timespec.c += -fexcess-precision=standard
-CFLAGS-timespec-time64.c += -fexcess-precision=standard
+CFLAGS-timespec.c += $(config-cflags-fexcess-precision-standard)
+CFLAGS-timespec-time64.c += $(config-cflags-fexcess-precision-standard)
ifeq (,$(CXX))
LINKS_DSO_PROGRAM = links-dso-program-c
diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
index 600e42c3db..68bd42cdd3 100644
--- a/sysdeps/x86/fpu/Makefile
+++ b/sysdeps/x86/fpu/Makefile
@@ -8,7 +8,7 @@ tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 test-fenv-sse-2 \
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
-CFLAGS-test-flt-eval-method-387.c += -fexcess-precision=standard -mfpmath=387
-CFLAGS-test-flt-eval-method-sse.c += -fexcess-precision=standard -msse2 \
+CFLAGS-test-flt-eval-method-387.c += $(config-cflags-fexcess-precision-standard) -mfpmath=387
+CFLAGS-test-flt-eval-method-sse.c += $(config-cflags-fexcess-precision-standard) -msse2 \
-mfpmath=sse
endif
^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2024-04-17 20:06 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-09 13:16 [glibc/azanella/clang] math: Use -fexcess-precision=standard iff compiler supports it Adhemerval Zanella
-- strict thread matches above, loose matches on Subject: below --
2024-04-17 20:06 Adhemerval Zanella
2024-04-02 15:52 Adhemerval Zanella
2024-02-09 17:31 Adhemerval Zanella
2024-02-07 14:06 Adhemerval Zanella
2024-01-29 17:56 Adhemerval Zanella
2023-12-21 18:53 Adhemerval Zanella
2023-09-28 17:51 Adhemerval Zanella
2023-08-30 12:36 Adhemerval Zanella
2023-02-09 19:48 Adhemerval Zanella
2022-10-28 17:41 Adhemerval Zanella
2022-10-04 12:59 Adhemerval Zanella
2022-06-09 21:19 Adhemerval Zanella
2022-06-03 14:05 Adhemerval Zanella
2022-05-13 14:19 Adhemerval Zanella
2022-05-12 19:33 Adhemerval Zanella
2022-05-10 18:23 Adhemerval Zanella
2022-04-29 14:03 Adhemerval Zanella
2022-04-04 12:54 Adhemerval Zanella
2022-03-31 19:06 Adhemerval Zanella
2022-03-29 20:29 Adhemerval Zanella
2022-03-16 18:03 Adhemerval Zanella
2022-03-15 18:40 Adhemerval Zanella
2022-03-11 17:24 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).