This provides support for targets without Float128 in their libc/libm.

It covers:
 * long double is 128b IEEE754
 * _Float128 support is provided in libc
 * __float128 support is available and uses libquadmath.

It has been tested as follows:

x86_64-linux (with libc support, uses libc)
x86_64-darwin (without libc support, uses libquadmath)
aarch64-linux (with libc support, uses libc)
aarch64-darwin (without libc support, uses libquadmath)

powerpc64le (glibc-2.17 - without libc support, uses libquadmath)
powerpc64le (glibc2.34 - with libc support)
 --with-long-double-format=ieee uses xxxieee128
 --with-long-double-format=ibm uses xxxf128

Thanks to Jakub for the suggestion on handling the long double case.

Most of the patch is mechanical - the tricky parts are really in the
configuration.

OK for trunk?
thanks
Iain


Iain Sandoe (2):
  testsuite, cobol: Add libquadmath paths.
  libgcobol: Allow libgcobol to use libquadmath [PR119244].

 gcc/testsuite/lib/cobol.exp |   9 +
 libgcobol/Makefile.am       |   9 +-
 libgcobol/Makefile.in       |  14 +-
 libgcobol/acinclude.m4      | 162 +++++++++++
 libgcobol/config.h.in       |  30 ++
 libgcobol/configure         | 527 +++++++++++++++++++++++++++++++++---
 libgcobol/configure.ac      |  41 ++-
 libgcobol/gfileio.cc        |   1 +
 libgcobol/gmath.cc          | 108 ++++----
 libgcobol/intrinsic.cc      | 186 +++++++------
 libgcobol/libgcobol-fp.h    |  50 ++++
 libgcobol/libgcobol.cc      | 186 +++++++------
 libgcobol/libgcobol.h       |  10 +-
 libgcobol/libgcobol.spec.in |   2 +-
 14 files changed, 1057 insertions(+), 278 deletions(-)
 create mode 100644 libgcobol/libgcobol-fp.h

-- 
2.39.2 (Apple Git-143)

Reply via email to