aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Bogorodskiy <novel@FreeBSD.org>2018-12-09 08:25:52 +0000
committerRoman Bogorodskiy <novel@FreeBSD.org>2018-12-09 08:25:52 +0000
commitf17d3e80132d9935ce6981ef7757b89100979834 (patch)
tree27d643089b4093bcd9dfad6bad61fdf01c830da8
parentc5fc01585f053d03cb9eecf7fce7dc649da4b736 (diff)
downloadports-f17d3e80132d9935ce6981ef7757b89100979834.tar.gz
ports-f17d3e80132d9935ce6981ef7757b89100979834.zip
MFH: r484695
emulators/qemu: fix build on 12 and -CURRENT Build fails with: hw/rdma/vmw/pvrdma_cmd.c:19:10: fatal error: 'linux/types.h' file not found Add two upstream commits to fix this issue: * 72221d03b85fcfba27a47a2af08ee59150550ced to not include linux/types.h * 21ab34c9543fe1b6d31b3edbd01a397e7e090d00 to split PVRDMA from RDMA as pvrdma device can't be used on FreeBSD as mremap() system call is missing PR: 232968 Reported by: Trond.Endrestol@ximalas.info Approved by: portmgr (build fix blanket) Obtained from: upstream Approved by: ports-secteam (miwi)
Notes
Notes: svn path=/branches/2018Q4/; revision=487030
-rw-r--r--emulators/qemu/Makefile2
-rw-r--r--emulators/qemu/files/patch-rdma-pvrdma-split123
2 files changed, 124 insertions, 1 deletions
diff --git a/emulators/qemu/Makefile b/emulators/qemu/Makefile
index b49b373fe15b..49625a88713c 100644
--- a/emulators/qemu/Makefile
+++ b/emulators/qemu/Makefile
@@ -3,7 +3,7 @@
PORTNAME= qemu
PORTVERSION= 2.12.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= emulators
MASTER_SITES= http://wiki.qemu.org/download/
DIST_SUBDIR= qemu/${PORTVERSION}
diff --git a/emulators/qemu/files/patch-rdma-pvrdma-split b/emulators/qemu/files/patch-rdma-pvrdma-split
new file mode 100644
index 000000000000..d196a4c62594
--- /dev/null
+++ b/emulators/qemu/files/patch-rdma-pvrdma-split
@@ -0,0 +1,123 @@
+diff --git configure configure
+index 457684a7e6..3da60d8436 100755
+--- configure
++++ configure
+@@ -353,6 +353,7 @@ hax="no"
+ hvf="no"
+ whpx="no"
+ rdma=""
++pvrdma=""
+ gprof="no"
+ debug_tcg="no"
+ debug="no"
+@@ -1308,6 +1309,10 @@ for opt do
+ ;;
+ --disable-rdma) rdma="no"
+ ;;
++ --enable-pvrdma) pvrdma="yes"
++ ;;
++ --disable-pvrdma) pvrdma="no"
++ ;;
+ --with-gtkabi=*) gtkabi="$optarg"
+ ;;
+ --disable-vte) vte="no"
+@@ -1593,7 +1598,8 @@ disabled with --disable-FEATURE, default is enabled if available:
+ hax HAX acceleration support
+ hvf Hypervisor.framework acceleration support
+ whpx Windows Hypervisor Platform acceleration support
+- rdma Enable RDMA-based migration and PVRDMA support
++ rdma Enable RDMA-based migration
++ pvrdma Enable PVRDMA support
+ vde support for vde network
+ netmap support for netmap network
+ linux-aio Linux AIO support
+@@ -2971,6 +2977,48 @@ EOF
+ fi
+ fi
+
++##########################################
++# PVRDMA detection
++
++cat > $TMPC <<EOF &&
++#include <sys/mman.h>
++
++int
++main(void)
++{
++ char buf = 0;
++ void *addr = &buf;
++ addr = mremap(addr, 0, 1, MREMAP_MAYMOVE | MREMAP_FIXED);
++
++ return 0;
++}
++EOF
++
++if test "$rdma" = "yes" ; then
++ case "$pvrdma" in
++ "")
++ if compile_prog "" ""; then
++ pvrdma="yes"
++ else
++ pvrdma="no"
++ fi
++ ;;
++ "yes")
++ if ! compile_prog "" ""; then
++ error_exit "PVRDMA is not supported since mremap is not implemented"
++ fi
++ pvrdma="yes"
++ ;;
++ "no")
++ pvrdma="no"
++ ;;
++ esac
++else
++ if test "$pvrdma" = "yes" ; then
++ error_exit "PVRDMA requires rdma suppport"
++ fi
++ pvrdma="no"
++fi
+
+ ##########################################
+ # VNC SASL detection
+@@ -5820,6 +5868,7 @@ if test "$tcg" = "yes" ; then
+ fi
+ echo "malloc trim support $malloc_trim"
+ echo "RDMA support $rdma"
++echo "PVRDMA support $pvrdma"
+ echo "fdt support $fdt"
+ echo "membarrier $membarrier"
+ echo "preadv support $preadv"
+@@ -6568,6 +6617,10 @@ if test "$rdma" = "yes" ; then
+ echo "RDMA_LIBS=$rdma_libs" >> $config_host_mak
+ fi
+
++if test "$pvrdma" = "yes" ; then
++ echo "CONFIG_PVRDMA=y" >> $config_host_mak
++fi
++
+ if test "$have_rtnetlink" = "yes" ; then
+ echo "CONFIG_RTNETLINK=y" >> $config_host_mak
+ fi
+diff --git hw/rdma/Makefile.objs hw/rdma/Makefile.objs
+index 3504c39d21..bd36cbf51c 100644
+--- hw/rdma/Makefile.objs
++++ hw/rdma/Makefile.objs
+@@ -1,4 +1,4 @@
+-ifeq ($(CONFIG_RDMA),y)
++ifeq ($(CONFIG_PVRDMA),y)
+ obj-$(CONFIG_PCI) += rdma_utils.o rdma_backend.o rdma_rm.o
+ obj-$(CONFIG_PCI) += vmw/pvrdma_dev_ring.o vmw/pvrdma_cmd.o \
+ vmw/pvrdma_qp_ops.o vmw/pvrdma_main.o
+diff --git hw/rdma/vmw/pvrdma_cmd.c hw/rdma/vmw/pvrdma_cmd.c
+index 99019d8741..bd14b4bc47 100644
+--- hw/rdma/vmw/pvrdma_cmd.c
++++ hw/rdma/vmw/pvrdma_cmd.c
+@@ -16,7 +16,6 @@
+ #include "qemu/osdep.h"
+ #include "qemu/error-report.h"
+ #include "cpu.h"
+-#include <linux/types.h>
+ #include "hw/hw.h"
+ #include "hw/pci/pci.h"
+ #include "hw/pci/pci_ids.h"