From owner-dev-commits-src-branches@freebsd.org Thu Apr 22 11:08:25 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CB4E25EBBF4; Thu, 22 Apr 2021 11:08:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FQvmT2F2Rz3kpL; Thu, 22 Apr 2021 11:08:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7595B1887D; Thu, 22 Apr 2021 11:08:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13MB8OTX088519; Thu, 22 Apr 2021 11:08:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13MB8Orr088518; Thu, 22 Apr 2021 11:08:24 GMT (envelope-from git) Date: Thu, 22 Apr 2021 11:08:24 GMT Message-Id: <202104221108.13MB8Orr088518@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alex Richardson Subject: git: 6dd6c03efb9e - stable/13 - lib/msun: Fix x86 GCC6 build after 221622ec0c8e184 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6dd6c03efb9ecc214b0e00fcd32a1bb8887abc0f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 11:08:26 -0000 The branch stable/13 has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=6dd6c03efb9ecc214b0e00fcd32a1bb8887abc0f commit 6dd6c03efb9ecc214b0e00fcd32a1bb8887abc0f Author: Alex Richardson AuthorDate: 2021-03-12 18:44:42 +0000 Commit: Alex Richardson CommitDate: 2021-04-22 09:42:54 +0000 lib/msun: Fix x86 GCC6 build after 221622ec0c8e184 Apparently GCC only supports arithmetic expressions that use static const variables in initializers starting with GCC8. To keep older versions happy use a macro instead. Fixes: 221622ec0c ("lib/msun: Avoid FE_INEXACT for x86 log2l/log10l") Reported by: Jenkins Reviewed By: imp Differential Revision: https://reviews.freebsd.org/D29233 (cherry picked from commit 05eac56a0432d07acd7f159125855437a4dd6259) --- lib/msun/ld80/s_logl.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/msun/ld80/s_logl.c b/lib/msun/ld80/s_logl.c index d787b953fedb..c74519cafd69 100644 --- a/lib/msun/ld80/s_logl.c +++ b/lib/msun/ld80/s_logl.c @@ -674,14 +674,14 @@ logl(long double x) RETURNSPI(&r); } -static const double -invln10_hi = 4.3429448190317999e-1, /* 0x1bcb7b1526e000.0p-54 */ -invln10_lo = 7.1842412889749798e-14, /* 0x1438ca9aadd558.0p-96 */ -invln10_lo_plus_hi = invln10_lo + invln10_hi, -invln2_hi = 1.4426950408887933e0, /* 0x171547652b8000.0p-52 */ -invln2_lo = 1.7010652264631490e-13, /* 0x17f0bbbe87fed0.0p-95 */ -invln2_lo_plus_hi = invln2_lo + invln2_hi; - +/* Use macros since GCC < 8 rejects static const expressions in initializers. */ +#define invln10_hi 4.3429448190317999e-1 /* 0x1bcb7b1526e000.0p-54 */ +#define invln10_lo 7.1842412889749798e-14 /* 0x1438ca9aadd558.0p-96 */ +#define invln2_hi 1.4426950408887933e0 /* 0x171547652b8000.0p-52 */ +#define invln2_lo 1.7010652264631490e-13 /* 0x17f0bbbe87fed0.0p-95 */ +/* Let the compiler pre-calculate this sum to avoid FE_INEXACT at run time. */ +static const double invln10_lo_plus_hi = invln10_lo + invln10_hi; +static const double invln2_lo_plus_hi = invln2_lo + invln2_hi; long double log10l(long double x)