Tue Aug 6 06:16:16 2019 UTC ()
gcc{48,49,5,6}: add patch to avoid fragile include guard logic
for ansi.h on netbsd.
gcc{7,8}: document same patch that already existed was upstreamed.

This patch is necessary to build GCC on NetBSD >= 9.0, since changes
to ansi.h resulted in not using the same include guards.

Fixes PR toolchain/54362


(maya)
diff -r1.38 -r1.39 pkgsrc/lang/gcc48/distinfo
diff -r1.2 -r1.3 pkgsrc/lang/gcc48/patches/patch-gcc_ginclude_stddef.h
diff -r1.15 -r1.16 pkgsrc/lang/gcc49/distinfo
diff -r1.1 -r1.2 pkgsrc/lang/gcc49/patches/patch-gcc_ginclude_stddef.h
diff -r1.19 -r1.20 pkgsrc/lang/gcc5/distinfo
diff -r0 -r1.1 pkgsrc/lang/gcc5/patches/patch-gcc_ginclude_stddef.h
diff -r1.16 -r1.17 pkgsrc/lang/gcc6/distinfo
diff -r0 -r1.1 pkgsrc/lang/gcc6/patches/patch-gcc_ginclude_stddef.h
diff -r1.15 -r1.16 pkgsrc/lang/gcc7/distinfo
diff -r1.1 -r1.2 pkgsrc/lang/gcc7/patches/patch-gcc_ginclude_stddef.h
diff -r1.9 -r1.10 pkgsrc/lang/gcc8/distinfo
diff -r1.1 -r1.2 pkgsrc/lang/gcc8/patches/patch-gcc_ginclude_stddef.h

cvs diff -r1.38 -r1.39 pkgsrc/lang/gcc48/Attic/distinfo (expand / switch to context diff)
--- pkgsrc/lang/gcc48/Attic/distinfo 2018/07/18 23:15:42 1.38
+++ pkgsrc/lang/gcc48/Attic/distinfo 2019/08/06 06:16:14 1.39
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.38 2018/07/18 23:15:42 maya Exp $
+$NetBSD: distinfo,v 1.39 2019/08/06 06:16:14 maya Exp $
 
 SHA1 (ecj-4.5.jar) = 58c1d79c64c8cd718550f32a932ccfde8d1e6449
 RMD160 (ecj-4.5.jar) = d3f4da657f086b6423f74e93f001132f4855368a
@@ -55,7 +55,7 @@
 SHA1 (patch-gcc_doc_gcc.texi) = 0b6ea28f887efc78ebd2f450c3f59ee7eaa15117
 SHA1 (patch-gcc_fortran_f95-lang.c) = 8dc0a1728fd0521caf71a4f5c2eb938340f20efa
 SHA1 (patch-gcc_ggc-common.c) = fa577bc25260d7e6304f166686ba51c0b677d7f6
-SHA1 (patch-gcc_ginclude_stddef.h) = 220ec23aecffca81337ae4c06afc18051da89b9a
+SHA1 (patch-gcc_ginclude_stddef.h) = 8eb1500c59fe778735d59e2b621c04cfc1633d60
 SHA1 (patch-gcc_go_go-lang.c) = dbef7b86ccbf657356412a2420d98725d53eb356
 SHA1 (patch-gcc_java_lang.c) = 781c8f70241df0e5cfb1c69beb755bee14a6c54e
 SHA1 (patch-gcc_lto_lto.c) = cc7fdf396c238785141e0ffc8ca8f62a91640f58

cvs diff -r1.2 -r1.3 pkgsrc/lang/gcc48/patches/Attic/patch-gcc_ginclude_stddef.h (expand / switch to context diff)
--- pkgsrc/lang/gcc48/patches/Attic/patch-gcc_ginclude_stddef.h 2014/04/08 06:20:42 1.2
+++ pkgsrc/lang/gcc48/patches/Attic/patch-gcc_ginclude_stddef.h 2019/08/06 06:16:14 1.3
@@ -1,10 +1,20 @@
-$NetBSD: patch-gcc_ginclude_stddef.h,v 1.2 2014/04/08 06:20:42 asau Exp $
+$NetBSD: patch-gcc_ginclude_stddef.h,v 1.3 2019/08/06 06:16:14 maya Exp $
 
