This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/22146] C++ build issue with float128 on x86_64
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 22 Sep 2017 21:01:06 +0000
- Subject: [Bug math/22146] C++ build issue with float128 on x86_64
- Auto-submitted: auto-generated
- References: <bug-22146-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=22146
--- Comment #14 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, release/2.26/master has been updated
via d37c951fde57e8acb320a9a7d437ba50a1fc3c8a (commit)
from 37d4262a7a35886cf8ac856457bbad8c0498c8d6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d37c951fde57e8acb320a9a7d437ba50a1fc3c8a
commit d37c951fde57e8acb320a9a7d437ba50a1fc3c8a
Author: Gabriel F. T. Gomes <gabriel@inconstante.eti.br>
Date: Wed Sep 20 15:10:26 2017 -0300
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.
(cherry picked from commit c5c4a626098ec884b8527356abdf2a4bb7b6bf27)
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 ++++++
NEWS | 1 +
math/math.h | 8 +++++++-
3 files changed, 14 insertions(+), 1 deletions(-)
--
You are receiving this mail because:
You are on the CC list for the bug.