From patchwork Sun Jun 4 15:45:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 9765035 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7F5EE60392 for ; Sun, 4 Jun 2017 16:24:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 76E13280B0 for ; Sun, 4 Jun 2017 16:24:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6BDC228179; Sun, 4 Jun 2017 16:24:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E287B280CF for ; Sun, 4 Jun 2017 16:24:02 +0000 (UTC) Received: from localhost ([::1]:57624 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHYJt-00024I-8I for patchwork-qemu-devel@patchwork.kernel.org; Sun, 04 Jun 2017 12:24:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39325) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHYIa-00021F-VT for qemu-devel@nongnu.org; Sun, 04 Jun 2017 12:22:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHYIW-0004Qq-Lu for qemu-devel@nongnu.org; Sun, 04 Jun 2017 12:22:40 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:40701) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHYIW-0004O7-DT; Sun, 04 Jun 2017 12:22:36 -0400 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 687C2404E6; Sun, 4 Jun 2017 19:22:33 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.tls.msk.ru (Postfix) with SMTP id 1CBA75F5; Sun, 4 Jun 2017 18:45:30 +0300 (MSK) Received: (nullmailer pid 16397 invoked by uid 1000); Sun, 04 Jun 2017 15:45:27 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Sun, 4 Jun 2017 18:45:25 +0300 Message-Id: <9d2c9031af6edb352eb83e58fe46cdd99333e7b6.1496591095.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 86.62.121.231 Subject: [Qemu-devel] [PULL 21/22] ivshmem-server: ivshmem-client: Build when eventfd() is available X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Kamil Rytarowski , Michael Tokarev Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Kamil Rytarowski Currently ivshmem requires eventfd() which is Linux specific. Do not and build it unconditionally on every Linux/BSD/Solaris. This patch indirectly fixes build failure on NetBSD, where these tools additionally require -lrt for shm_open(3). In future there should be added support for NetBSD and the linking addressed appropriately. Signed-off-by: Kamil Rytarowski Reviewed-by: Markus Armbruster Signed-off-by: Michael Tokarev --- configure | 2 ++ contrib/ivshmem-client/Makefile.objs | 2 +- contrib/ivshmem-server/Makefile.objs | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/configure b/configure index fbb6a93c99..965727bca8 100755 --- a/configure +++ b/configure @@ -4910,6 +4910,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 [ "$eventfd" = "yes" ]; then tools="ivshmem-client\$(EXESUF) ivshmem-server\$(EXESUF) $tools" fi fi diff --git a/contrib/ivshmem-client/Makefile.objs b/contrib/ivshmem-client/Makefile.objs index bfab2d20dd..13d864082d 100644 --- a/contrib/ivshmem-client/Makefile.objs +++ b/contrib/ivshmem-client/Makefile.objs @@ -1 +1 @@ -ivshmem-client-obj-y = ivshmem-client.o main.o +ivshmem-client-obj-$(CONFIG_IVSHMEM) = ivshmem-client.o main.o diff --git a/contrib/ivshmem-server/Makefile.objs b/contrib/ivshmem-server/Makefile.objs index c060dd3698..d9469fd777 100644 --- a/contrib/ivshmem-server/Makefile.objs +++ b/contrib/ivshmem-server/Makefile.objs @@ -1 +1 @@ -ivshmem-server-obj-y = ivshmem-server.o main.o +ivshmem-server-obj-$(CONFIG_IVSHMEM) = ivshmem-server.o main.o