qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: patches@linaro.org, Kamil Rytarowski <n54@gmx.com>,
	Markus Armbruster <armbru@redhat.com>
Subject: [Qemu-devel] [PATCH 3/3] configure: Don't build ivshmem tools unless CONFIG_IVSHMEM is set
Date: Fri, 14 Jul 2017 09:33:45 +0100	[thread overview]
Message-ID: <1500021225-4118-4-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1500021225-4118-1-git-send-email-peter.maydell@linaro.org>

From: Kamil Rytarowski <n54@gmx.com>

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>
---
 configure     | 2 ++
 Makefile      | 2 ++
 Makefile.objs | 4 ++--
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index dea46c5..b54bc2e 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
diff --git a/Makefile b/Makefile
index 16a0430..5d5bd6a 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 bfd5a6c..24a4ea0 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)
-- 
2.7.4

  parent reply	other threads:[~2017-07-14  9:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-14  8:33 [Qemu-devel] [PATCH 0/3] Fix NetBSD build (don't build ivshmem tools) Peter Maydell
2017-07-14  8:33 ` [Qemu-devel] [PATCH 1/3] configure: Rename CONFIG_IVSHMEM to CONFIG_IVSHMEM_DEVICE Peter Maydell
2017-07-20 11:17   ` Markus Armbruster
2017-07-20 11:54     ` Peter Maydell
2017-07-14  8:33 ` [Qemu-devel] [PATCH 2/3] configure: Use an explicit CONFIG_IVSHMEM rather than CONFIG_EVENTFD Peter Maydell
2017-07-14  8:33 ` Peter Maydell [this message]
2017-07-20  9:43 ` [Qemu-devel] [PATCH 0/3] Fix NetBSD build (don't build ivshmem tools) Peter Maydell
2017-07-20 11:20 ` Markus Armbruster
2017-07-20 15:35   ` Peter Maydell
2017-07-20 16:59     ` Kamil Rytarowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1500021225-4118-4-git-send-email-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=armbru@redhat.com \
    --cc=n54@gmx.com \
    --cc=patches@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).