---- gcc/ginclude/stddef.h.orig	2013-01-10 20:38:27.000000000 +0000
+Avoid relying on fragile include guards for NetBSD ansi.h.
+DragonflyBSD support
+
+Both upstreamed (GCC 9.x, GCC 5.x respectively)
+
+--- gcc/ginclude/stddef.h.orig	2019-08-06 05:58:50.166834311 +0000
 +++ gcc/ginclude/stddef.h
-@@ -50,12 +50,21 @@ see the files COPYING3 and COPYING.RUNTI
-    one less case to deal with in the following.  */
- #if defined (__BSD_NET2__) || defined (____386BSD____) || (defined (__FreeBSD__) && (__FreeBSD__ < 5)) || defined(__NetBSD__)
+@@ -46,21 +46,24 @@ see the files COPYING3 and COPYING.RUNTI
+ /* This avoids lossage on SunOS but only if stdtypes.h comes first.
+    There's no way to win with the other order!  Sun lossage.  */
+ 
+-/* On 4.3bsd-net2, make sure ansi.h is included, so we have
+-   one less case to deal with in the following.  */
+-#if defined (__BSD_NET2__) || defined (____386BSD____) || (defined (__FreeBSD__) && (__FreeBSD__ < 5)) || defined(__NetBSD__)
++#if defined(__NetBSD__)
  #include <machine/ansi.h>
 +#if !defined(_MACHINE_ANSI_H_)
 +#if defined(_I386_ANSI_H_) || defined(_X86_64_ANSI_H_)
@@ -17,14 +27,29 @@
  #include <sys/_types.h>
  #endif
  
+-/* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
+-   defined if the corresponding type is *not* defined.
+-   FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_.
+-   NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_ */
+-#if defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) || defined(_X86_64_ANSI_H_)  || defined(_I386_ANSI_H_)
 +#if defined(__DragonFly__)
 +#include <sys/types.h>
 +#endif
 +
- /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
-    defined if the corresponding type is *not* defined.
-    FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_.
-@@ -133,6 +142,7 @@ _TYPE_wchar_t;
++#if defined(__NetBSD__)
+ #if !defined(_SIZE_T_) && !defined(_BSD_SIZE_T_)
+ #define _SIZE_T
+ #endif
+@@ -87,7 +90,7 @@ see the files COPYING3 and COPYING.RUNTI
+ #undef _WCHAR_T_
+ #undef _BSD_WCHAR_T_
+ #endif
+-#endif /* defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) || defined(_X86_64_ANSI_H_) || defined(_I386_ANSI_H_) */
++#endif /* defined(__NetBSD__) */
+ 
+ /* Sequent's header files use _PTRDIFF_T_ in some conflicting way.
+    Just ignore it.  */
+@@ -133,6 +136,7 @@ _TYPE_wchar_t;
  #ifndef _BSD_PTRDIFF_T_
  #ifndef ___int_ptrdiff_t_h
  #ifndef _GCC_PTRDIFF_T
@@ -32,7 +57,7 @@
  #define _PTRDIFF_T
  #define _T_PTRDIFF_
  #define _T_PTRDIFF
-@@ -141,10 +151,12 @@ _TYPE_wchar_t;
+@@ -141,10 +145,12 @@ _TYPE_wchar_t;
  #define _BSD_PTRDIFF_T_
  #define ___int_ptrdiff_t_h
  #define _GCC_PTRDIFF_T
@@ -45,7 +70,7 @@
  #endif /* _GCC_PTRDIFF_T */
  #endif /* ___int_ptrdiff_t_h */
  #endif /* _BSD_PTRDIFF_T_ */
-@@ -198,6 +210,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
+@@ -198,6 +204,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
  #define _GCC_SIZE_T
  #define _SIZET_
  #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \
@@ -53,7 +78,7 @@
    || defined(__FreeBSD_kernel__)
  /* __size_t is a typedef on FreeBSD 5, must not trash it. */
  #elif defined (__VMS__)
-@@ -306,7 +319,7 @@ typedef _BSD_RUNE_T_ rune_t;
+@@ -306,7 +313,7 @@ typedef _BSD_RUNE_T_ rune_t;
  /* FreeBSD 5 can't be handled well using "traditional" logic above
     since it no longer defines _BSD_RUNE_T_ yet still desires to export
     rune_t in some cases... */
