This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Patch] Fix libstdc++ build when using uclibc instead of glibc
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Steve Ellcey <sellcey at imgtec dot com>
- Cc: Bernhard Reutner-Fischer <rep dot dot dot nop at gmail dot com>, libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Thu, 7 Jan 2016 21:51:00 +0000
- Subject: Re: [Patch] Fix libstdc++ build when using uclibc instead of glibc
- Authentication-results: sourceware.org; auth=none
- References: <6ecc7322-9335-4197-9508-34af9946c491 at BAMAIL02 dot ba dot imgtec dot org> <20160106203447 dot GB8785 at redhat dot com> <1452113128 dot 29343 dot 11 dot camel at ubuntu-sellcey> <20160106230244 dot GD8785 at redhat dot com> <alpine dot DEB dot 2 dot 20 dot 1601070723450 dot 1819 at laptop-mg dot saclay dot inria dot fr> <20160107112349 dot GA30323 at redhat dot com> <F416F5C7-6502-4665-A088-E058ECCCC34D at gmail dot com> <1452202672 dot 29343 dot 41 dot camel at ubuntu-sellcey>
On 07/01/16 13:37 -0800, Steve Ellcey wrote:
On Thu, 2016-01-07 at 20:56 +0100, Bernhard Reutner-Fischer wrote:
On January 7, 2016 12:23:49 PM GMT+01:00, Jonathan Wakely <jwakely@redhat.com> wrote:
>On 07/01/16 07:28 +0100, Marc Glisse wrote:
>>On Wed, 6 Jan 2016, Jonathan Wakely wrote:
>>
>>>On 06/01/16 12:45 -0800, Steve Ellcey wrote:
>>>>On Wed, 2016-01-06 at 20:34 +0000, Jonathan Wakely wrote:
>>>>>On 05/01/16 14:43 -0800, Steve Ellcey wrote:
>>>>>>While trying to build GCC with uclibc instead of glibc I ran into
>a build
>>>>>>failure in libstdc++. uclibc doesn't seem to provide the
>>>>>isfinite function
uClibc provides an infinite macro. Make sure to enable C99 math though.
(You mean isfinite, not infinite, right? C99 doesn't define an "infinite"
macro.)
OK?
TIA,
But is there any reason to use the infinite macro instead of the
__builtin_isfinite function? I think that if I used the infinite macro
The isfinite macro doesn't exist in C++, if the C library defines it
we #undef it in <cmath>, because the C++ standard requires those C99
math functions to be real functions, not macros. So that's a good
reason to use the builtin :-)
(Currently if you #include <math.h> instead of <cmath> then you get
the macro, because <math.h> comes from the C library, but I'm in the
process of fixing that so the C++ library will provide its own
<math.h> wrapper that does the #undef.)
I would also have to check for NAN since NAN is neither finite nor
infinite. Here is what I tested last night with no failures. Is this
version OK to checkin?
Yes, this is OK, thanks.