commit:     a976eefad7cd78cf43c28d3d73884473327eea73
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 12 23:13:57 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Mar 12 23:13:57 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a976eefa

dev-lang/mmix: tweak for gcc-10

Package-Manager: Portage-2.3.93, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-lang/mmix/files/mmix-20160804-gcc-10.patch | 24 ++++++++++++++++++++++++
 dev-lang/mmix/mmix-20160804-r1.ebuild          |  3 ++-
 2 files changed, 26 insertions(+), 1 deletion(-)

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 00000000000..076d22952a5
--- /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 65491269b4a..15e84fef8c3 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() {

Reply via email to