commit:     7e0dc4bbbd8748f4b66006a715b2656298eaacd9
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Nov  7 19:14:24 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Nov  7 19:14:43 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e0dc4bb

app-emulation/coldfire: tweak for gcc-10

Reported-by: Toralf Förster
Closes: https://bugs.gentoo.org/706942
Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 app-emulation/coldfire/coldfire-0.3.1.ebuild       | 16 ++++++++++++---
 .../coldfire/files/coldfire-0.3.1-ld.patch         | 11 +++++++++++
 .../coldfire/files/coldfire-0.3.1-no-common.patch  | 23 ++++++++++++++++++++++
 3 files changed, 47 insertions(+), 3 deletions(-)

diff --git a/app-emulation/coldfire/coldfire-0.3.1.ebuild 
b/app-emulation/coldfire/coldfire-0.3.1.ebuild
index 21e97127297..653abff711e 100644
--- a/app-emulation/coldfire/coldfire-0.3.1.ebuild
+++ b/app-emulation/coldfire/coldfire-0.3.1.ebuild
@@ -1,8 +1,10 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
 
+inherit toolchain-funcs
+
 DESCRIPTION="Motorola Coldfire Emulator"
 HOMEPAGE="http://www.slicer.ca/coldfire/";
 SRC_URI="http://www.slicer.ca/coldfire/files/${P}.tar.gz";
@@ -16,10 +18,18 @@ DEPEND="sys-libs/ncurses:0=
        sys-libs/readline:0="
 
 PATCHES=(
-       "${FILESDIR}/${P}-build.patch"
-       "${FILESDIR}/${P}-headers.patch"
+       "${FILESDIR}"/${P}-build.patch
+       "${FILESDIR}"/${P}-headers.patch
+       "${FILESDIR}"/${P}-ld.patch
+       "${FILESDIR}"/${P}-no-common.patch
 )
 
+src_prepare() {
+       default
+
+       tc-export LD
+}
+
 src_install() {
        dobin coldfire
        dodoc CONTRIBUTORS HACKING README

diff --git a/app-emulation/coldfire/files/coldfire-0.3.1-ld.patch 
b/app-emulation/coldfire/files/coldfire-0.3.1-ld.patch
new file mode 100644
index 00000000000..b0b16fec860
--- /dev/null
+++ b/app-emulation/coldfire/files/coldfire-0.3.1-ld.patch
@@ -0,0 +1,11 @@
+--- a/Makefile.rules.in
++++ b/Makefile.rules.in
+@@ -1,7 +1,7 @@
+ CC    = @CC@
+ CFLAGS        = -Wall @CPPFLAGS@ @CFLAGS@ -I$(TOPSRCDIR)
+ LIBS  = @LIBS@
+-LD_R  = ld -r
++LD_R  = $(LD) -r
+ RM    = rm -f
+ LDFLAGS = @LDFLAGS@
+ 

diff --git a/app-emulation/coldfire/files/coldfire-0.3.1-no-common.patch 
b/app-emulation/coldfire/files/coldfire-0.3.1-no-common.patch
new file mode 100644
index 00000000000..f4cc61f7bb4
--- /dev/null
+++ b/app-emulation/coldfire/files/coldfire-0.3.1-no-common.patch
@@ -0,0 +1,23 @@
+https://bugs.gentoo.org/706942
+--- a/peripherals/sim_5206.c
++++ b/peripherals/sim_5206.c
+@@ -23,7 +23,7 @@ static struct _sim_register 
*sim_register_lookup_by_offset(s32 offset);
+ static struct _sim_register *sim_register_lookup_by_name(char *name);
+ static void sim_interrupt_assert(s16 number, s16 vector);
+ static void sim_interrupt_withdraw(s16 number);
+-struct _sim sim_data;
++static struct _sim sim_data;
+ 
+ /* name, offset, width, read, write, resetvalue, description */
+ static struct _sim_register sim_reg[] = {
+--- a/peripherals/sim_5307.c
++++ b/peripherals/sim_5307.c
+@@ -59,7 +59,7 @@ static struct _sim_register 
*sim_register_lookup_by_offset(s32 offset);
+ static struct _sim_register *sim_register_lookup_by_name(char *name);
+ static void sim_interrupt_assert(s16 number, s16 vector);
+ static void sim_interrupt_withdraw(s16 number);
+-struct _sim sim_data;
++static struct _sim sim_data;
+ 
+ /* name, offset, width, read, write, resetvalue, description */
+ static struct _sim_register sim_reg[] = {

Reply via email to