@@ -62,3 +87,25 @@
  #if !defined (_ANSI_SOURCE) && !defined (_POSIX_SOURCE)
  #if __BSD_VISIBLE
  #ifndef _RUNE_T_DECLARED
+@@ -355,11 +362,7 @@ typedef __WINT_TYPE__ wint_t;
+ #undef __need_wint_t
+ #endif
+ 
+-/*  In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
+-    are already defined.  */
+-/*  BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here.  */
+-/*  NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here.  */
+-#if defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) || defined(_X86_64_ANSI_H_) || defined(_I386_ANSI_H_)
++#if defined(__NetBSD__)
+ /*  The references to _GCC_PTRDIFF_T_, _GCC_SIZE_T_, and _GCC_WCHAR_T_
+     are probably typos and should be removed before 2.8 is released.  */
+ #ifdef _GCC_PTRDIFF_T_
+@@ -387,7 +390,7 @@ typedef __WINT_TYPE__ wint_t;
+ #undef _WCHAR_T_
+ #undef _BSD_WCHAR_T_
+ #endif
+-#endif /* _ANSI_H_ || _MACHINE_ANSI_H_ || _X86_64_ANSI_H_ || _I386_ANSI_H_ */
++#endif /* __NetBSD__ */
+ 
+ #endif /* __sys_stdtypes_h */
+ 

cvs diff -r1.15 -r1.16 pkgsrc/lang/gcc49/Attic/distinfo (expand / switch to context diff)
--- pkgsrc/lang/gcc49/Attic/distinfo 2017/10/14 14:46:00 1.15
+++ pkgsrc/lang/gcc49/Attic/distinfo 2019/08/06 06:16:15 1.16
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.15 2017/10/14 14:46:00 ryoon Exp $
+$NetBSD: distinfo,v 1.16 2019/08/06 06:16:15 maya Exp $
 
 SHA1 (ecj-4.5.jar) = 58c1d79c64c8cd718550f32a932ccfde8d1e6449
 RMD160 (ecj-4.5.jar) = d3f4da657f086b6423f74e93f001132f4855368a
@@ -24,7 +24,7 @@
 SHA1 (patch-gcc_configure) = b925cb971ec547a9c25b518927493a168391d7da
 SHA1 (patch-gcc_fortran_f95-lang.c) = 9dbac16c146821eed9b06e1e9f0da85ff5c4ee75
 SHA1 (patch-gcc_ggc-common.c) = fa577bc25260d7e6304f166686ba51c0b677d7f6
-SHA1 (patch-gcc_ginclude_stddef.h) = 8af3e4b4058fc623c61e91f5771699f0ce679957
+SHA1 (patch-gcc_ginclude_stddef.h) = d1141d2f8b0e4975bbcf90c84836f410e65d39bc
 SHA1 (patch-gcc_system.h) = 4c959a6b1c4d524cbdf44cfb80f0e5758ec20783
 SHA1 (patch-gcc_targhooks.c) = ac5bf5f201389f5bb79866d9e0dc93ee28af51f2
 SHA1 (patch-include_libiberty.h) = 5254c6a421ae16c71571820f6f07906367f042ba

cvs diff -r1.1 -r1.2 pkgsrc/lang/gcc49/patches/Attic/patch-gcc_ginclude_stddef.h (expand / switch to context diff)
--- pkgsrc/lang/gcc49/patches/Attic/patch-gcc_ginclude_stddef.h 2014/09/04 18:43:11 1.1
+++ pkgsrc/lang/gcc49/patches/Attic/patch-gcc_ginclude_stddef.h 2019/08/06 06:16:15 1.2
@@ -1,34 +1,51 @@
-$NetBSD: patch-gcc_ginclude_stddef.h,v 1.1 2014/09/04 18:43:11 jperkin Exp $
+$NetBSD: patch-gcc_ginclude_stddef.h,v 1.2 2019/08/06 06:16:15 maya Exp $
 
-Fix build on NetBSD i386/amd64 after the ansi.h header include protection
-name change.
+Avoid relying on fragile include guard logic from ansi.h (it breaks again
+on NetBSD 9.0).
 Add DragonFly support.
 
