Define HAVE_ for math long double functions declared in vxworks headers
Alexandre Oliva
oliva@adacore.com
Thu Jan 23 11:14:00 GMT 2020
On Jan 22, 2020, Andreas Schwab <schwab@suse.de> wrote:
> On Dez 25 2019, Alexandre Oliva wrote:
>> +dnl # Different versions and execution modes implement different
>> +dnl # subsets of these functions. Instead of hard-coding, test for C
>> +dnl # declarations in headers. The C primitives could be defined as
>> +dnl # macros, in which case the tests might fail, and we might have to
>> +dnl # switch to more elaborate tests.
>> + GLIBCXX_CHECK_MATH_DECLS([
>> + acosl asinl atan2l atanl ceill cosl coshl expl fabsl floorl fmodl
>> + frexpl ldexpl log10l logl modfl powl sinl sinhl sqrtl tanl tanhl])
> Why can't you use AC_CHECK_DECLS?
IIRC it doesn't #undef, for one, but that's only relevant now.
I can't really recall whether using it even occurred to me, but a good
reason not to use it is that it defines HAVE_FUNCTION_DECL rather than
setting glibcxx_cv_func_$1_use={yes,no} and (through AC_CHECK_FUNCS)
HAVE_$1, like the preexisting macros in linkage.m4 we're substituting
for did before.
We could probably use AC_CHECK_DECL underneath, placing the #undef in
the INCLUDES argument. Indeed, it looks like the GLIBCXX_CHECK_*_DECL_?
macros in linkage.m4 could use AC_CHECK_DECL as well.
Does anyone know of any reason for them not to use AC_CHECK_DECL
instead of open-coding the tests?
And then, shouldn't they also #undef the functions they're testing for?
Or should neither? It doesn't feel right to add the #undef to the new
but otherwise identical compile test, just because it skips the link
test.
--
Alexandre Oliva, freedom fighter he/him https://FSFLA.org/blogs/lxo
Free Software Evangelist Stallman was right, but he's left :(
GNU Toolchain Engineer FSMatrix: It was he who freed the first of us
FSF & FSFLA board member The Savior shall return (true);
More information about the Libstdc++
mailing list