aboutsummaryrefslogtreecommitdiff
path: root/4.6.4
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2019-05-30 22:45:41 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2019-05-30 22:45:41 +0100
commit417f0afc6bbda0eb075bd8025f9b41d0cba2ca14 (patch)
treecaa4393f767c14749ed1705ad534244daacadd95 /4.6.4
parent4.6.4: backport gperf-gnu-inline patch (diff)
downloadgcc-patches-417f0afc6bbda0eb075bd8025f9b41d0cba2ca14.tar.gz
gcc-patches-417f0afc6bbda0eb075bd8025f9b41d0cba2ca14.tar.bz2
gcc-patches-417f0afc6bbda0eb075bd8025f9b41d0cba2ca14.zip
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@gentoo.org>
Diffstat (limited to '4.6.4')
-rw-r--r--4.6.4/gentoo/97_all_cgraph_node-gcc-9.patch22
-rw-r--r--4.6.4/gentoo/README.history1
2 files changed, 23 insertions, 0 deletions
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