---- gcc/ginclude/stddef.h.orig	2014-01-02 22:23:26.000000000 +0000
+Both already upstreamed (GCC 9.0, GCC 5.x respectively).
+
+--- gcc/ginclude/stddef.h.orig	2019-08-06 05:51:50.808043034 +0000
 +++ gcc/ginclude/stddef.h
-@@ -50,12 +50,21 @@ see the files COPYING3 and COPYING.RUNTI
-    one less case to deal with in the following.  */
- #if defined (__BSD_NET2__) || defined (____386BSD____) || (defined (__FreeBSD__) && (__FreeBSD__ < 5)) || defined(__NetBSD__)
+@@ -46,9 +46,7 @@ see the files COPYING3 and COPYING.RUNTI
+ /* This avoids lossage on SunOS but only if stdtypes.h comes first.
+    There's no way to win with the other order!  Sun lossage.  */
+ 
+-/* On 4.3bsd-net2, make sure ansi.h is included, so we have
+-   one less case to deal with in the following.  */
+-#if defined (__BSD_NET2__) || defined (____386BSD____) || (defined (__FreeBSD__) && (__FreeBSD__ < 5)) || defined(__NetBSD__)
++#if defined(__NetBSD__)
  #include <machine/ansi.h>
-+#if !defined(_MACHINE_ANSI_H_)
-+#if defined(_I386_ANSI_H_) || defined(_X86_64_ANSI_H_)
-+#define _MACHINE_ANSI_H_
-+#endif
-+#endif
  #endif
  /* On FreeBSD 5, machine/ansi.h does not exist anymore... */
- #if defined (__FreeBSD__) && (__FreeBSD__ >= 5)
+@@ -56,11 +54,11 @@ see the files COPYING3 and COPYING.RUNTI
  #include <sys/_types.h>
  #endif
  
+-/* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
+-   defined if the corresponding type is *not* defined.
+-   FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_.
+-   NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_ */
+-#if defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) || defined(_X86_64_ANSI_H_)  || defined(_I386_ANSI_H_)
 +#if defined(__DragonFly__)
 +#include <sys/types.h>
 +#endif
 +
- /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
-    defined if the corresponding type is *not* defined.
-    FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_.
-@@ -133,6 +142,7 @@ _TYPE_wchar_t;
++#if defined(__NetBSD__)
+ #if !defined(_SIZE_T_) && !defined(_BSD_SIZE_T_)
+ #define _SIZE_T
+ #endif
+@@ -87,7 +85,7 @@ see the files COPYING3 and COPYING.RUNTI
+ #undef _WCHAR_T_
+ #undef _BSD_WCHAR_T_
+ #endif
+-#endif /* defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) || defined(_X86_64_ANSI_H_) || defined(_I386_ANSI_H_) */
++#endif /* defined(__NetBSD__) */
+ 
+ /* Sequent's header files use _PTRDIFF_T_ in some conflicting way.
+    Just ignore it.  */
+@@ -133,6 +131,7 @@ _TYPE_wchar_t;
  #ifndef _BSD_PTRDIFF_T_
  #ifndef ___int_ptrdiff_t_h
  #ifndef _GCC_PTRDIFF_T
@@ -36,7 +53,7 @@
  #define _PTRDIFF_T
  #define _T_PTRDIFF_
  #define _T_PTRDIFF
-@@ -141,10 +151,12 @@ _TYPE_wchar_t;
+@@ -141,10 +140,12 @@ _TYPE_wchar_t;
  #define _BSD_PTRDIFF_T_
  #define ___int_ptrdiff_t_h
  #define _GCC_PTRDIFF_T
@@ -49,7 +66,7 @@
  #endif /* _GCC_PTRDIFF_T */
  #endif /* ___int_ptrdiff_t_h */
  #endif /* _BSD_PTRDIFF_T_ */
-@@ -198,6 +210,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
+@@ -198,6 +199,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
  #define _GCC_SIZE_T
  #define _SIZET_
  #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \
@@ -57,7 +74,7 @@
    || defined(__FreeBSD_kernel__)
  /* __size_t is a typedef on FreeBSD 5, must not trash it. */
  #elif defined (__VMS__)
