[power-ieee128] What should the math functions be annotated with?
Thomas Koenig
tkoenig@netcologne.de
Fri Dec 3 11:16:56 GMT 2021
On 03.12.21 10:28, Jakub Jelinek wrote:
> On Fri, Dec 03, 2021 at 08:29:53AM +0100, Thomas Koenig wrote:
>>
>> On 01.12.21 21:54, Jakub Jelinek via Fortran wrote:
>>
>>> Inside of libgfortran, I think it should depend on some macro defined
>>> in libgfortran.h.
>>> #if defined(__powerpc64__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ \
>>> && defined __GLIBC_PREREQ && __GLIBC_PREREQ (2, 32)
>>> then
>>> #define MATHFUNC(funcname) __ ## funcname ## ieee128
>>> (i.e. use the functions that will be used when one uses e.g.
>>> sinl in C when compiled with -mabi=ieeelongdouble), but I'm not sure
>>> if those need to be declared by libgfortran or math.h declares them).
>>> Otherwise (when libgfortran is compiled against glibc older than 2.32)
>>> it should use
>>> #define MATHFUNC(funcname) funcname ## q
>>> i.e. use the libquadmath APIs).
>>
>> The current Ubuntu does not have these functions:
>>
>> ubuntu@gcc-fortran:/lib/powerpc64le-linux-gnu$ nm libm.a 2>/dev/null | grep
>> ieee128
>> ubuntu@gcc-fortran:/lib/powerpc64le-linux-gnu$
>>
>> Will they be supplied in the future, or with the advanced toolchain?
>
> It is part of upstream glibc 2.32 (released Aug 2020) and later, see
> https://sourceware.org/git/?p=glibc.git;a=commit;h=051be01f6b41a1466b07ae4bd7f5894a8ec5fe67
> distrowatch says that glibc 2.32 and later is in Ubuntu 21.04 and later.
>
> Jakub
>
So it is not possible to test on the current machine set up for this,
which has ubuntu 20.04. This makes development rather pointless at
the moment :-(
So, what should the path forward be?
More information about the Fortran
mailing list