aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Rytarowski <n54@gmx.com>2017-06-22 18:50:04 +0200
committerPeter Maydell <peter.maydell@linaro.org>2017-07-13 17:56:52 +0100
commitb299e79dfea559dc2e7dba8eaf8ba16bfa1d3253 (patch)
tree0a488be12a8c062dc4b79f802f9a9aa7b725a181
parent883fc1aacdad4149ef990bdc94449b6c0be8718f (diff)
downloadqemu-arm-b299e79dfea559dc2e7dba8eaf8ba16bfa1d3253.tar.gz
configure: Don't build ivshmem tools unless CONFIG_IVSHMEM is set
Don't try to build the ivshmem-server and ivshmem-client tools unless CONFIG_IVSHMEM is set. This fixes in passing a build bug on NetBSD, which fails to build the ivshmem tools because they use shm_open() and on NetBSD that requires linking against -lrt. Signed-off-by: Kamil Rytarowski <n54@gmx.com> [PMM: moved some code into earlier patches; minor bugfixes; added commit message] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--Makefile2
-rw-r--r--Makefile.objs4
-rwxr-xr-xconfigure2
3 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 16a0430c6c..5d5bd6a31f 100644
--- a/Makefile
+++ b/Makefile
@@ -470,10 +470,12 @@ ifneq ($(EXESUF),)
qemu-ga: qemu-ga$(EXESUF) $(QGA_VSS_PROVIDER) $(QEMU_GA_MSI)
endif
+ifdef CONFIG_IVSHMEM
ivshmem-client$(EXESUF): $(ivshmem-client-obj-y) $(COMMON_LDADDS)
$(call LINK, $^)
ivshmem-server$(EXESUF): $(ivshmem-server-obj-y) $(COMMON_LDADDS)
$(call LINK, $^)
+endif
vhost-user-scsi$(EXESUF): $(vhost-user-scsi-obj-y)
$(call LINK, $^)
diff --git a/Makefile.objs b/Makefile.objs
index bfd5a6ceb1..24a4ea08b8 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -107,8 +107,8 @@ qga-vss-dll-obj-y = qga/
######################################################################
# contrib
-ivshmem-client-obj-y = contrib/ivshmem-client/
-ivshmem-server-obj-y = contrib/ivshmem-server/
+ivshmem-client-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-client/
+ivshmem-server-obj-$(CONFIG_IVSHMEM) = contrib/ivshmem-server/
libvhost-user-obj-y = contrib/libvhost-user/
vhost-user-scsi.o-cflags := $(LIBISCSI_CFLAGS)
vhost-user-scsi.o-libs := $(LIBISCSI_LIBS)
diff --git a/configure b/configure
index dea46c5f98..b54bc2ef69 100755
--- a/configure
+++ b/configure
@@ -4979,6 +4979,8 @@ if test "$want_tools" = "yes" ; then
tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools"
if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
tools="qemu-nbd\$(EXESUF) $tools"
+ fi
+ if [ "$ivshmem" = "yes" ]; then
tools="ivshmem-client\$(EXESUF) ivshmem-server\$(EXESUF) $tools"
fi
fi