]> git.ipfire.org Git - thirdparty/gcc.git/commit
libquadmath: Fix up libquadmath/math/sqrtq.c compilation in some powerpc* configurati...
authorJakub Jelinek <jakub@redhat.com>
Sat, 3 Aug 2024 18:37:54 +0000 (20:37 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sat, 3 Aug 2024 18:37:54 +0000 (20:37 +0200)
commit3ac02e67503ccffa3dfeeffc0a60fce6bdaca43b
treea137a8dd8837bff59773b208a0b8db53629bd100
parent8256d5c0097dff00f9bdf9ee0c9d53bd7cec2802
libquadmath: Fix up libquadmath/math/sqrtq.c compilation in some powerpc* configurations [PR116007]

My PR114623 change started using soft-fp.h and quad.h for the sqrtq implementation.
Unfortunately, that seems to fail building in some powerpc* configurations, where
TFmode isn't available.
quad.h has:
 #ifndef TFtype
 typedef float TFtype __attribute__ ((mode (TF)));
 #endif
and uses TFtype.  quad.h has:
 /* Define the complex type corresponding to __float128
    ("_Complex __float128" is not allowed) */
 #if (!defined(_ARCH_PPC)) || defined(__LONG_DOUBLE_IEEE128__)
 typedef _Complex float __attribute__((mode(TC))) __complex128;
 #else
 typedef _Complex float __attribute__((mode(KC))) __complex128;
 #endif
with the conditional and KCmode use added during porting of libquadmath
to powerpc*, so I've just defined TFtype for powerpc when __LONG_DOUBLE_IEEE128__
isn't defined; I could define it to float __attribute__ ((mode (KF))) but it
seemed easier to just define it to __float128 which should do the same thing.

2024-08-03  Jakub Jelinek  <jakub@redhat.com>

PR target/116007
* math/sqrtq.c (TFtype): For PowerPC without __LONG_DOUBLE_IEEE128__
define to __float128 before including soft-fp.h and quad.h.
libquadmath/math/sqrtq.c