From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 0EB193857C71; Thu, 9 Feb 2023 19:48:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0EB193857C71 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1675972104; bh=lpCo8kk8cX+4/Lto1Y/UBG6r0l1QMV1goVzb74ixRWg=; h=From:To:Subject:Date:From; b=e3IFCINRBzYErcPh+W/AVcz7nN3DeaYEtQWMW1OQdSrsYncnmGiUDCpZD87GTIuSl AFohj/WvZ47A+MQF8aiyULEyMETJckGn1avtCHQaK0ZDJF9Vvua1VRzR/+m4QR6AZB s0nN/b64Hr5GvS/P3MIPsi3ADNrNPXHtmK9pBNF0= 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: 96dea26800b3a8e3e72dd63370d563cff2feda3f X-Git-Newrev: 7e5a4ee294e03f42bc3ce1f460f74e7a049a9fa2 Message-Id: <20230209194824.0EB193857C71@sourceware.org> Date: Thu, 9 Feb 2023 19:48:24 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7e5a4ee294e03f42bc3ce1f460f74e7a049a9fa2 commit 7e5a4ee294e03f42bc3ce1f460f74e7a049a9fa2 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 | 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 <