On Tue, Jan 11, 2022 at 10:30:26PM -0500, David Edelsohn wrote:
> The recent patch to support Power IEEE128 causes a bootstrap failure
> on AIX and possibly all non-GLIBC systems.
>
> +#if defined(__powerpc64__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ \
> + && defined __GLIBC_PREREQ && __GLIBC_PREREQ (2, 32)
> +#define POWER_IEEE128 1
> +#endif
>
> __GLIBC_PREREQ is tested on all systems.
>
> /nasfarm/edelsohn/src/src/libgfortran/libgfortran.h:107:49: error:
> missing binary operator before token "("
> 107 | && defined __GLIBC_PREREQ && __GLIBC_PREREQ (2, 32)
> | ^
This is what I've committed as obvious:
2022-01-12 Jakub Jelinek <[email protected]>
* libgfortran.h (POWER_IEEE128): Use __GLIBC_PREREQ in a separate
#if directive inside of #if ... && defined __GLIBC_PREREQ.
--- libgfortran/libgfortran.h.jj 2022-01-11 23:49:51.759830402 +0100
+++ libgfortran/libgfortran.h 2022-01-12 09:41:48.779107854 +0100
@@ -104,9 +104,11 @@ typedef off_t gfc_offset;
#endif
#if defined(__powerpc64__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ \
- && defined __GLIBC_PREREQ && __GLIBC_PREREQ (2, 32)
+ && defined __GLIBC_PREREQ
+#if __GLIBC_PREREQ (2, 32)
#define POWER_IEEE128 1
#endif
+#endif
/* These functions from <ctype.h> should only be used on values that can be
represented as unsigned char, otherwise the behavior is undefined.
Jakub