Date: Thu, 31 Jan 2019 08:50:24 -0800 From: Steve Kargl <sgk@troutmask.apl.washington.edu> To: Warner Losh <imp@bsdimp.com> Cc: FreeBSD Standards <freebsd-standards@freebsd.org>, "freebsd-toolchain@FreeBSD.org" <freebsd-toolchain@freebsd.org> Subject: Re: Is libc C99 compliant? Message-ID: <20190131165024.GC23821@troutmask.apl.washington.edu> In-Reply-To: <CANCZdfppuxhuStH%2BMQ%2Be3EBPk1VahK7HGze-_i%2Bpj7gFTm_UNg@mail.gmail.com> References: <20190130212904.GA66299@troutmask.apl.washington.edu> <CANCZdfppuxhuStH%2BMQ%2Be3EBPk1VahK7HGze-_i%2Bpj7gFTm_UNg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jan 31, 2019 at 09:32:11AM -0700, Warner Losh wrote: > On Wed, Jan 30, 2019 at 11:33 PM Steve Kargl < > sgk@troutmask.apl.washington.edu> wrote: > > > Should/can TARGET_LIBC_HAS_FUNCTION be updated to at least > > default_libc_has_function? More importantly now that libm > > contains sincos[fl], should FreeBSD gcc config file be updated > > to use > > > > bool > > bsd_libc_has_function (enum function_class fn_class) > > { > > if (fn_class == function_c94 > > || fn_class == function_c99_misc > > || fn_class == function_c99_math_complex > > || fn_class == function_sincos) > > return true; > > > > return false; > > } > > On its surface, this seems sane to me. what does this control? And is this > for our ancient 4.2 or current gcc... > AFAICT, it controls the use of C99 compliant functions as builtins. Unfortunately and I should have remembered, FreeBSD's C runtime libraries (ie libc+libm) are not C99 compliant. The problem (for me) is that function_c99_math_complex indicates that libm includes a complete set of C99 complex math function, which of course it doesn't. Testing with GCC trunk gives 1 default_libc_has_function (C99 compliant libc+libm) 2 no_c99_libc_has_function (FreeBSD current setting) 1 2 === gcc Summary === # of expected passes 134923 134887 # of unexpected failures 171 207 <-- This is good. # of unexpected successes 27 27 # of expected failures 550 550 # of unresolved testcases 14 14 # of unsupported tests 2222 2222 === g++ Summary === # of expected passes 124009 124009 # of unexpected failures 41 41 # of expected failures 548 548 # of unsupported tests 5585 5585 === gfortran Summary === # of expected passes 48992 48993 # of unexpected failures 2 1 <-- This is bad. # of expected failures 130 130 # of unsupported tests 88 88 To fix the "This is bad" requires improvements to libm. The one individual, who spent 15+ years trying to improve libm, was forced to hand in his commit bit due to the fiasco of jenkins spamming the -current and -stable mailing lists. Mysteriously, a month or so after that individual stopped contributed to libm, jenkins stopped spamming the mailing list. -- Steve
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190131165024.GC23821>