public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* libgfortran bootstrap failure
@ 2022-01-12  3:30 David Edelsohn
  2022-01-12  7:08 ` Jakub Jelinek
  2022-01-12  8:55 ` Jakub Jelinek
  0 siblings, 2 replies; 3+ messages in thread
From: David Edelsohn @ 2022-01-12  3:30 UTC (permalink / raw)
  To: Thomas Koenig, Bill Schmidt, Jakub Jelinek; +Cc: GCC Patches, Fortran List

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)
      |                                                 ^

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: libgfortran bootstrap failure
  2022-01-12  3:30 libgfortran bootstrap failure David Edelsohn
@ 2022-01-12  7:08 ` Jakub Jelinek
  2022-01-12  8:55 ` Jakub Jelinek
  1 sibling, 0 replies; 3+ messages in thread
From: Jakub Jelinek @ 2022-01-12  7:08 UTC (permalink / raw)
  To: David Edelsohn; +Cc: Thomas Koenig, Bill Schmidt, GCC Patches, Fortran List

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)
>       |                                                 ^

Guess we need:
#if defined(__powerpc64__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ \
    && defined __GLIBC_PREREQ
# if __GLIBC_PREREQ (2, 32)
#  define POWER_IEEE128 1
# endif
#endif
instead.

	Jakub


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: libgfortran bootstrap failure
  2022-01-12  3:30 libgfortran bootstrap failure David Edelsohn
  2022-01-12  7:08 ` Jakub Jelinek
@ 2022-01-12  8:55 ` Jakub Jelinek
  1 sibling, 0 replies; 3+ messages in thread
From: Jakub Jelinek @ 2022-01-12  8:55 UTC (permalink / raw)
  To: David Edelsohn; +Cc: Thomas Koenig, Bill Schmidt, GCC Patches, Fortran List

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  <jakub@redhat.com>

	* 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-12  8:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-12  3:30 libgfortran bootstrap failure David Edelsohn
2022-01-12  7:08 ` Jakub Jelinek
2022-01-12  8:55 ` Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).