summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-03-12 23:13:57 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2020-03-12 23:13:57 +0000
commita976eefad7cd78cf43c28d3d73884473327eea73 (patch)
tree218965295b462332d91165215725f6564fbb1cda /dev-lang/mmix
parentdev-python/sphinx_rtd_theme: mark 0.4.3-r1 ~sparc, bug #711622 (diff)
downloadgentoo-a976eefad7cd78cf43c28d3d73884473327eea73.tar.gz
gentoo-a976eefad7cd78cf43c28d3d73884473327eea73.tar.bz2
gentoo-a976eefad7cd78cf43c28d3d73884473327eea73.zip
dev-lang/mmix: tweak for gcc-10
Package-Manager: Portage-2.3.93, Repoman-2.3.20 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'dev-lang/mmix')
-rw-r--r--dev-lang/mmix/files/mmix-20160804-gcc-10.patch24
-rw-r--r--dev-lang/mmix/mmix-20160804-r1.ebuild3
2 files changed, 26 insertions, 1 deletions
diff --git a/dev-lang/mmix/files/mmix-20160804-gcc-10.patch b/dev-lang/mmix/files/mmix-20160804-gcc-10.patch
new file mode 100644
index 000000000000..076d22952a51
--- /dev/null
+++ b/dev-lang/mmix/files/mmix-20160804-gcc-10.patch
@@ -0,0 +1,24 @@
+gcc-10 defaults to -fno-common. Causes linker errors for
+duplicate 'buffer' definition.
+--- a/mmix-config.w
++++ b/mmix-config.w
+@@ -357,7 +357,7 @@ print error messages.
+
+ @<Global variables@>=
+ FILE *config_file; /* input comes from here */
+-char buffer[BUF_SIZE]; /* input lines go here */
++static char buffer[BUF_SIZE]; /* input lines go here */
+ char token[BUF_SIZE]; /* and tokens are copied to here */
+ char *buf_pointer=buffer; /* this is our current position */
+ bool token_prescanned; /* does |token| contain the next token already? */
+--- a/mmmix.w
++++ b/mmmix.w
+@@ -115,7 +115,7 @@ and \Hex{fedcba9876543210} into location \Hex{0123456789b0}.
+ octa cur_loc;
+ octa cur_dat;
+ bool new_chunk;
+-char buffer[BUF_SIZE];
++static char buffer[BUF_SIZE];
+ FILE *prog_file;
+
+ @ @<Input a rudimentary hexadecimal file@>=
diff --git a/dev-lang/mmix/mmix-20160804-r1.ebuild b/dev-lang/mmix/mmix-20160804-r1.ebuild
index 65491269b4a1..15e84fef8c3a 100644
--- a/dev-lang/mmix/mmix-20160804-r1.ebuild
+++ b/dev-lang/mmix/mmix-20160804-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -24,6 +24,7 @@ S="${WORKDIR}"
PATCHES=(
"${FILESDIR}"/${PN}-20110420-makefile.patch
"${FILESDIR}"/${PN}-20131017-format-security.patch
+ "${FILESDIR}"/${PN}-20160804-gcc-10.patch
)
src_compile() {