commit:     417f0afc6bbda0eb075bd8025f9b41d0cba2ca14
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu May 30 21:45:41 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu May 30 21:45:41 2019 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=417f0afc

4.*.*: fix build failure against gcc-9

It's a workaround against https://gcc.gnu.org/PR90677
where 'cgraph_node' is effectively forbidden for function names.

Bug: https://gcc.gnu.org/PR90677
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 4.0.4/gentoo/88_all_cgraph_node-gcc-9.patch  | 44 ++++++++++++++++++++++++++++
 4.0.4/gentoo/README.history                  |  1 +
 4.1.2/gentoo/98_all_cgraph_node-gcc-9.patch  | 44 ++++++++++++++++++++++++++++
 4.1.2/gentoo/README.history                  |  1 +
 4.2.4/gentoo/96_all_cgraph_node-gcc-9.patch  | 44 ++++++++++++++++++++++++++++
 4.2.4/gentoo/README.history                  |  1 +
 4.3.6/gentoo/94_all_cgraph_node-gcc-9.patch  | 44 ++++++++++++++++++++++++++++
 4.3.6/gentoo/README.history                  |  1 +
 4.4.7/gentoo/99_all_cgraph_node-gcc-9.patch  | 44 ++++++++++++++++++++++++++++
 4.4.7/gentoo/README.history                  |  1 +
 4.5.4/gentoo/102_all_cgraph_node-gcc-9.patch | 22 ++++++++++++++
 4.5.4/gentoo/README.history                  |  1 +
 4.6.4/gentoo/97_all_cgraph_node-gcc-9.patch  | 22 ++++++++++++++
 4.6.4/gentoo/README.history                  |  1 +
 14 files changed, 271 insertions(+)

diff --git a/4.0.4/gentoo/88_all_cgraph_node-gcc-9.patch 
b/4.0.4/gentoo/88_all_cgraph_node-gcc-9.patch
new file mode 100644
index 0000000..fe95a0d
--- /dev/null
+++ b/4.0.4/gentoo/88_all_cgraph_node-gcc-9.patch
@@ -0,0 +1,44 @@
+The patch is a workaround to build this version of gcc with
+gcc-9.1.0: https://gcc.gnu.org/PR90677
+
+There gcc-9.1.0 pinned 'cgraph_node' to a wired-in type and
+disallows anything else (function names in this case) to share
+'cgraph_node' name.
+
+Without this patch build fails as:
+gcc-4.6.4/gcc/pretty-print.h:322:6: error: 'cgraph_node' is not defined as a 
type
+  322 |      ATTRIBUTE_GCC_PPDIAG(2,3);
+      |      ^~~~~~~~~~~~~
+--- a/gcc/c-tree.h
++++ b/gcc/c-tree.h
+@@ -609,7 +609,7 @@ extern void c_write_global_declarations (void);
+    diagnostic framework extensions, you must include this file before
+    toplev.h, not after.  */
+ #define GCC_DIAG_STYLE __gcc_cdiag__
+-#if GCC_VERSION >= 3005
++#if (GCC_VERSION >= 3005) && (GCC_VERSION != 9001) /* 9.1.0 is buggy: 
https://gcc.gnu.org/PR90677  */
+ #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)
+--- a/gcc/pretty-print.h
++++ b/gcc/pretty-print.h
+@@ -253,7 +253,7 @@ extern void pp_base_append_text (pretty_printer *, const 
char *, const char *);
+ 
+ /* 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) /* 9.1.0 is buggy: 
https://gcc.gnu.org/PR90677  */
+ #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)
+--- a/gcc/toplev.h
++++ b/gcc/toplev.h
+@@ -52,7 +52,7 @@ extern void _fatal_insn (const char *, rtx, const char *, 
int, const char *)
+    specifiers.  We must use custom format checks.  Note that at present
+    the front-end %D specifier is used in non-front-end code with some
+    functions, and those formats can only be checked in front-end code.  */
+-#if GCC_VERSION >= 3005
++#if (GCC_VERSION >= 3005) && (GCC_VERSION != 9001) /* 9.1.0 is buggy: 
https://gcc.gnu.org/PR90677  */
+ #define ATTRIBUTE_GCC_DIAG(m, n) __attribute__ ((__format__ (GCC_DIAG_STYLE, 
m, n))) ATTRIBUTE_NONNULL(m)
+ #ifdef NO_FRONT_END_DIAG
+ #define ATTRIBUTE_GCC_FE_DIAG(m, n) ATTRIBUTE_NONNULL(m)

