Date: Sun, 6 Feb 2011 22:03:03 -0500 From: "b. f." <bf1783@googlemail.com> To: David Schultz <das@freebsd.org> Cc: freebsd-toolchain@FreeBSD.org, gerald@FreeBSD.org Subject: Re: -fno-math-errno by default Message-ID: <AANLkTinc2EkZLsda7Ed1vb-Ccy0q4DDwBFd=b85daA4X@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
> On Sun, Feb 06, 2011, Gerald Pfeifer wrote: > > Pedro kindly made me aware of > > > > http://svn.freebsd.org/viewvc/base?view=revision&revision=181538 > > > > where David made -fno-math-errno the default for GCC with the following > > background: > > > > Our libm doesn't support the SysV mistake of setting errno, and never > > has. This will need to be fixed upstream in a more generic way, but > > the changes are somewhat more involved. > > > > Do I understand correctly that libm on all versions of FreeBSD and on > > all platforms does not set errno, so this should become the default for > > FreeBSD also upstream? > > That is correct. Basically nobody sets errno in the math library > anymore, except for compatibility with old apps written for the > System V math library. BSD never has and never will. IEEE 754 > floating point exception flags are much saner and faster. > > > It would have been nice to report this upstream (and apologies if you > > did and it got missed) and I'll try to raise it there, but wanted to > > get confirmation first. > > I submitted a change request to gcc about 2.5 years ago: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37073 But if I remember correctly, you didn't add it to the default CFLAGS and FFLAGS used on FreeBSD, because you either suspected or knew that it would incur additional overhead when using the compiler and not actually needing libm. Is that the case, or should we just add it to the default flags? I did so on my system at home, but I didn't measure if there was a penalty. b.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTinc2EkZLsda7Ed1vb-Ccy0q4DDwBFd=b85daA4X>