-@@ -306,7 +319,7 @@ typedef _BSD_RUNE_T_ rune_t;
+@@ -306,7 +308,7 @@ typedef _BSD_RUNE_T_ rune_t;
  /* FreeBSD 5 can't be handled well using "traditional" logic above
     since it no longer defines _BSD_RUNE_T_ yet still desires to export
     rune_t in some cases... */
@@ -66,3 +83,25 @@
  #if !defined (_ANSI_SOURCE) && !defined (_POSIX_SOURCE)
  #if __BSD_VISIBLE
  #ifndef _RUNE_T_DECLARED
+@@ -355,11 +357,7 @@ typedef __WINT_TYPE__ wint_t;
+ #undef __need_wint_t
+ #endif
+ 
+-/*  In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
+-    are already defined.  */
+-/*  BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here.  */
+-/*  NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here.  */
+-#if defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) || defined(_X86_64_ANSI_H_) || defined(_I386_ANSI_H_)
++#if defined(__NetBSD__)
+ /*  The references to _GCC_PTRDIFF_T_, _GCC_SIZE_T_, and _GCC_WCHAR_T_
+     are probably typos and should be removed before 2.8 is released.  */
+ #ifdef _GCC_PTRDIFF_T_
+@@ -387,7 +385,7 @@ typedef __WINT_TYPE__ wint_t;
+ #undef _WCHAR_T_
+ #undef _BSD_WCHAR_T_
+ #endif
+-#endif /* _ANSI_H_ || _MACHINE_ANSI_H_ || _X86_64_ANSI_H_ || _I386_ANSI_H_ */
++#endif /* __NetBSD__ */
+ 
+ #endif /* __sys_stdtypes_h */
+ 

cvs diff -r1.19 -r1.20 pkgsrc/lang/gcc5/Attic/distinfo (expand / switch to context diff)
--- pkgsrc/lang/gcc5/Attic/distinfo 2018/07/18 22:42:57 1.19
+++ pkgsrc/lang/gcc5/Attic/distinfo 2019/08/06 06:16:15 1.20
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.19 2018/07/18 22:42:57 maya Exp $
+$NetBSD: distinfo,v 1.20 2019/08/06 06:16:15 maya Exp $
 
 SHA1 (gcc-5.5.0.tar.xz) = 0d985aaf6d63598916933a690cb902d47d385bea
 RMD160 (gcc-5.5.0.tar.xz) = 63fdc006c2289f81df664d1fd9b4124f71732e7b
@@ -23,6 +23,7 @@
 SHA1 (patch-gcc_config_x-netbsd) = 6dc3d78e26df62054ea29f98ca51592858e671e3
 SHA1 (patch-gcc_configure) = d6cc6a0bd257829ca2fd077a852fc447acaa63a0
 SHA1 (patch-gcc_ggc-common.c) = a5d2dba635859f5d680c3f80d7c30b42461c752b
+SHA1 (patch-gcc_ginclude_stddef.h) = fb1f83801e0f5bcec110667dc868c47ff2d10343
 SHA1 (patch-gcc_lto_lto.c) = 825b632e2a7ff5777d4fbfdcf6f0ea3f64c4742b
 SHA1 (patch-gcc_system.h) = 4c959a6b1c4d524cbdf44cfb80f0e5758ec20783
 SHA1 (patch-gcc_targhooks.c) = b4389cc6e2490e8ee3d4dd60d84e32dee8473648

File Added: pkgsrc/lang/gcc5/patches/Attic/patch-gcc_ginclude_stddef.h
$NetBSD: patch-gcc_ginclude_stddef.h,v 1.1 2019/08/06 06:16:15 maya Exp $

handle netbsd/arm not using the same include guards for
ansi.h as other archs

Upstreamed in 2018-06-20 (GCC 9.x)

--- gcc/ginclude/stddef.h.orig	2017-01-01 12:07:43.000000000 +0000
+++ gcc/ginclude/stddef.h
@@ -46,9 +46,7 @@ see the files COPYING3 and COPYING.RUNTI
 /* This avoids lossage on SunOS but only if stdtypes.h comes first.
    There's no way to win with the other order!  Sun lossage.  */
 
-/* On 4.3bsd-net2, make sure ansi.h is included, so we have
-   one less case to deal with in the following.  */
-#if defined (__BSD_NET2__) || defined (____386BSD____) || (defined (__FreeBSD__) && (__FreeBSD__ < 5)) || defined(__NetBSD__)
+#if defined(__NetBSD__)
 #include <machine/ansi.h>
 #endif
 /* On FreeBSD 5, machine/ansi.h does not exist anymore... */