diff --git a/4.0.4/gentoo/README.history b/4.0.4/gentoo/README.history
index 4d92217..0e98546 100644
--- a/4.0.4/gentoo/README.history
+++ b/4.0.4/gentoo/README.history
@@ -1,5 +1,6 @@
 1.5            TODO
        + 87_all_libjava-ucontext.patch
+       + 88_all_cgraph_node-gcc-9.patch
 
 1.4            23 Sep 2018
        + 86_all_ucontext-to-ucontext_t.patch

diff --git a/4.1.2/gentoo/98_all_cgraph_node-gcc-9.patch 
b/4.1.2/gentoo/98_all_cgraph_node-gcc-9.patch
new file mode 100644
index 0000000..92f27a8
--- /dev/null
+++ b/4.1.2/gentoo/98_all_cgraph_node-gcc-9.patch
@@ -0,0 +1,44 @@
+The patch is a workaround to build this version of gcc with
+gcc-9.1.0: https://gcc.gnu.org/PR90677
+
+There gcc-9.1.0 pinned 'cgraph_node' to a wired-in type and
+disallows anything else (function names in this case) to share
+'cgraph_node' name.
+
+Without this patch build fails as:
+gcc-4.6.4/gcc/pretty-print.h:322:6: error: 'cgraph_node' is not defined as a 
type
+  322 |      ATTRIBUTE_GCC_PPDIAG(2,3);
+      |      ^~~~~~~~~~~~~
+--- a/gcc/pretty-print.h
++++ b/gcc/pretty-print.h
+@@ -305,7 +305,7 @@ extern void pp_base_append_text (pretty_printer *, const 
char *, const char *);
+ 
+ /* This header may be included before diagnostics-core.h, hence the duplicate
+    definitions to allow for GCC-specific formats.  */
+-#if GCC_VERSION >= 3005
++#if (GCC_VERSION >= 3005) && (GCC_VERSION != 9001) /* 9.1.0 is buggy: 
https://gcc.gnu.org/PR90677  */
+ #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)
+--- a/gcc/c-tree.h
++++ b/gcc/c-tree.h
+@@ -638,7 +638,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) /* 9.1.0 is buggy: 
https://gcc.gnu.org/PR90677  */
+ #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)
+--- a/gcc/toplev.h
++++ b/gcc/toplev.h
+@@ -49,7 +49,7 @@ extern void _fatal_insn (const char *, const_rtx, const char 
*, int, 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) /* 9.1.0 is buggy: 
https://gcc.gnu.org/PR90677  */
+ #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)

diff --git a/4.1.2/gentoo/README.history b/4.1.2/gentoo/README.history
index e4b1de7..1a91ef2 100644
--- a/4.1.2/gentoo/README.history
+++ b/4.1.2/gentoo/README.history
@@ -1,5 +1,6 @@
 1.8            TODO
        + 97_all_libjava-ucontext.patch
+       + 98_all_cgraph_node-gcc-9.patch
 
 1.7            23 Sep 2018
        + 96_all_ucontext-to-ucontext_t.patch

