From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id B7EFB383DB95; Thu, 9 Jun 2022 21:19:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B7EFB383DB95 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] math: Use -fexcess-precision=standard iff compiler supports it X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: 6ac20be865435c7e429d54cc81a4d2dfe4648175 X-Git-Newrev: 8a38782e63d651d130d04560df23a92e35c9277f Message-Id: <20220609211951.B7EFB383DB95@sourceware.org> Date: Thu, 9 Jun 2022 21:19:51 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jun 2022 21:19:51 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8a38782e63d651d130d04560df23a92e35c9277f commit 8a38782e63d651d130d04560df23a92e35c9277f Author: Adhemerval Zanella 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 <