This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Work around conflicting declarations of math functions
- From: Florian Weimer <fweimer at redhat dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 9 Nov 2015 20:41:35 +0100
- Subject: [PATCH] Work around conflicting declarations of math functions
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 10 dot 1511050049220 dot 18787 at digraph dot polyomino dot org dot uk> <5640BD9A dot 3090000 at redhat dot com> <alpine dot DEB dot 2 dot 10 dot 1511091620320 dot 18468 at digraph dot polyomino dot org dot uk>
On 11/09/2015 05:24 PM, Joseph Myers wrote:
> On Mon, 9 Nov 2015, Florian Weimer wrote:
>
>> On 11/05/2015 01:49 AM, Joseph Myers wrote:
>>> bits/math-finite.h declares -ffinite-math-only variants of various
>>> functions under conditions not matching those under which the normal
>>> versions are declared.
>>
>> Joseph,
>>
>> I may be seeing build failures related to this change, on armhfp (which
>> is, I think, ARMv7 with hardware floating point). Specifically, this:
>
> I think this comes from -D_Mlong_double_=double in math-CPPFLAGS, in which
> case undefining _Mlong_double_ in test-signgam-finite-c99.c ought to allow
> the test to build OK
I can confirm that the attached patch fixes the build issue on armhfp I
was seeing. Thanks!
I need some help with the commit message, though.
Florian
Work around conflicting declarations of math functions
This restores compilation on architectures such as armhfp which
alias acos and acosl because double and long double are the same.
2015-11-09 Florian Weimer <fweimer@redhat.com>
* math/test-signgam-finite-c99.c (_Mlong_double_): Undefine.
diff --git a/math/test-signgam-finite-c99.c b/math/test-signgam-finite-c99.c
index fd9cdd3..bd3bdca 100644
--- a/math/test-signgam-finite-c99.c
+++ b/math/test-signgam-finite-c99.c
@@ -18,6 +18,7 @@
#undef _LIBC
#undef _GNU_SOURCE
+#undef _Mlong_double_
#define _ISOMAC
#include <math.h>