diff --git a/4.2.4/gentoo/96_all_cgraph_node-gcc-9.patch 
b/4.2.4/gentoo/96_all_cgraph_node-gcc-9.patch
new file mode 100644
index 0000000..92f27a8
--- /dev/null
+++ b/4.2.4/gentoo/96_all_cgraph_node-gcc-9.patch
@@ -0,0 +1,44 @@
+The patch is a workaround to build this version of gcc with
+gcc-9.1.0: https://gcc.gnu.org/PR90677
+
+There gcc-9.1.0 pinned 'cgraph_node' to a wired-in type and
+disallows anything else (function names in this case) to share
+'cgraph_node' name.
+
+Without this patch build fails as:
+gcc-4.6.4/gcc/pretty-print.h:322:6: error: 'cgraph_node' is not defined as a 
type
+  322 |      ATTRIBUTE_GCC_PPDIAG(2,3);
+      |      ^~~~~~~~~~~~~
+--- a/gcc/pretty-print.h
++++ b/gcc/pretty-print.h
+@@ -305,7 +305,7 @@ extern void pp_base_append_text (pretty_printer *, const 
char *, const char *);
+ 
+ /* This header may be included before diagnostics-core.h, hence the duplicate
+    definitions to allow for GCC-specific formats.  */
+-#if GCC_VERSION >= 3005
++#if (GCC_VERSION >= 3005) && (GCC_VERSION != 9001) /* 9.1.0 is buggy: 
https://gcc.gnu.org/PR90677  */
+ #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)
+--- a/gcc/c-tree.h
++++ b/gcc/c-tree.h
+@@ -638,7 +638,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) /* 9.1.0 is buggy: 
https://gcc.gnu.org/PR90677  */
+ #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)
+--- a/gcc/toplev.h
++++ b/gcc/toplev.h
+@@ -49,7 +49,7 @@ extern void _fatal_insn (const char *, const_rtx, const char 
*, int, 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) /* 9.1.0 is buggy: 
https://gcc.gnu.org/PR90677  */
+ #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)

diff --git a/4.2.4/gentoo/README.history b/4.2.4/gentoo/README.history
index 5eef5ee..b36f3e0 100644
--- a/4.2.4/gentoo/README.history
+++ b/4.2.4/gentoo/README.history
@@ -1,6 +1,7 @@
 1.6            TODO
        + 94_all_gcc-libgomp-no-werror.patch
        + 95_all_libjava-ucontext.patch
+       + 96_all_cgraph_node-gcc-9.patch
 
 1.5            23 Sep 2018
        + 93_all_ucontext-to-ucontext_t.patch

diff --git a/4.3.6/gentoo/94_all_cgraph_node-gcc-9.patch 
b/4.3.6/gentoo/94_all_cgraph_node-gcc-9.patch
new file mode 100644
index 0000000..92f27a8
--- /dev/null
+++ b/4.3.6/gentoo/94_all_cgraph_node-gcc-9.patch
@@ -0,0 +1,44 @@
+The patch is a workaround to build this version of gcc with
+gcc-9.1.0: https://gcc.gnu.org/PR90677
+
+There gcc-9.1.0 pinned 'cgraph_node' to a wired-in type and
+disallows anything else (function names in this case) to share
+'cgraph_node' name.
+
+Without this patch build fails as:
+gcc-4.6.4/gcc/pretty-print.h:322:6: error: 'cgraph_node' is not defined as a 
type
+  322 |      ATTRIBUTE_GCC_PPDIAG(2,3);
+      |      ^~~~~~~~~~~~~
+--- a/gcc/pretty-print.h
++++ b/gcc/pretty-print.h
+@@ -305,7 +305,7 @@ extern void pp_base_append_text (pretty_printer *, const 
char *, const char *);
+ 
+ /* This header may be included before diagnostics-core.h, hence the duplicate
+    definitions to allow for GCC-specific formats.  */
+-#if GCC_VERSION >= 3005
++#if (GCC_VERSION >= 3005) && (GCC_VERSION != 9001) /* 9.1.0 is buggy: 
https://gcc.gnu.org/PR90677  */
+ #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)
+--- a/gcc/c-tree.h
++++ b/gcc/c-tree.h
+@@ -638,7 +638,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) /* 9.1.0 is buggy: 
https://gcc.gnu.org/PR90677  */
+ #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)
+--- a/gcc/toplev.h
++++ b/gcc/toplev.h
+@@ -49,7 +49,7 @@ extern void _fatal_insn (const char *, const_rtx, const char 
*, int, 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) /* 9.1.0 is buggy: 
https://gcc.gnu.org/PR90677  */
+ #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)

