From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id DAD173888825; Thu, 31 Mar 2022 19:06:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DAD173888825 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: f1334b235c9ba1022e5b2ed2caa4ce6c42ca05bd X-Git-Newrev: e09b0183a276a058ac90212cb5a3f7d7cc2c9eff Message-Id: <20220331190625.DAD173888825@sourceware.org> Date: Thu, 31 Mar 2022 19:06:25 +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, 31 Mar 2022 19:06:26 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e09b0183a276a058ac90212cb5a3f7d7cc2c9eff commit e09b0183a276a058ac90212cb5a3f7d7cc2c9eff 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 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 <