diff options
author | Gabriel F. T. Gomes <gabriel@inconstante.eti.br> | 2017-09-20 15:10:26 -0300 |
---|---|---|
committer | Gabriel F. T. Gomes <gabriel@inconstante.eti.br> | 2017-09-22 14:47:16 -0300 |
commit | c5c4a626098ec884b8527356abdf2a4bb7b6bf27 (patch) | |
tree | 0f8f63a5117bb8df4972968ebccc3b9dc9547628 /sysdeps/ieee754/flt-32/s_sincosf.c | |
parent | 23947846658fd41875381c0bcc05b319c3c7bde4 (diff) | |
download | glibc-c5c4a626098ec884b8527356abdf2a4bb7b6bf27.tar glibc-c5c4a626098ec884b8527356abdf2a4bb7b6bf27.tar.gz glibc-c5c4a626098ec884b8527356abdf2a4bb7b6bf27.tar.bz2 glibc-c5c4a626098ec884b8527356abdf2a4bb7b6bf27.zip |
Let fpclassify use the builtin when optimizing for size in C++ mode (bug 22146)
When optimization for size is on (-Os), fpclassify does not use the
type-generic __builtin_fpclassify builtin, instead it uses __MATH_TG.
However, when library support for float128 is available, __MATH_TG uses
__builtin_types_compatible_p, which is not available in C++ mode.
On the other hand, libstdc++ undefines (in cmath) many macros from
math.h, including fpclassify, so that it can provide its own functions.
However, during its configure tests, libstdc++ just tests for the
availability of the macros (it does not undefine them, nor does it
provide its own functions).
Finally, when libstdc++ is configured with optimization for size
enabled, its configure tests include math.h and get the definition of
fpclassify that uses __MATH_TG (and __builtin_types_compatible_p).
Since libstdc++ does not undefine the macros during its configure tests,
they fail.
This patch lets fpclassify use the builtin in C++ mode, even when
optimization for size is on. This allows the configure test in
libstdc++ to work.
Tested for powerpc64le and x86_64.
[BZ #22146]
math/math.h: Let fpclassify use the builtin in C++ mode, even
when optimazing for size.
Diffstat (limited to 'sysdeps/ieee754/flt-32/s_sincosf.c')
0 files changed, 0 insertions, 0 deletions