diff --git a/4.3.6/gentoo/README.history b/4.3.6/gentoo/README.history
index 4422206..d9fdb94 100644
--- a/4.3.6/gentoo/README.history
+++ b/4.3.6/gentoo/README.history
@@ -1,5 +1,6 @@
 1.4            TODO
        + 93_all_libjava-ucontext.patch
+       + 94_all_cgraph_node-gcc-9.patch
 
 1.3            23 Sep 2018
        + 92_all_ucontext-to-ucontext_t.patch

diff --git a/4.4.7/gentoo/99_all_cgraph_node-gcc-9.patch 
b/4.4.7/gentoo/99_all_cgraph_node-gcc-9.patch
new file mode 100644
index 0000000..92f27a8
--- /dev/null
+++ b/4.4.7/gentoo/99_all_cgraph_node-gcc-9.patch
@@ -0,0 +1,44 @@
+The patch is a workaround to build this version of gcc with
+gcc-9.1.0: https://gcc.gnu.org/PR90677
+
+There gcc-9.1.0 pinned 'cgraph_node' to a wired-in type and
+disallows anything else (function names in this case) to share
+'cgraph_node' name.
+
+Without this patch build fails as:
+gcc-4.6.4/gcc/pretty-print.h:322:6: error: 'cgraph_node' is not defined as a 
type
+  322 |      ATTRIBUTE_GCC_PPDIAG(2,3);
+      |      ^~~~~~~~~~~~~
+--- a/gcc/pretty-print.h
++++ b/gcc/pretty-print.h
+@@ -305,7 +305,7 @@ extern void pp_base_append_text (pretty_printer *, const 
char *, const char *);
+ 
+ /* This header may be included before diagnostics-core.h, hence the duplicate
+    definitions to allow for GCC-specific formats.  */
+-#if GCC_VERSION >= 3005
++#if (GCC_VERSION >= 3005) && (GCC_VERSION != 9001) /* 9.1.0 is buggy: 
https://gcc.gnu.org/PR90677  */
+ #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)
+--- a/gcc/c-tree.h
++++ b/gcc/c-tree.h
+@@ -638,7 +638,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) /* 9.1.0 is buggy: 
https://gcc.gnu.org/PR90677  */
+ #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)
+--- a/gcc/toplev.h
++++ b/gcc/toplev.h
+@@ -49,7 +49,7 @@ extern void _fatal_insn (const char *, const_rtx, const char 
*, int, 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) /* 9.1.0 is buggy: 
https://gcc.gnu.org/PR90677  */
+ #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)

diff --git a/4.4.7/gentoo/README.history b/4.4.7/gentoo/README.history
index fd69b51..4975a3b 100644
--- a/4.4.7/gentoo/README.history
+++ b/4.4.7/gentoo/README.history
@@ -1,5 +1,6 @@
 1.5            TODO
        + 98_all_libjava-ucontext.patch
+       + 99_all_cgraph_node-gcc-9.patch
 
 1.4            23 Sep 2018
        U 93_all_gcc-4.4-cloog-dl.patch

