[RFC] math/powl: Workaround clang build
YunQiang Su
syq@debian.org
Thu Dec 12 01:35:40 GMT 2024
Alexander Monakov <amonakov@ispras.ru> 于2024年12月11日周三 14:24写道:
>
>
> On Wed, 11 Dec 2024, YunQiang Su wrote:
>
> > In condtional operator, only one operand of the result operands is allowed
> > to be evaluated, while in some cases clang has a bug on it.
> > So in some cases both underflow and overflow exceptions are raised.
>
> Unlike GCC, Clang implements the STDC FENV_ACCESS pragma with default state
> 'off'. When using Clang for building Glibc, you have to pass -ftrapping-math
> to the compiler to ensure floating-point exceptions are honored.
>
> Probably best to add -ftrapping-math along with -frounding-math to math-flags
> in Makeconfig. This will also help if any future GCC switches to
> -fno-trapping-math by default.
>
Thanks for making it clearer.
I have a look at the build command again. Both of -ftrapping-math and
-frounding-math
are used.
So it must be a bug of Clang, then.
> Alexander
More information about the Libc-alpha
mailing list