pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/emulators/qemu Various patches to fix the build on SunOS.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0e906b416ba5
branches:  trunk
changeset: 367179:0e906b416ba5
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Fri Aug 25 12:39:56 2017 +0000

description:
Various patches to fix the build on SunOS.

diffstat:

 emulators/qemu/Makefile                                              |   4 +-
 emulators/qemu/distinfo                                              |  11 +-
 emulators/qemu/patches/patch-contrib_ivshmem-client_ivshmem-client.c |  37 ++++
 emulators/qemu/patches/patch-contrib_ivshmem-server_ivshmem-server.c |  36 ++++
 emulators/qemu/patches/patch-hw_net_e1000.c                          |  24 ++
 emulators/qemu/patches/patch-hw_net_e1000__regs.h                    |  15 +
 emulators/qemu/patches/patch-hw_net_e1000e__core.c                   |  15 +
 emulators/qemu/patches/patch-hw_net_e1000x__common.h                 |  15 +
 emulators/qemu/patches/patch-hw_usb_dev-mtp.c                        |  17 +
 emulators/qemu/patches/patch-memory.c                                |  87 +++++++++-
 10 files changed, 254 insertions(+), 7 deletions(-)

diffs (truncated from 341 to 300 lines):

diff -r 3ba518def60c -r 0e906b416ba5 emulators/qemu/Makefile
--- a/emulators/qemu/Makefile   Fri Aug 25 12:39:43 2017 +0000
+++ b/emulators/qemu/Makefile   Fri Aug 25 12:39:56 2017 +0000
@@ -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 @@
 
 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 -r 3ba518def60c -r 0e906b416ba5 emulators/qemu/distinfo
--- a/emulators/qemu/distinfo   Fri Aug 25 12:39:43 2017 +0000
+++ b/emulators/qemu/distinfo   Fri Aug 25 12:39:56 2017 +0000
@@ -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 @@
 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-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 -r 3ba518def60c -r 0e906b416ba5 emulators/qemu/patches/patch-contrib_ivshmem-client_ivshmem-client.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/qemu/patches/patch-contrib_ivshmem-client_ivshmem-client.c      Fri Aug 25 12:39:56 2017 +0000
@@ -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 -r 3ba518def60c -r 0e906b416ba5 emulators/qemu/patches/patch-contrib_ivshmem-server_ivshmem-server.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/qemu/patches/patch-contrib_ivshmem-server_ivshmem-server.c      Fri Aug 25 12:39:56 2017 +0000
@@ -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 -r 3ba518def60c -r 0e906b416ba5 emulators/qemu/patches/patch-hw_net_e1000.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/qemu/patches/patch-hw_net_e1000.c       Fri Aug 25 12:39:56 2017 +0000
@@ -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 -r 3ba518def60c -r 0e906b416ba5 emulators/qemu/patches/patch-hw_net_e1000__regs.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/qemu/patches/patch-hw_net_e1000__regs.h Fri Aug 25 12:39:56 2017 +0000
@@ -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 -r 3ba518def60c -r 0e906b416ba5 emulators/qemu/patches/patch-hw_net_e1000e__core.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/qemu/patches/patch-hw_net_e1000e__core.c        Fri Aug 25 12:39:56 2017 +0000
@@ -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 -r 3ba518def60c -r 0e906b416ba5 emulators/qemu/patches/patch-hw_net_e1000x__common.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/qemu/patches/patch-hw_net_e1000x__common.h      Fri Aug 25 12:39:56 2017 +0000
@@ -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 -r 3ba518def60c -r 0e906b416ba5 emulators/qemu/patches/patch-hw_usb_dev-mtp.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/qemu/patches/patch-hw_usb_dev-mtp.c     Fri Aug 25 12:39:56 2017 +0000
@@ -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 -r 3ba518def60c -r 0e906b416ba5 emulators/qemu/patches/patch-memory.c
--- a/emulators/qemu/patches/patch-memory.c     Fri Aug 25 12:39:43 2017 +0000
+++ b/emulators/qemu/patches/patch-memory.c     Fri Aug 25 12:39:56 2017 +0000
@@ -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 $
+
+Avoid queue definition.
 
---- memory.c.orig      2016-05-11 15:56:12.000000000 +0000
+--- 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 @@
      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 ||



Home | Main Index | Thread Index | Old Index