Many targets in ports, ARM, and HPPA to name two, do not have long double math, but the compiler treats double and long double as distinct types even though they have the same size. The GNU C library currently creates aliases to all the *l functions when long-double-fcts = no, but fails to create *l prototypes in the headers. To be ISO C99 conforming the headers must have *l prototypes. Jakub Jelinek proposes a patch here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39491#c21 Joseph Myers has verified that this patch works for ARM here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39491#c24 Carlos O'Donell has verified that this path works for HPPA here: Jakub, could you please attach your patch to this issue with a proper ChangeLog? I would like this patch to be reviewed and checked into glibc. Thanks.
Carlos O'Donell has verified that this path works for HPPA here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39491#c25
http://sources.redhat.com/ml/libc-hacker/2009-04/msg00004.html
I tested the following patch on hppa: http://sources.redhat.com/ml/libc-hacker/2009-04/msg00004.html No regressions. However, I don't see the long double prototypes. The port sets __NO_LONG_DOUBLE_MATH set to 1, and I verified this. The build sets NO_LONG_DOUBLE to 1 because the port sets long-double-fcts = no. Compiling test-ldouble.c with -Werror fails because of the missing prototypes. math/libm-test.c:5446: warning: implicit declaration of function ‘scalbl’ math/libm-test.c: In function ‘scalbn_test’:
Fixed in master.