-fno-math-errno by default
Pedro F. Giffuni
giffunip at tutopia.com
Sun Feb 6 20:24:27 UTC 2011
--- On Sun, 2/6/11, Gerald Pfeifer <gerald at pfeifer.com> wrote:
...
>
> http://svn.freebsd.org/viewvc/base?view=revision&revision=181538
>
> where David made -fno-math-errno the default for GCC with
...
>
> 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 my understanding of the commit too, so I guess
"configure" should do a better job detecting this.
That said, I don't know if setting errno is good or
bad: Apple's gcc has this:
----
; APPLE LOCAL begin optimization pragmas 3124235/3420242
fmath-errno
Common Report Var(flag_errno_math) Init(1) PerFunc
Set errno after built-in math functions
; APPLE LOCAL end optimization pragmas 3124235/3420242
----
I have no idea what the origin of their math stuff is
but apparently they saw a value of using the sysv approach.
> 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.
>
No, I didn't ... thanks for bringing this up in
freebsd-toolchain though, there may be a similar issue
with clang.
cheers,
Pedro.
More information about the freebsd-toolchain
mailing list