From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 15B593857C42; Tue, 4 Oct 2022 12:59:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 15B593857C42 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1664888356; bh=t1eKvlOvoI07SNLii1og3d5FTzE9BjgBbTvmdF8U6DA=; h=From:To:Subject:Date:From; b=vRfOJ8l83g+7Pc00OKDce38WJGgW4xrLhqLim3yGOimJvrxJhpyxeQFskyavi0nA8 63tMnWpyWzWXiFXqyloYuvBqH6S50ec4Hz2sSt3TV/IZRNez84O1QDdZ+u6bm09sFN tJ7c6jDQbRUPx/9qfgt9JoLaERI6feD6uOsLbbDE= 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: 4d163aafda9e7e343fa3ab1937b70c1dac8bef2b X-Git-Newrev: 7f49c287146c97be29e0f2e7b504cfef2663675e Message-Id: <20221004125916.15B593857C42@sourceware.org> Date: Tue, 4 Oct 2022 12:59:16 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7f49c287146c97be29e0f2e7b504cfef2663675e commit 7f49c287146c97be29e0f2e7b504cfef2663675e 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 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 <