summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2017-08-25 12:39:56 +0000
committerjperkin <jperkin@pkgsrc.org>2017-08-25 12:39:56 +0000
commit1aab5e75aaa6040ecc87e9ecd07c7e1ea18a6fa7 (patch)
tree2dd1524cc22426dd192ef68a5629dc13f4f10c88 /emulators
parentedbf3390afb7acacca20f8deb354a366b7e8bf1d (diff)
downloadpkgsrc-1aab5e75aaa6040ecc87e9ecd07c7e1ea18a6fa7.tar.gz
Various patches to fix the build on SunOS.
Diffstat (limited to 'emulators')
-rw-r--r--emulators/qemu/Makefile4
-rw-r--r--emulators/qemu/distinfo11
-rw-r--r--emulators/qemu/patches/patch-contrib_ivshmem-client_ivshmem-client.c37
-rw-r--r--emulators/qemu/patches/patch-contrib_ivshmem-server_ivshmem-server.c36
-rw-r--r--emulators/qemu/patches/patch-hw_net_e1000.c24
-rw-r--r--emulators/qemu/patches/patch-hw_net_e1000__regs.h15
-rw-r--r--emulators/qemu/patches/patch-hw_net_e1000e__core.c15
-rw-r--r--emulators/qemu/patches/patch-hw_net_e1000x__common.h15
-rw-r--r--emulators/qemu/patches/patch-hw_usb_dev-mtp.c17
-rw-r--r--emulators/qemu/patches/patch-memory.c87
10 files changed, 254 insertions, 7 deletions
diff --git a/emulators/qemu/Makefile b/emulators/qemu/Makefile
index 80797f2bf02..32c7f85c935 100644
--- a/emulators/qemu/Makefile
+++ b/emulators/qemu/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.170 2017/08/24 20:03:13 adam Exp $
+# $NetBSD: Makefile,v 1.171 2017/08/25 12:39:56 jperkin Exp $
DISTNAME= qemu-2.9.0
PKGREVISION= 2
@@ -18,7 +18,7 @@ NOT_FOR_PLATFORM+= NetBSD-5*-*
USE_CURSES= resize_term wide
USE_LANGUAGES+= c c++
-USE_TOOLS+= bison gmake makeinfo perl:build pkg-config
+USE_TOOLS+= bison flex gmake makeinfo perl:build pkg-config
FAKE_NCURSES= yes
UNLIMIT_RESOURCES= datasize
HAS_CONFIGURE= yes
diff --git a/emulators/qemu/distinfo b/emulators/qemu/distinfo
index d92b1682246..8ac41085955 100644
--- a/emulators/qemu/distinfo
+++ b/emulators/qemu/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.125 2017/04/22 20:18:09 adam Exp $
+$NetBSD: distinfo,v 1.126 2017/08/25 12:39:56 jperkin Exp $
SHA1 (qemu-2.9.0.tar.xz) = 5cc63c6cababaaa7d0685e8b32bacf5022873ebc
RMD160 (qemu-2.9.0.tar.xz) = 700e714204258cbb1cb9831e47e3d8cde4b67d20
@@ -6,6 +6,8 @@ SHA512 (qemu-2.9.0.tar.xz) = a5259b888ac336db559f4483a9c50ad434fb82aedce37d9be95
Size (qemu-2.9.0.tar.xz) = 22830688 bytes
SHA1 (patch-Makefile.objs) = 8a538c5a55bfb7c3556b77a0eac2f055b0cf8692
SHA1 (patch-configure) = 4d6e0737cfbd9efcd02ab43c219fed0f0a1a55a9
+SHA1 (patch-contrib_ivshmem-client_ivshmem-client.c) = 40c8751607cbf66a37e4c4e08f2664b864e2e984
+SHA1 (patch-contrib_ivshmem-server_ivshmem-server.c) = d8f53432b5752f4263dc4ef96108a976a05147a3
SHA1 (patch-default-configs_pci.mak) = 2162550a68de514c8fe9e255df88f8a0a07ee6c7
SHA1 (patch-disas_libvixl_vixl_a64_disasm-a64.cc) = 0660a0c2d37c332fcd1e00edb2dc3c52fe179cc9
SHA1 (patch-disas_libvixl_vixl_utils.h) = 85285473b6021f9a0d190832d03c60c4d9df6bb7
@@ -13,11 +15,16 @@ SHA1 (patch-ef) = 98a1de2fd48638886b5d16f6a61dc72910e98b41
SHA1 (patch-et) = e9b850ac5985cbe934b541acbfdb330cce421d50
SHA1 (patch-hw_display_omap__dss.c) = 6b13242f28e32346bc70548c216c578d98fd3420
SHA1 (patch-hw_misc_ivshmem.c) = c1fdc8111286f2c760512189db4a854bfc6129d0
+SHA1 (patch-hw_net_e1000.c) = 761e9afb5c74a03ee6cf0b918dd27122777a27b7
+SHA1 (patch-hw_net_e1000__regs.h) = b93974c75bec94cbba048c0b61917177c5cc08c1
+SHA1 (patch-hw_net_e1000e__core.c) = 55917bcb9ca0f80476159e51f4240e8c1df68132
+SHA1 (patch-hw_net_e1000x__common.h) = 093501bafdaa3a4b4ae705c45ea656a602907d18
SHA1 (patch-hw_net_etraxfs__eth.c) = e5dd1661d60dbcd27b332403e0843500ba9544bc
SHA1 (patch-hw_net_xilinx__axienet.c) = ebcd2676d64ce6f31e4a8c976d4fdf530ad5e8b7
SHA1 (patch-hw_ppc_mac__newworld.c) = 5131bb6edf8b0acf6e7ed3b6bc7be962dc71eca6
SHA1 (patch-hw_ppc_mac__oldworld.c) = b71667ab281dc23c9d971dc8754eeefc879bd1d7
-SHA1 (patch-memory.c) = 9f94de7799ef80931fb1de572e5603894f3fb328
+SHA1 (patch-hw_usb_dev-mtp.c) = f5a446079d51b19eae6c2f5e0c9810c181e4f02d
+SHA1 (patch-memory.c) = f8a97fa2ee2afcd361deaa1f0023b83d059e100b
SHA1 (patch-scripts_qemu-binfmt-conf.sh) = a59c227e5891efe201eb2b8af15fb0832a1b20d0
SHA1 (patch-slirp_tcp__subr.c) = f011c9dc58282e61b26017547a9884f30a6e6154
SHA1 (patch-tests_Makefile.include) = 42345d697cb2e324dccf1d68bd8d61e8001c6162
diff --git a/emulators/qemu/patches/patch-contrib_ivshmem-client_ivshmem-client.c b/emulators/qemu/patches/patch-contrib_ivshmem-client_ivshmem-client.c
new file mode 100644
index 00000000000..8ed854c325c
--- /dev/null
+++ b/emulators/qemu/patches/patch-contrib_ivshmem-client_ivshmem-client.c
@@ -0,0 +1,37 @@
+$NetBSD: patch-contrib_ivshmem-client_ivshmem-client.c,v 1.1 2017/08/25 12:39:56 jperkin Exp $
+
+Avoid sun definition.
+
+--- contrib/ivshmem-client/ivshmem-client.c.orig 2017-04-20 14:57:00.000000000 +0000
++++ contrib/ivshmem-client/ivshmem-client.c
+@@ -179,7 +179,7 @@ ivshmem_client_init(IvshmemClient *clien
+ int
+ ivshmem_client_connect(IvshmemClient *client)
+ {
+- struct sockaddr_un sun;
++ struct sockaddr_un sockun;
+ int fd, ret;
+ int64_t tmp;
+
+@@ -193,16 +193,16 @@ ivshmem_client_connect(IvshmemClient *cl
+ return -1;
+ }
+
+- sun.sun_family = AF_UNIX;
+- ret = snprintf(sun.sun_path, sizeof(sun.sun_path), "%s",
++ sockun.sun_family = AF_UNIX;
++ ret = snprintf(sockun.sun_path, sizeof(sockun.sun_path), "%s",
+ client->unix_sock_path);
+- if (ret < 0 || ret >= sizeof(sun.sun_path)) {
++ if (ret < 0 || ret >= sizeof(sockun.sun_path)) {
+ IVSHMEM_CLIENT_DEBUG(client, "could not copy unix socket path\n");
+ goto err_close;
+ }
+
+- if (connect(client->sock_fd, (struct sockaddr *)&sun, sizeof(sun)) < 0) {
+- IVSHMEM_CLIENT_DEBUG(client, "cannot connect to %s: %s\n", sun.sun_path,
++ if (connect(client->sock_fd, (struct sockaddr *)&sockun, sizeof(sockun)) < 0) {
++ IVSHMEM_CLIENT_DEBUG(client, "cannot connect to %s: %s\n", sockun.sun_path,
+ strerror(errno));
+ goto err_close;
+ }
diff --git a/emulators/qemu/patches/patch-contrib_ivshmem-server_ivshmem-server.c b/emulators/qemu/patches/patch-contrib_ivshmem-server_ivshmem-server.c
new file mode 100644
index 00000000000..d773418cfe1
--- /dev/null
+++ b/emulators/qemu/patches/patch-contrib_ivshmem-server_ivshmem-server.c
@@ -0,0 +1,36 @@
+$NetBSD: patch-contrib_ivshmem-server_ivshmem-server.c,v 1.1 2017/08/25 12:39:56 jperkin Exp $
+
+Avoid sun definition.
+
+--- contrib/ivshmem-server/ivshmem-server.c.orig 2017-04-20 14:57:00.000000000 +0000
++++ contrib/ivshmem-server/ivshmem-server.c
+@@ -289,7 +289,7 @@ ivshmem_server_init(IvshmemServer *serve
+ int
+ ivshmem_server_start(IvshmemServer *server)
+ {
+- struct sockaddr_un sun;
++ struct sockaddr_un sockun;
+ int shm_fd, sock_fd, ret;
+
+ /* open shm file */
+@@ -328,15 +328,15 @@ ivshmem_server_start(IvshmemServer *serv
+ goto err_close_shm;
+ }
+
+- sun.sun_family = AF_UNIX;
+- ret = snprintf(sun.sun_path, sizeof(sun.sun_path), "%s",
++ sockun.sun_family = AF_UNIX;
++ ret = snprintf(sockun.sun_path, sizeof(sockun.sun_path), "%s",
+ server->unix_sock_path);
+- if (ret < 0 || ret >= sizeof(sun.sun_path)) {
++ if (ret < 0 || ret >= sizeof(sockun.sun_path)) {
+ IVSHMEM_SERVER_DEBUG(server, "could not copy unix socket path\n");
+ goto err_close_sock;
+ }
+- if (bind(sock_fd, (struct sockaddr *)&sun, sizeof(sun)) < 0) {
+- IVSHMEM_SERVER_DEBUG(server, "cannot connect to %s: %s\n", sun.sun_path,
++ if (bind(sock_fd, (struct sockaddr *)&sockun, sizeof(sockun)) < 0) {
++ IVSHMEM_SERVER_DEBUG(server, "cannot connect to %s: %s\n", sockun.sun_path,
+ strerror(errno));
+ goto err_close_sock;
+ }
diff --git a/emulators/qemu/patches/patch-hw_net_e1000.c b/emulators/qemu/patches/patch-hw_net_e1000.c
new file mode 100644
index 00000000000..a7f8690d7ef
--- /dev/null
+++ b/emulators/qemu/patches/patch-hw_net_e1000.c
@@ -0,0 +1,24 @@
+$NetBSD: patch-hw_net_e1000.c,v 1.1 2017/08/25 12:39:56 jperkin Exp $
+
+Avoid SEC definition.
+
+--- hw/net/e1000.c.orig 2017-04-20 14:57:00.000000000 +0000
++++ hw/net/e1000.c
+@@ -1127,7 +1127,7 @@ static uint32_t (*macreg_readops[])(E100
+ getreg(TADV), getreg(ITR), getreg(FCRUC), getreg(IPAV),
+ getreg(WUC), getreg(WUS), getreg(SCC), getreg(ECOL),
+ getreg(MCC), getreg(LATECOL), getreg(COLC), getreg(DC),
+- getreg(TNCRS), getreg(SEC), getreg(CEXTERR), getreg(RLEC),
++ getreg(TNCRS), getreg(SEQEC), getreg(CEXTERR), getreg(RLEC),
+ getreg(XONRXC), getreg(XONTXC), getreg(XOFFRXC), getreg(XOFFTXC),
+ getreg(RFC), getreg(RJC), getreg(RNBC), getreg(TSCTFC),
+ getreg(MGTPRC), getreg(MGTPDC), getreg(MGTPTC), getreg(GORCL),
+@@ -1223,7 +1223,7 @@ static const uint8_t mac_reg_access[0x80
+ [FFLT] = markflag(MAC), [FFMT] = markflag(MAC),
+ [SCC] = markflag(MAC), [FCRUC] = markflag(MAC),
+ [LATECOL] = markflag(MAC), [COLC] = markflag(MAC),
+- [SEC] = markflag(MAC), [CEXTERR] = markflag(MAC),
++ [SEQEC] = markflag(MAC), [CEXTERR] = markflag(MAC),
+ [XONTXC] = markflag(MAC), [XOFFRXC] = markflag(MAC),
+ [RJC] = markflag(MAC), [RNBC] = markflag(MAC),
+ [MGTPDC] = markflag(MAC), [MGTPTC] = markflag(MAC),
diff --git a/emulators/qemu/patches/patch-hw_net_e1000__regs.h b/emulators/qemu/patches/patch-hw_net_e1000__regs.h
new file mode 100644
index 00000000000..fb5925aec76
--- /dev/null
+++ b/emulators/qemu/patches/patch-hw_net_e1000__regs.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-hw_net_e1000__regs.h,v 1.1 2017/08/25 12:39:56 jperkin Exp $
+
+Avoid SEC definition.
+
+--- hw/net/e1000_regs.h.orig 2017-04-20 14:57:00.000000000 +0000
++++ hw/net/e1000_regs.h
+@@ -260,7 +260,7 @@
+ #define E1000_COLC 0x04028 /* Collision Count - R/clr */
+ #define E1000_DC 0x04030 /* Defer Count - R/clr */
+ #define E1000_TNCRS 0x04034 /* TX-No CRS - R/clr */
+-#define E1000_SEC 0x04038 /* Sequence Error Count - R/clr */
++#define E1000_SEQEC 0x04038 /* Sequence Error Count - R/clr */
+ #define E1000_CEXTERR 0x0403C /* Carrier Extension Error Count - R/clr */
+ #define E1000_RLEC 0x04040 /* Receive Length Error Count - R/clr */
+ #define E1000_XONRXC 0x04048 /* XON RX Count - R/clr */
diff --git a/emulators/qemu/patches/patch-hw_net_e1000e__core.c b/emulators/qemu/patches/patch-hw_net_e1000e__core.c
new file mode 100644
index 00000000000..b7559ba55a7
--- /dev/null
+++ b/emulators/qemu/patches/patch-hw_net_e1000e__core.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-hw_net_e1000e__core.c,v 1.1 2017/08/25 12:39:56 jperkin Exp $
+
+Avoid SEC definition.
+
+--- hw/net/e1000e_core.c.orig 2017-04-20 14:57:00.000000000 +0000
++++ hw/net/e1000e_core.c
+@@ -2849,7 +2849,7 @@ static uint32_t (*e1000e_macreg_readops[
+ e1000e_getreg(RDLEN0),
+ e1000e_getreg(RDH1),
+ e1000e_getreg(LATECOL),
+- e1000e_getreg(SEC),
++ e1000e_getreg(SEQEC),
+ e1000e_getreg(XONTXC),
+ e1000e_getreg(WUS),
+ e1000e_getreg(GORCL),
diff --git a/emulators/qemu/patches/patch-hw_net_e1000x__common.h b/emulators/qemu/patches/patch-hw_net_e1000x__common.h
new file mode 100644
index 00000000000..0388ab9d39d
--- /dev/null
+++ b/emulators/qemu/patches/patch-hw_net_e1000x__common.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-hw_net_e1000x__common.h,v 1.1 2017/08/25 12:39:56 jperkin Exp $
+
+Avoid SEC definition.
+
+--- hw/net/e1000x_common.h.orig 2017-04-20 14:57:00.000000000 +0000
++++ hw/net/e1000x_common.h
+@@ -40,7 +40,7 @@ enum {
+ defreg(VFTA), defreg(VET), defreg(RDTR), defreg(RADV),
+ defreg(TADV), defreg(ITR), defreg(SCC), defreg(ECOL),
+ defreg(MCC), defreg(LATECOL), defreg(COLC), defreg(DC),
+- defreg(TNCRS), defreg(SEC), defreg(CEXTERR), defreg(RLEC),
++ defreg(TNCRS), defreg(SEQEC), defreg(CEXTERR), defreg(RLEC),
+ defreg(XONRXC), defreg(XONTXC), defreg(XOFFRXC), defreg(XOFFTXC),
+ defreg(FCRUC), defreg(AIT), defreg(TDFH), defreg(TDFT),
+ defreg(TDFHS), defreg(TDFTS), defreg(TDFPC), defreg(WUC),
diff --git a/emulators/qemu/patches/patch-hw_usb_dev-mtp.c b/emulators/qemu/patches/patch-hw_usb_dev-mtp.c
new file mode 100644
index 00000000000..c6f266b6d78
--- /dev/null
+++ b/emulators/qemu/patches/patch-hw_usb_dev-mtp.c
@@ -0,0 +1,17 @@
+$NetBSD: patch-hw_usb_dev-mtp.c,v 1.1 2017/08/25 12:39:56 jperkin Exp $
+
+Support NAME_MAX.
+
+--- hw/usb/dev-mtp.c.orig 2017-04-20 14:57:00.000000000 +0000
++++ hw/usb/dev-mtp.c
+@@ -26,6 +26,10 @@
+ #include "hw/usb.h"
+ #include "hw/usb/desc.h"
+
++#ifndef NAME_MAX
++#define NAME_MAX 255
++#endif
++
+ /* ----------------------------------------------------------------------- */
+
+ enum mtp_container_type {
diff --git a/emulators/qemu/patches/patch-memory.c b/emulators/qemu/patches/patch-memory.c
index 1d4988170f5..77c6c4ddfe5 100644
--- a/emulators/qemu/patches/patch-memory.c
+++ b/emulators/qemu/patches/patch-memory.c
@@ -1,8 +1,10 @@
-$NetBSD: patch-memory.c,v 1.10 2016/05/15 01:25:15 ryoon Exp $
+$NetBSD: patch-memory.c,v 1.11 2017/08/25 12:39:56 jperkin Exp $
---- memory.c.orig 2016-05-11 15:56:12.000000000 +0000
+Avoid queue definition.
+
+--- memory.c.orig 2017-04-20 14:57:00.000000000 +0000
+++ memory.c
-@@ -431,7 +431,7 @@ static MemTxResult memory_region_read_a
+@@ -432,7 +432,7 @@ static MemTxResult memory_region_read_a
{
uint64_t tmp;
@@ -11,3 +13,82 @@ $NetBSD: patch-memory.c,v 1.10 2016/05/15 01:25:15 ryoon Exp $
if (mr->subpage) {
trace_memory_region_subpage_read(get_cpu_index(), mr, addr, tmp, size);
} else if (mr == &io_mem_notdirty) {
+@@ -2470,10 +2470,10 @@ typedef struct MemoryRegionList MemoryRe
+
+ struct MemoryRegionList {
+ const MemoryRegion *mr;
+- QTAILQ_ENTRY(MemoryRegionList) queue;
++ QTAILQ_ENTRY(MemoryRegionList) mrqueue;
+ };
+
+-typedef QTAILQ_HEAD(queue, MemoryRegionList) MemoryRegionListHead;
++typedef QTAILQ_HEAD(mrqueue, MemoryRegionList) MemoryRegionListHead;
+
+ #define MR_SIZE(size) (int128_nz(size) ? (hwaddr)int128_get64( \
+ int128_sub((size), int128_one())) : 0)
+@@ -2515,7 +2515,7 @@ static void mtree_print_mr(fprintf_funct
+ bool found = false;
+
+ /* check if the alias is already in the queue */
+- QTAILQ_FOREACH(ml, alias_print_queue, queue) {
++ QTAILQ_FOREACH(ml, alias_print_queue, mrqueue) {
+ if (ml->mr == mr->alias) {
+ found = true;
+ }
+@@ -2524,7 +2524,7 @@ static void mtree_print_mr(fprintf_funct
+ if (!found) {
+ ml = g_new(MemoryRegionList, 1);
+ ml->mr = mr->alias;
+- QTAILQ_INSERT_TAIL(alias_print_queue, ml, queue);
++ QTAILQ_INSERT_TAIL(alias_print_queue, ml, mrqueue);
+ }
+ mon_printf(f, TARGET_FMT_plx "-" TARGET_FMT_plx
+ " (prio %d, %s): alias %s @%s " TARGET_FMT_plx
+@@ -2552,26 +2552,26 @@ static void mtree_print_mr(fprintf_funct
+ QTAILQ_FOREACH(submr, &mr->subregions, subregions_link) {
+ new_ml = g_new(MemoryRegionList, 1);
+ new_ml->mr = submr;
+- QTAILQ_FOREACH(ml, &submr_print_queue, queue) {
++ QTAILQ_FOREACH(ml, &submr_print_queue, mrqueue) {
+ if (new_ml->mr->addr < ml->mr->addr ||
+ (new_ml->mr->addr == ml->mr->addr &&
+ new_ml->mr->priority > ml->mr->priority)) {
+- QTAILQ_INSERT_BEFORE(ml, new_ml, queue);
++ QTAILQ_INSERT_BEFORE(ml, new_ml, mrqueue);
+ new_ml = NULL;
+ break;
+ }
+ }
+ if (new_ml) {
+- QTAILQ_INSERT_TAIL(&submr_print_queue, new_ml, queue);
++ QTAILQ_INSERT_TAIL(&submr_print_queue, new_ml, mrqueue);
+ }
+ }
+
+- QTAILQ_FOREACH(ml, &submr_print_queue, queue) {
++ QTAILQ_FOREACH(ml, &submr_print_queue, mrqueue) {
+ mtree_print_mr(mon_printf, f, ml->mr, level + 1, cur_start,
+ alias_print_queue);
+ }
+
+- QTAILQ_FOREACH_SAFE(ml, &submr_print_queue, queue, next_ml) {
++ QTAILQ_FOREACH_SAFE(ml, &submr_print_queue, mrqueue, next_ml) {
+ g_free(ml);
+ }
+ }
+@@ -2641,13 +2641,13 @@ void mtree_info(fprintf_function mon_pri
+ }
+
+ /* print aliased regions */
+- QTAILQ_FOREACH(ml, &ml_head, queue) {
++ QTAILQ_FOREACH(ml, &ml_head, mrqueue) {
+ mon_printf(f, "memory-region: %s\n", memory_region_name(ml->mr));
+ mtree_print_mr(mon_printf, f, ml->mr, 1, 0, &ml_head);
+ mon_printf(f, "\n");
+ }
+
+- QTAILQ_FOREACH_SAFE(ml, &ml_head, queue, ml2) {
++ QTAILQ_FOREACH_SAFE(ml, &ml_head, mrqueue, ml2) {
+ g_free(ml);
+ }
+ }