From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 9B0F83858436; Tue, 2 Apr 2024 16:01:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9B0F83858436 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1712073702; bh=7bLMPrreyTtzJdC2UkOD2RmMyEB4TdFihJhCJbLtFvQ=; h=From:To:Subject:Date:From; b=djDA/eCbwAekEjiTR20aa6GJOXM2Hga1vyyAd8U/clbMwnPNPpDHJfP1y4Pw6fBUB 5Wdzj1mxFtuhvPvds7N0KJ9fGYtSTp3Lk3DjzB0nLkcuRNvtVAENNz7I5f+/7DCbSh /1ALUxbeOjxBKr4hwIpdnT+9+5vC9DeTzDoTtit0= 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] Build glibc with -ftrapping-math X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: 7a18c7d68b571905fd9c0f72d0e45c73538a4058 X-Git-Newrev: 458f3c5df44d24f60e0bffe2c5368a42f2496bc6 Message-Id: <20240402160142.9B0F83858436@sourceware.org> Date: Tue, 2 Apr 2024 16:01:42 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=458f3c5df44d24f60e0bffe2c5368a42f2496bc6 commit 458f3c5df44d24f60e0bffe2c5368a42f2496bc6 Author: Adhemerval Zanella Date: Thu Feb 15 08:58:46 2024 -0300 Build glibc with -ftrapping-math GCC enables it by default, clang in the other hand sets -fno-trapping-math. This is required to fix some math and stdlib tests that explicit raises floating point exceptions (i.e. stdlib/tst-strtod-round on aarch64). Diff: --- Makeconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makeconfig b/Makeconfig index ce19406b88..ba9c870a9b 100644 --- a/Makeconfig +++ b/Makeconfig @@ -881,6 +881,9 @@ endif # disable any optimization that assume default rounding mode. +math-flags = $(config-cflags-frounding-math) +# We have to assume that glibc functions might generate user-visible traps. ++math-flags += -ftrapping-math + # Logically only "libnldbl", "nonlib" and "testsuite" should be using # -fno-math-errno. However due to GCC bug #88576, only "libm" can use # -fno-math-errno.