From owner-svn-src-head@freebsd.org Fri Sep 21 00:00:43 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 418E710ACFE1; Fri, 21 Sep 2018 00:00:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E76678582C; Fri, 21 Sep 2018 00:00:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id A1DD710B77D; Thu, 20 Sep 2018 20:00:34 -0400 (EDT) Subject: Re: svn commit: r336299 - in head: include lib/msun lib/msun/ld128 lib/msun/ld80 lib/msun/man lib/msun/src To: Li-Wen Hsu , Mark Johnston References: <201807150023.w6F0NBx1065422@repo.freebsd.org> <20180920155402.GF99168@raichu> <20180920190614.GI99168@raichu> Cc: mmacy@freebsd.org, Johannes M Dieterich , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: John Baldwin Message-ID: Date: Thu, 20 Sep 2018 17:00:33 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Thu, 20 Sep 2018 20:00:35 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Sep 2018 00:00:43 -0000 On 9/20/18 2:43 PM, Li-Wen Hsu wrote: > On Thu, Sep 20, 2018 at 10:06 PM Mark Johnston wrote: >> >> On Thu, Sep 20, 2018 at 09:39:24AM -0700, John Baldwin wrote: >>> On 9/20/18 8:54 AM, Mark Johnston wrote: >>>> On Sun, Jul 15, 2018 at 12:23:11AM +0000, Matt Macy wrote: >>>>> Author: mmacy >>>>> Date: Sun Jul 15 00:23:10 2018 >>>>> New Revision: 336299 >>>>> URL: https://svnweb.freebsd.org/changeset/base/336299 >>>>> >>>>> Log: >>>>> msun: add ld80/ld128 powl, cpow, cpowf, cpowl from openbsd >>>>> >>>>> This corresponds to the latest status (hasn't changed in 9+ >>>>> years) from openbsd of ld80/ld128 powl, and source cpowf, cpow, >>>>> cpowl (the complex power functions for float complex, double >>>>> complex, and long double complex) which are required for C99 >>>>> compliance and were missing from FreeBSD. Also required for >>>>> some numerical codes using complex numbered Hamiltonians. >>>>> >>>>> Thanks to jhb for tracking down the issue with making >>>>> weak_reference compile on powerpc. >>>>> >>>>> When asked to review, bde said "I don't like it" - but >>>>> provided no actionable feedback or superior implementations. >>>>> >>>>> Discussed with: jhb >>>>> Submitted by: jmd >>>>> Differential Revision: https://reviews.freebsd.org/D15919 >>>> >>>> This seems to have broken the gcc build: >>>> https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/ >>>> >>>> /workspace/src/lib/msun/ld80/e_powl.c:275:1: error: floating constant exceeds range of 'long double' [-Werror=overflow] >>>> if( y >= LDBL_MAX ) >>>> ^~ >>> >>> Which architecture? i386 doesn't get build with i386-xtoolchain-gcc pending >>> some patches I haven't yet posted for review related to the weirdness we do >>> with floating point on i386. >> >> This is the -m32 build on amd64. I haven't tested it myself, but Mark >> Millard noted that the issue might be fixed by a gcc update. >> > > I suspect this. Each build is in a fresh created jail with the latest > branch of packages from pkg.freebsd.org. > > At the beginning of (warning: 56MB file) > https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/7262/consoleText > > There is: > > New packages to be INSTALLED: > amd64-xtoolchain-gcc: 0.4_1 > amd64-gcc: 6.4.0_2 > mpfr: 4.0.1 > gmp: 6.1.2 > mpc: 1.1.0_1 > amd64-binutils: 2.30_5,1 > > Number of packages to be installed: 6 > > Or is there a newer version of devel/amd64-gcc I am not aware? That has the change Mark Millard is thinking of: https://svnweb.freebsd.org/ports?view=revision&revision=475290 However, I suspect this is due to a different issue. I still have some patches that I need to get an i386 world to build with external GCC that I'm not sure of and haven't posted for review yet. I bet these also matter for the -m32 build: Index: lib/libc/tests/stdio/printfloat_test.c =================================================================== --- lib/libc/tests/stdio/printfloat_test.c (revision 338373) +++ lib/libc/tests/stdio/printfloat_test.c (working copy) @@ -315,7 +315,7 @@ testfmt("0x1p-1074", "%a", 0x1p-1074); testfmt("0x1.2345p-1024", "%a", 0x1.2345p-1024); -#if (LDBL_MANT_DIG == 64) +#if (LDBL_MANT_DIG == 64) && !defined(__i386__) testfmt("0x1.921fb54442d18468p+1", "%La", 0x3.243f6a8885a308dp0L); testfmt("0x1p-16445", "%La", 0x1p-16445L); testfmt("0x1.30ecap-16381", "%La", 0x9.8765p-16384L); Index: sys/x86/include/float.h =================================================================== --- sys/x86/include/float.h (revision 338373) +++ sys/x86/include/float.h (working copy) @@ -86,10 +86,18 @@ #define LDBL_EPSILON 1.0842021724855044340E-19L #define LDBL_DIG 18 #define LDBL_MIN_EXP (-16381) +#if defined(__i386__) +#define LDBL_MIN 3.3621031431120935e-4932L +#else #define LDBL_MIN 3.3621031431120935063E-4932L +#endif #define LDBL_MIN_10_EXP (-4931) #define LDBL_MAX_EXP 16384 +#if defined(__i386__) +#define LDBL_MAX 1.1897314953572316e+4932L +#else #define LDBL_MAX 1.1897314953572317650E+4932L +#endif #define LDBL_MAX_10_EXP 4932 #if __ISO_C_VISIBLE >= 2011 #define LDBL_TRUE_MIN 3.6451995318824746025E-4951L -- John Baldwin