dev-lang/mmix: tweak for gcc-10
authorSergei Trofimovich <slyfox@gentoo.org>
Thu, 12 Mar 2020 23:13:57 +0000 (23:13 +0000)
committerSergei Trofimovich <slyfox@gentoo.org>
Thu, 12 Mar 2020 23:13:57 +0000 (23:13 +0000)
Package-Manager: Portage-2.3.93, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
dev-lang/mmix/files/mmix-20160804-gcc-10.patch [new file with mode: 0644]
dev-lang/mmix/mmix-20160804-r1.ebuild

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 (file)
index 0000000..076d229
--- /dev/null
@@ -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@>=
index 65491269b4a12c3e16a32358627e32aa0d96cfca..15e84fef8c3ab9997f207b45288d1c83b57e69a6 100644 (file)
@@ -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() {