diff --git a/4.5.4/gentoo/102_all_cgraph_node-gcc-9.patch 
b/4.5.4/gentoo/102_all_cgraph_node-gcc-9.patch
new file mode 100644
index 0000000..77c9a1d
--- /dev/null
+++ b/4.5.4/gentoo/102_all_cgraph_node-gcc-9.patch
@@ -0,0 +1,22 @@
+The patch is a workaround to build this version of gcc with
+gcc-9.1.0: https://gcc.gnu.org/PR90677
+
+There gcc-9.1.0 pinned 'cgraph_node' to a wired-in type and
+disallows anything else (function names in this case) to share
+'cgraph_node' name.
+
+Without this patch build fails as:
+gcc-4.6.4/gcc/pretty-print.h:322:6: error: 'cgraph_node' is not defined as a 
type
+  322 |      ATTRIBUTE_GCC_PPDIAG(2,3);
+      |      ^~~~~~~~~~~~~
+--- a/gcc/pretty-print.h
++++ b/gcc/pretty-print.h
+@@ -305,7 +305,7 @@ extern void pp_base_append_text (pretty_printer *, const 
char *, const char *);
+ 
+ /* This header may be included before diagnostics-core.h, hence the duplicate
+    definitions to allow for GCC-specific formats.  */
+-#if GCC_VERSION >= 3005
++#if (GCC_VERSION >= 3005) && (GCC_VERSION != 9001) /* 9.1.0 is buggy: 
https://gcc.gnu.org/PR90677  */
+ #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)

diff --git a/4.5.4/gentoo/README.history b/4.5.4/gentoo/README.history
index 851fc67..5155ed5 100644
--- a/4.5.4/gentoo/README.history
+++ b/4.5.4/gentoo/README.history
@@ -1,5 +1,6 @@
 1.5            TODO
        + 101_all_libjava-ucontext.patch
+       + 102_all_cgraph_node-gcc-9.patch
 
 1.4            23 Sep 2018
        U 93_all_gcc-4.5-cloog-dl.patch

diff --git a/4.6.4/gentoo/97_all_cgraph_node-gcc-9.patch 
b/4.6.4/gentoo/97_all_cgraph_node-gcc-9.patch
new file mode 100644
index 0000000..77c9a1d
--- /dev/null
+++ b/4.6.4/gentoo/97_all_cgraph_node-gcc-9.patch
@@ -0,0 +1,22 @@
+The patch is a workaround to build this version of gcc with
+gcc-9.1.0: https://gcc.gnu.org/PR90677
+
+There gcc-9.1.0 pinned 'cgraph_node' to a wired-in type and
+disallows anything else (function names in this case) to share
+'cgraph_node' name.
+
+Without this patch build fails as:
+gcc-4.6.4/gcc/pretty-print.h:322:6: error: 'cgraph_node' is not defined as a 
type
+  322 |      ATTRIBUTE_GCC_PPDIAG(2,3);
+      |      ^~~~~~~~~~~~~
+--- a/gcc/pretty-print.h
++++ b/gcc/pretty-print.h
+@@ -305,7 +305,7 @@ extern void pp_base_append_text (pretty_printer *, const 
char *, const char *);
+ 
+ /* This header may be included before diagnostics-core.h, hence the duplicate
+    definitions to allow for GCC-specific formats.  */
+-#if GCC_VERSION >= 3005
++#if (GCC_VERSION >= 3005) && (GCC_VERSION != 9001) /* 9.1.0 is buggy: 
https://gcc.gnu.org/PR90677  */
+ #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)

diff --git a/4.6.4/gentoo/README.history b/4.6.4/gentoo/README.history
index af8339f..247ea24 100644
--- a/4.6.4/gentoo/README.history
+++ b/4.6.4/gentoo/README.history
@@ -1,6 +1,7 @@
 1.5            TODO
        + 95_all_libjava-ucontext.patch
        + 96_all_gcc-gperf-gnu-inline.patch
+       + 97_all_cgraph_node-gcc-9.patch
 
 1.4            23 Sep 2018
        - 10_all_default-fortify-source.patch

Reply via email to