From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id E47B93855581; Wed, 30 Aug 2023 12:36:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E47B93855581 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1693398988; bh=+pqT3jWM+Zi/RpiTMvl7Lbu3nIPWzJNkIwx8Q8W2C44=; h=From:To:Subject:Date:From; b=r//X+lRaylZsDaEeaosMQ4vqe0subww3V6/4eM3Od7x3R6H7azUUFue3n9U/D3uiL NHBb1VqYvwPnfrOqlgoNCykWscFQ2abuqpGbTbdLVxS11MJCeBP4+C2y7tKMb792d6 8VXw+TYQ5YJiz4Nf1AOS7Zms4gkXJEWoXXMl9Gfs= 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: 9128a98fc48634088275fe2c97c2b889532cc08a X-Git-Newrev: e22e14174593dafe700d64946fc88242f2238703 Message-Id: <20230830123628.E47B93855581@sourceware.org> Date: Wed, 30 Aug 2023 12:36:28 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e22e14174593dafe700d64946fc88242f2238703 commit e22e14174593dafe700d64946fc88242f2238703 Author: Adhemerval Zanella 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 <