@@ -56,11 +54,7 @@ see the files COPYING3 and COPYING.RUNTI
 #include <sys/_types.h>
 #endif
 
-/* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
-   defined if the corresponding type is *not* defined.
-   FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_.
-   NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_ */
-#if defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) || defined(_X86_64_ANSI_H_)  || defined(_I386_ANSI_H_)
+#if defined(__NetBSD__)
 #if !defined(_SIZE_T_) && !defined(_BSD_SIZE_T_)
 #define _SIZE_T
 #endif
@@ -87,7 +81,7 @@ see the files COPYING3 and COPYING.RUNTI
 #undef _WCHAR_T_
 #undef _BSD_WCHAR_T_
 #endif
-#endif /* defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) || defined(_X86_64_ANSI_H_) || defined(_I386_ANSI_H_) */
+#endif /* defined(__NetBSD__) */
 
 /* Sequent's header files use _PTRDIFF_T_ in some conflicting way.
    Just ignore it.  */
@@ -359,11 +353,7 @@ typedef __WINT_TYPE__ wint_t;
 #undef __need_wint_t
 #endif
 
-/*  In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
-    are already defined.  */
-/*  BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here.  */
-/*  NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here.  */
-#if defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) || defined(_X86_64_ANSI_H_) || defined(_I386_ANSI_H_)
+#if defined(__NetBSD__)
 /*  The references to _GCC_PTRDIFF_T_, _GCC_SIZE_T_, and _GCC_WCHAR_T_
     are probably typos and should be removed before 2.8 is released.  */
 #ifdef _GCC_PTRDIFF_T_
@@ -391,7 +381,7 @@ typedef __WINT_TYPE__ wint_t;
 #undef _WCHAR_T_
 #undef _BSD_WCHAR_T_
 #endif
-#endif /* _ANSI_H_ || _MACHINE_ANSI_H_ || _X86_64_ANSI_H_ || _I386_ANSI_H_ */
+#endif /* __NetBSD__ */
 
 #endif /* __sys_stdtypes_h */
 

cvs diff -r1.16 -r1.17 pkgsrc/lang/gcc6/distinfo (expand / switch to context diff)
--- pkgsrc/lang/gcc6/distinfo 2019/01/20 09:19:44 1.16
+++ pkgsrc/lang/gcc6/distinfo 2019/08/06 06:16:15 1.17
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.16 2019/01/20 09:19:44 he Exp $
+$NetBSD: distinfo,v 1.17 2019/08/06 06:16:15 maya Exp $
 
 SHA1 (gcc-6.5.0.tar.xz) = 368b3f5d294b1a8727b372ac0a77703d8b41968a
 RMD160 (gcc-6.5.0.tar.xz) = 66782b17cff89f22e5e8869fa96bd9a8985f5067
@@ -21,6 +21,7 @@
 SHA1 (patch-gcc_config_x-netbsd) = 6dc3d78e26df62054ea29f98ca51592858e671e3
 SHA1 (patch-gcc_configure) = 15fb7af267b79965f83bc64ce8aad1279b0ea52d
 SHA1 (patch-gcc_ggc-common.c) = a5d2dba635859f5d680c3f80d7c30b42461c752b
+SHA1 (patch-gcc_ginclude_stddef.h) = fb1f83801e0f5bcec110667dc868c47ff2d10343
 SHA1 (patch-gcc_lto_lto.c) = 825b632e2a7ff5777d4fbfdcf6f0ea3f64c4742b
 SHA1 (patch-gcc_system.h) = 4c959a6b1c4d524cbdf44cfb80f0e5758ec20783
 SHA1 (patch-gcc_targhooks.c) = f8ec71006cf35947e93fa229bc2f52f46cf5597b

File Added: pkgsrc/lang/gcc6/patches/patch-gcc_ginclude_stddef.h
$NetBSD: patch-gcc_ginclude_stddef.h,v 1.1 2019/08/06 06:16:15 maya Exp $

handle netbsd/arm not using the same include guards for
ansi.h as other archs

Upstreamed in 2018-06-20 (GCC 9.x)

