svn commit: r504795 - head/devel/tigcc/files
Tobias Kortkamp
tobik at FreeBSD.org
Fri Jun 21 12:37:53 UTC 2019
Author: tobik
Date: Fri Jun 21 12:37:51 2019
New Revision: 504795
URL: https://svnweb.freebsd.org/changeset/ports/504795
Log:
devel/tigcc: Unbreak build with GCC 9
.../gnu/gcc-4.1-20060728/gcc/c-decl.c: At top level:
.../gnu/gcc-4.1-20060728/gcc/c-decl.c:1130:1: error: 'cgraph_node' is not defined as a type
1130 | locate_old_decl (tree decl, void (*diag)(const char *, ...) ATTRIBUTE_GCC_CDIAG(1,2))
| ^~~~~~~~~~~~~~~
http://pb2.nyi.freebsd.org/data/120i386-default-PR238330/2019-06-09_20h27m22s/logs/errors/tigcc-0.96.b8_9.log
Workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90677
PR: 238330
Added:
head/devel/tigcc/files/patch-gcc9 (contents, props changed)
Added: head/devel/tigcc/files/patch-gcc9
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/tigcc/files/patch-gcc9 Fri Jun 21 12:37:51 2019 (r504795)
@@ -0,0 +1,42 @@
+Unbreak build with GCC 9
+
+.../gnu/gcc-4.1-20060728/gcc/c-decl.c: At top level:
+.../gnu/gcc-4.1-20060728/gcc/c-decl.c:1130:1: error: 'cgraph_node' is not defined as a type
+ 1130 | locate_old_decl (tree decl, void (*diag)(const char *, ...) ATTRIBUTE_GCC_CDIAG(1,2))
+ | ^~~~~~~~~~~~~~~
+
+Workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90677
+
+--- gnu/gcc-4.1-20060728/gcc/c-tree.h.orig 2019-06-21 11:59:14 UTC
++++ gnu/gcc-4.1-20060728/gcc/c-tree.h
+@@ -613,7 +613,7 @@ extern void c_write_global_declarations (void);
+ /* In order for the format checking to accept the C frontend
+ diagnostic framework extensions, you must include this file before
+ toplev.h, not after. */
+-#if GCC_VERSION >= 4001
++#if GCC_VERSION >= 4001 && GCC_VERSION < 9001
+ #define ATTRIBUTE_GCC_CDIAG(m, n) __attribute__ ((__format__ (GCC_DIAG_STYLE, m ,n))) ATTRIBUTE_NONNULL(m)
+ #else
+ #define ATTRIBUTE_GCC_CDIAG(m, n) ATTRIBUTE_NONNULL(m)
+--- gnu/gcc-4.1-20060728/gcc/pretty-print.h.orig 2019-06-21 11:57:02 UTC
++++ gnu/gcc-4.1-20060728/gcc/pretty-print.h
+@@ -301,7 +301,7 @@ extern void pp_base_append_text (pretty_printer *, con
+
+ /* This header may be included before toplev.h, hence the duplicate
+ definitions to allow for GCC-specific formats. */
+-#if GCC_VERSION >= 3005
++#if GCC_VERSION >= 3005 && GCC_VERSION < 9001
+ #define ATTRIBUTE_GCC_PPDIAG(m, n) __attribute__ ((__format__ (__gcc_diag__, m ,n))) ATTRIBUTE_NONNULL(m)
+ #else
+ #define ATTRIBUTE_GCC_PPDIAG(m, n) ATTRIBUTE_NONNULL(m)
+--- gnu/gcc-4.1-20060728/gcc/toplev.h.orig 2019-06-21 11:58:27 UTC
++++ gnu/gcc-4.1-20060728/gcc/toplev.h
+@@ -49,7 +49,7 @@ extern void _fatal_insn (const char *, rtx, const char
+ /* None of these functions are suitable for ATTRIBUTE_PRINTF, because
+ each language front end can extend them with its own set of format
+ specifiers. We must use custom format checks. */
+-#if GCC_VERSION >= 4001
++#if GCC_VERSION >= 4001 && GCC_VERSION < 9001
+ #define ATTRIBUTE_GCC_DIAG(m, n) __attribute__ ((__format__ (GCC_DIAG_STYLE, m, n))) ATTRIBUTE_NONNULL(m)
+ #else
+ #define ATTRIBUTE_GCC_DIAG(m, n) ATTRIBUTE_NONNULL(m)
More information about the svn-ports-head
mailing list