summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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() {