summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games-emulation/advancemame/advancemame-3.9.ebuild1
-rw-r--r--games-emulation/advancemame/files/advancemame-3.9-fno-common.patch33
2 files changed, 34 insertions, 0 deletions
diff --git a/games-emulation/advancemame/advancemame-3.9.ebuild b/games-emulation/advancemame/advancemame-3.9.ebuild
index 61a5a35b78d6..2759ceac28f3 100644
--- a/games-emulation/advancemame/advancemame-3.9.ebuild
+++ b/games-emulation/advancemame/advancemame-3.9.ebuild
@@ -43,6 +43,7 @@ PATCHES=(
"${FILESDIR}"/${P}-blank-flags.patch
"${FILESDIR}"/${P}-DESTDIR.patch
"${FILESDIR}"/${P}-FHS.patch
+ "${FILESDIR}"/${P}-fno-common.patch
)
src_prepare() {
diff --git a/games-emulation/advancemame/files/advancemame-3.9-fno-common.patch b/games-emulation/advancemame/files/advancemame-3.9-fno-common.patch
new file mode 100644
index 000000000000..c378b9aa919e
--- /dev/null
+++ b/games-emulation/advancemame/files/advancemame-3.9-fno-common.patch
@@ -0,0 +1,33 @@
+From f8688cae05799a30cd5337e626a07fa9f004c0a3 Mon Sep 17 00:00:00 2001
+From: Andrea Mazzoleni <amadvance@gmail.com>
+Date: Fri, 23 Oct 2020 21:29:41 +0200
+Subject: [PATCH] Fix build errors due new gcc 10 default for -fno-common
+
+---
+ src/drivers/cavepgm.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/drivers/cavepgm.c b/src/drivers/cavepgm.c
+index 38d3dae8..df6e97ab 100644
+--- a/src/drivers/cavepgm.c
++++ b/src/drivers/cavepgm.c
+@@ -287,7 +287,7 @@ IGS PCB NO-0136 (Riser)
+ #include "timer.h"
+
+
+-UINT16 *pgm_mainram, *pgm_bg_videoram, *pgm_tx_videoram, *pgm_videoregs, *pgm_rowscrollram;
++extern UINT16 *pgm_mainram, *pgm_bg_videoram, *pgm_tx_videoram, *pgm_videoregs, *pgm_rowscrollram;
+ static UINT8 *z80_mainram;
+ static UINT32 *arm7_shareram;
+ static UINT32 arm7_latch;
+@@ -852,8 +852,8 @@ static void expand_32x32x5bpp(void)
+ /* This function expands the sprite colour data (in the A Roms) from 3 pixels
+ in each word to a byte per pixel making it easier to use */
+
+-UINT8 *pgm_sprite_a_region;
+-size_t pgm_sprite_a_region_allocate;
++extern UINT8 *pgm_sprite_a_region;
++extern size_t pgm_sprite_a_region_allocate;
+
+ static void expand_colourdata(void)
+ {