summaryrefslogtreecommitdiff
path: root/lang/gcc6
diff options
context:
space:
mode:
authormaya <maya@pkgsrc.org>2019-08-06 06:16:14 +0000
committermaya <maya@pkgsrc.org>2019-08-06 06:16:14 +0000
commit4cdfcffb081236296e34099a12c0819b7f841332 (patch)
treec34268cb2a9edb0bf5085780561bcee9f0926411 /lang/gcc6
parenta4c8127224c7d25717ee9ffca0f22af8a6f271b6 (diff)
downloadpkgsrc-4cdfcffb081236296e34099a12c0819b7f841332.tar.gz
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
Diffstat (limited to 'lang/gcc6')
-rw-r--r--lang/gcc6/distinfo3
-rw-r--r--lang/gcc6/patches/patch-gcc_ginclude_stddef.h64
2 files changed, 66 insertions, 1 deletions
diff --git a/lang/gcc6/distinfo b/lang/gcc6/distinfo
index f4c637a5df2..4a8d235182b 100644
--- a/lang/gcc6/distinfo
+++ b/lang/gcc6/distinfo
@@ -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_t-netbsd) = 802ad5706aa7ca9629f8e237f08fbb1569d28846
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
diff --git a/lang/gcc6/patches/patch-gcc_ginclude_stddef.h b/lang/gcc6/patches/patch-gcc_ginclude_stddef.h
new file mode 100644
index 00000000000..e260e339149
--- /dev/null
+++ b/lang/gcc6/patches/patch-gcc_ginclude_stddef.h
@@ -0,0 +1,64 @@
+$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 */
+