From e9e06409cc164de698c190e6397dd19b43a2afe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Tempel?= Date: Sat, 24 Jul 2021 06:06:48 +0200 Subject: [PATCH] testing/simh: fix build with gcc 10 --- testing/simh/APKBUILD | 8 ++++++-- testing/simh/gcc-10.patch | 24 ++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 testing/simh/gcc-10.patch diff --git a/testing/simh/APKBUILD b/testing/simh/APKBUILD index a508f4d7b47..c3b92b2cfce 100644 --- a/testing/simh/APKBUILD +++ b/testing/simh/APKBUILD @@ -10,7 +10,8 @@ arch="all !riscv64" # fails to build license="BSD-3-Clause" options="!check" makedepends="libpcap-dev" -source="simh-$pkgver.tar.gz::https://github.com/simh/simh/archive/v$_pkgver.tar.gz" +source="simh-$pkgver.tar.gz::https://github.com/simh/simh/archive/v$_pkgver.tar.gz + gcc-10.patch" builddir="$srcdir"/simh-$_pkgver export CFLAGS="$CFLAGS -fcommon" @@ -32,4 +33,7 @@ package() { cp *.bin "$pkgdir"/usr/lib/simh } -sha512sums="7c2f81a64d3016b9a44409fc336c804c0da836317745d47594cc48c64cb57dc8f22084d9086e3f86868ec485ee56ac63301f350cee6d275e705b7c5fc82875db simh-3.11.1.tar.gz" +sha512sums=" +7c2f81a64d3016b9a44409fc336c804c0da836317745d47594cc48c64cb57dc8f22084d9086e3f86868ec485ee56ac63301f350cee6d275e705b7c5fc82875db simh-3.11.1.tar.gz +9b6ac5106528e9cd403cfc0a9b0d22192bed5ed1172bb34447274c69b3c2408e47f08125fc845b82091f55e21adf67c72db531d9032f413aaad06b3f55655ca4 gcc-10.patch +" diff --git a/testing/simh/gcc-10.patch b/testing/simh/gcc-10.patch new file mode 100644 index 00000000000..f3147fbea80 --- /dev/null +++ b/testing/simh/gcc-10.patch @@ -0,0 +1,24 @@ +diff -upr simh-3.11-1.orig/PDP11/pdp11_defs.h simh-3.11-1/PDP11/pdp11_defs.h +--- simh-3.11-1.orig/PDP11/pdp11_defs.h 2021-07-24 09:40:30.894068560 +0200 ++++ simh-3.11-1/PDP11/pdp11_defs.h 2021-07-24 09:41:15.954102912 +0200 +@@ -900,13 +900,13 @@ void cpu_set_boot (int32 pc); + #define WrMemW(pa,d) uc15_WrMemW (pa, d) + #define WrMemB(pa, d) uc15_WrMemB (pa, d) + +-uint32 uc15_memsize; +-int32 uc15_RdMemW (int32 pa); +-int32 uc15_RdMemB (int32 pa); +-void uc15_WrMemW (int32 pa, int32 d); +-void uc15_WrMemB (int32 pa, int32 d); +-int32 Map_Read18 (uint32 ba, int32 bc, uint32 *buf); +-int32 Map_Write18 (uint32 ba, int32 bc, uint32 *buf); ++extern uint32 uc15_memsize; ++extern int32 uc15_RdMemW (int32 pa); ++extern int32 uc15_RdMemB (int32 pa); ++extern void uc15_WrMemW (int32 pa, int32 d); ++extern void uc15_WrMemB (int32 pa, int32 d); ++extern int32 Map_Read18 (uint32 ba, int32 bc, uint32 *buf); ++extern int32 Map_Write18 (uint32 ba, int32 bc, uint32 *buf); + + #else /* PDP-11 */ +