--- gcc/ginclude/stddef.h.orig	2017-01-01 12:07:43.000000000 +0000
+++ gcc/ginclude/stddef.h
@@ -46,9 +46,7 @@ see the files COPYING3 and COPYING.RUNTI
 /* This avoids lossage on SunOS but only if stdtypes.h comes first.
    There's no way to win with the other order!  Sun lossage.  */
 
-/* On 4.3bsd-net2, make sure ansi.h is included, so we have
-   one less case to deal with in the following.  */
-#if defined (__BSD_NET2__) || defined (____386BSD____) || (defined (__FreeBSD__) && (__FreeBSD__ < 5)) || defined(__NetBSD__)
+#if defined(__NetBSD__)
 #include <machine/ansi.h>
 #endif
 /* On FreeBSD 5, machine/ansi.h does not exist anymore... */
@@ -56,11 +54,7 @@ see the files COPYING3 and COPYING.RUNTI
 #include <sys/_types.h>
 #endif
 
-/* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
-   defined if the corresponding type is *not* defined.
-   FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_.
-   NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_ */
-#if defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) || defined(_X86_64_ANSI_H_)  || defined(_I386_ANSI_H_)
+#if defined(__NetBSD__)
 #if !defined(_SIZE_T_) && !defined(_BSD_SIZE_T_)
 #define _SIZE_T
 #endif
@@ -87,7 +81,7 @@ see the files COPYING3 and COPYING.RUNTI
 #undef _WCHAR_T_
 #undef _BSD_WCHAR_T_
 #endif
-#endif /* defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) || defined(_X86_64_ANSI_H_) || defined(_I386_ANSI_H_) */
+#endif /* defined(__NetBSD__) */
 
 /* Sequent's header files use _PTRDIFF_T_ in some conflicting way.
    Just ignore it.  */
@@ -359,11 +353,7 @@ typedef __WINT_TYPE__ wint_t;
 #undef __need_wint_t
 #endif
 
-/*  In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
-    are already defined.  */
-/*  BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here.  */
-/*  NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here.  */
-#if defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) || defined(_X86_64_ANSI_H_) || defined(_I386_ANSI_H_)
+#if defined(__NetBSD__)
 /*  The references to _GCC_PTRDIFF_T_, _GCC_SIZE_T_, and _GCC_WCHAR_T_
     are probably typos and should be removed before 2.8 is released.  */
 #ifdef _GCC_PTRDIFF_T_
@@ -391,7 +381,7 @@ typedef __WINT_TYPE__ wint_t;
 #undef _WCHAR_T_
 #undef _BSD_WCHAR_T_
 #endif
-#endif /* _ANSI_H_ || _MACHINE_ANSI_H_ || _X86_64_ANSI_H_ || _I386_ANSI_H_ */
+#endif /* __NetBSD__ */
 
 #endif /* __sys_stdtypes_h */
 

cvs diff -r1.15 -r1.16 pkgsrc/lang/gcc7/distinfo (expand / switch to context diff)
--- pkgsrc/lang/gcc7/distinfo 2019/06/14 09:42:35 1.15
+++ pkgsrc/lang/gcc7/distinfo 2019/08/06 06:16:15 1.16
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.15 2019/06/14 09:42:35 adam Exp $
+$NetBSD: distinfo,v 1.16 2019/08/06 06:16:15 maya Exp $
 
 SHA1 (gcc-7.4.0.tar.xz) = bf09553cfa08ae6e29dfbbd541e5c69c3cbc6c66
 RMD160 (gcc-7.4.0.tar.xz) = 77d3cdafe7df748fa484a300e9513acb3ee2c2e1
@@ -29,7 +29,7 @@
 SHA1 (patch-gcc_config_x-netbsd) = 6dc3d78e26df62054ea29f98ca51592858e671e3
 SHA1 (patch-gcc_configure) = 15fb7af267b79965f83bc64ce8aad1279b0ea52d
 SHA1 (patch-gcc_ggc-common.c) = a5d2dba635859f5d680c3f80d7c30b42461c752b
