This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [PATCH][AArch64] Add inlines for signbit (v2)


On Fri, 22 May 2015, Wilco Dijkstra wrote:

> > Why the #undef?  I don't see any headers with macro definitions of
> > __signbitl that need to be removed in math.h.
> 
> Unless nldbl support is dead we need it as 
> sysdeps/ldbl-opt/nldbl-signbit.c does:
> 
> #define __signbitl __signbitl_XXX
> #include "nldbl-compat.h"
> 
> nldbl-compat.h includes math/math.h, which would define __signbitl 
> again. I couldn't force nldbl to build but replacing 
> sysdeps/ieee754/ldbl-128/s_signbitl.c with nldlb-signbit.c confirmed the 
> #undef fixes the issue.

Thanks - I was only looking in headers for a #define.  I think the nldbl 
code is for linking -mlong-double-64 objects with libm, although I'm not 
aware of any documentation for it.  Having a #undef in an installed header 
that's only relevant for building glibc seems unfortunate.  Maybe it would 
be cleaner to (a) convert all glibc-internal calls to __signbit* into 
calls to the signbit macro (which should make no difference to the code 
generated at all), then (b) conditionally change the definition of the 
signbit macro to use __builtin_signbit*, rather than ever defining 
__signbit* as macros.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]