summaryrefslogtreecommitdiffstats
path: root/games/neverball/gcc10.patch
diff options
context:
space:
mode:
author Matteo Bernardini2020-10-31 16:32:36 +0100
committer Matteo Bernardini2020-10-31 16:32:36 +0100
commitede8ce81ea264ba9fc0271cbb6b25961290b80ee (patch)
tree13da336105ec799f2da3f9e848c71730c7807490 /games/neverball/gcc10.patch
parent95a609fb8edebc8dab3ec446190c9a39d4ac6656 (diff)
downloadslackbuilds-current-20201031.1.tar.gz
20201031.1 global branch merge.current-20201031.1
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'games/neverball/gcc10.patch')
-rw-r--r--games/neverball/gcc10.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/games/neverball/gcc10.patch b/games/neverball/gcc10.patch
new file mode 100644
index 0000000000..83e0a3a356
--- /dev/null
+++ b/games/neverball/gcc10.patch
@@ -0,0 +1,41 @@
+From a42492b8db06934c7a794630db92e3ff6ebaadaa Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Mon, 3 Feb 2020 20:25:57 +0000
+Subject: [PATCH] share/text.h: fix build failure against gcc-10
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+On gcc-10 (and gcc-9 -fno-common) build fails as:
+
+```
+cc .. -o neverball ...
+ld: ball/st_save.o:(.bss+0x0):
+ multiple definition of `text_input'; share/text.o:(.bss+0x0): first defined here
+```
+
+gcc-10 will change the default from -fcommon to fno-common:
+https://gcc.gnu.org/PR85678.
+
+The error also happens if CFLAGS=-fno-common passed explicitly.
+
+Reported-by: Toralf Förster
+Bug: https://bugs.gentoo.org/708050
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ share/text.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/share/text.h b/share/text.h
+index baee7921a..8a2d6f591 100644
+--- a/share/text.h
++++ b/share/text.h
+@@ -15,7 +15,7 @@ int text_length(const char *);
+
+ /*---------------------------------------------------------------------------*/
+
+-char text_input[MAXSTR];
++extern char text_input[MAXSTR];
+
+ void text_input_start(void (*cb)(int typing));
+ void text_input_stop(void);