-SHA1 (patch-gcc_ginclude_stddef.h) = 583b7931aad14058be75569b0138efad8ac74113
+SHA1 (patch-gcc_ginclude_stddef.h) = fb1f83801e0f5bcec110667dc868c47ff2d10343
 SHA1 (patch-gcc_lto_lto.c) = 825b632e2a7ff5777d4fbfdcf6f0ea3f64c4742b
 SHA1 (patch-gcc_system.h) = 4c959a6b1c4d524cbdf44cfb80f0e5758ec20783
 SHA1 (patch-gcc_targhooks.c) = 6268d548058b6325ead1115f78c2c17c6d786296

cvs diff -r1.1 -r1.2 pkgsrc/lang/gcc7/patches/patch-gcc_ginclude_stddef.h (expand / switch to context diff)
--- pkgsrc/lang/gcc7/patches/patch-gcc_ginclude_stddef.h 2018/06/17 19:50:52 1.1
+++ pkgsrc/lang/gcc7/patches/patch-gcc_ginclude_stddef.h 2019/08/06 06:16:15 1.2
@@ -1,7 +1,9 @@
-$NetBSD: patch-gcc_ginclude_stddef.h,v 1.1 2018/06/17 19:50:52 maya Exp $
+$NetBSD: patch-gcc_ginclude_stddef.h,v 1.2 2019/08/06 06:16:15 maya Exp $
 
 handle netbsd/arm not using the same include guards for
 ansi.h as other archs
+
+Upstreamed in 2018-06-20 (GCC 9.x)
 
 --- gcc/ginclude/stddef.h.orig	2017-01-01 12:07:43.000000000 +0000
 +++ gcc/ginclude/stddef.h

cvs diff -r1.9 -r1.10 pkgsrc/lang/gcc8/distinfo (expand / switch to context diff)
--- pkgsrc/lang/gcc8/distinfo 2019/05/31 09:23:57 1.9
+++ pkgsrc/lang/gcc8/distinfo 2019/08/06 06:16:15 1.10
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.9 2019/05/31 09:23:57 kamil Exp $
+$NetBSD: distinfo,v 1.10 2019/08/06 06:16:15 maya Exp $
 
 SHA1 (gcc-8.3.0.tar.xz) = c27f4499dd263fe4fb01bcc5565917f3698583b2
 RMD160 (gcc-8.3.0.tar.xz) = 59396f7136301466d0ec15eb7307558c0da692df
@@ -22,7 +22,7 @@
 SHA1 (patch-gcc_config_x-netbsd) = 6dc3d78e26df62054ea29f98ca51592858e671e3
 SHA1 (patch-gcc_configure) = 6a2d8eeeed2bf08c3c81291178e669dc91c913ce
 SHA1 (patch-gcc_ggc-common.c) = a5d2dba635859f5d680c3f80d7c30b42461c752b
-SHA1 (patch-gcc_ginclude_stddef.h) = 583b7931aad14058be75569b0138efad8ac74113
+SHA1 (patch-gcc_ginclude_stddef.h) = fb1f83801e0f5bcec110667dc868c47ff2d10343
 SHA1 (patch-gcc_lto_lto.c) = 7bd85ac8ade76a28c394f6fbe5d495f91824f79f
 SHA1 (patch-gcc_targhooks.c) = b28d8a9696d07bbfb00b7d8c55193ba99447ff1d
 SHA1 (patch-isl_configure) = 5523c76d95b229b3cd25461b4c2b7af24bf2534e

cvs diff -r1.1 -r1.2 pkgsrc/lang/gcc8/patches/patch-gcc_ginclude_stddef.h (expand / switch to context diff)
--- pkgsrc/lang/gcc8/patches/patch-gcc_ginclude_stddef.h 2018/11/10 11:45:27 1.1
+++ pkgsrc/lang/gcc8/patches/patch-gcc_ginclude_stddef.h 2019/08/06 06:16:16 1.2
@@ -1,7 +1,9 @@
-$NetBSD: patch-gcc_ginclude_stddef.h,v 1.1 2018/11/10 11:45:27 mrg Exp $
+$NetBSD: patch-gcc_ginclude_stddef.h,v 1.2 2019/08/06 06:16:16 maya Exp $
 
 handle netbsd/arm not using the same include guards for
 ansi.h as other archs
+
+Upstreamed in 2018-06-20 (GCC 9.x)
 
 --- gcc/ginclude/stddef.h.orig	2017-01-01 12:07:43.000000000 +0000
 +++ gcc/ginclude/stddef.h