From patchwork Tue May 30 06:20:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamil Rytarowski X-Patchwork-Id: 9753899 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 D6049602B9 for ; Tue, 30 May 2017 06:29:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C878B274A3 for ; Tue, 30 May 2017 06:29:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BD74427CEA; Tue, 30 May 2017 06:29:37 +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.4 required=2.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM 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 397A5274A3 for ; Tue, 30 May 2017 06:29:35 +0000 (UTC) Received: from localhost ([::1]:51712 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFaes-0001hO-Ix for patchwork-qemu-devel@patchwork.kernel.org; Tue, 30 May 2017 02:29:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54919) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFaeM-0001hC-HA for qemu-devel@nongnu.org; Tue, 30 May 2017 02:29:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFaeH-0003Ur-Lr for qemu-devel@nongnu.org; Tue, 30 May 2017 02:29:02 -0400 Received: from mout.gmx.net ([212.227.15.19]:64106) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dFaeH-0003U4-BW for qemu-devel@nongnu.org; Tue, 30 May 2017 02:28:57 -0400 Received: from localhost.localdomain ([185.58.161.191]) by mail.gmx.com (mrgmx003 [212.227.17.184]) with ESMTPSA (Nemesis) id 0LxPNC-1e0ZWu2nkY-016x6V; Tue, 30 May 2017 08:28:46 +0200 From: Kamil Rytarowski To: qemu-devel@nongnu.org Date: Tue, 30 May 2017 08:20:22 +0200 Message-Id: <20170530062022.5841-1-n54@gmx.com> X-Mailer: git-send-email 2.11.1 In-Reply-To: <20170526054013.299-1-n54@gmx.com> References: <20170526054013.299-1-n54@gmx.com> X-Provags-ID: V03:K0:fwrQkiijATyK+ukCA3ro4hWS/jnpOEdtp+CP7an3AbvQWCr8iTd f4gmliPiIozIUzUs6qNGqDb7uiO/Kq/kE6HYW7jqApYCVoGLfSveDzjC1YJ1/b2vlPnaQIH OJaocrLE0YwPUZ4RmKQr4KhPxOhaABrWKi2C553Dqcx63B5uNaEyRIqE59gCbCx3MeV6liJ qK8G+qewCU7G3VAgHuTlA== X-UI-Out-Filterresults: notjunk:1; V01:K0:GiRBan0KA2g=:gmiUfz4B35uVloIYsQB7kC jKcy1Z7GRB7CNneLGeoVBLnA93NLpw5QXYTUv7nTMr+MK3Igp06g8uno5XP0jvtduF2y/potC wMsIwuHJ/i1V8zcwn9J31OknniD/yKBs85BfU0U0Ow4ej2YpEuNFxHWVgIyRSg9zZKDSMjkjk yr44n00KjVtk0wLgD/ZmsiUVOLjsjWPoYXHRiN8t91q/A0qzVZHeIlOf88piV70PIF8i1aVJ8 rj2miGwGZhLTSlIzj+q9PkPhwnQ1Bp2QGOMWb7Lb5zDoMDjBKYM5VUAhJmGEQq+sdtuacIF6k Pnw9MBjLkRF9tcwyJVOXQrrxBduwuhert2LE+cEjDSTuI6tOKa83sU7+KU027rcPo46HT7gAk K70Z1hfWzhtvhHX1wbV/hkdjzCDObbAiAR+66pfWcDoZ+342QX/B1SSPPRyQ36iS/undXnLtB L1k3UJXCIFA/hHfXIbAhQZPTJ25YvkyQJeJypsSPyJuKUdo69Glwy7lWma7CwpjqTtWv1a0hO 7Mf9nXW0YDTG75Nog/6kBKpWHGK5UI+OCQV9ZA74QhcHRE2BCzpP2ERgpM9RWCtGmhqVSWhI0 kEgmeAPH0sejDGHk9HLKmno5trnByMEVR9pq0Z9Tw0q5gQV6ov6tuAQvezdAGdBRQOYf5m8/v z37KLDzpXHydvPcBOHv5dlYyo+ipEuKvhyONpGxvWz5DsJOGICyASQW0OmME5nReOr30ZBH2X qegeXurD4vhHeR9yMO3Rx75DRtPmJFCiVQGpTbuOJsLnMMdqDx+dQcGyI0o= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.15.19 Subject: [Qemu-devel] [PATCH] 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: peter.maydell@linaro.org, Kamil Rytarowski , marcandre.lureau@gmail.com, armbru@redhat.com, f4bug@amsat.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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 1a5ee4b909..483307be53 100755 --- a/configure +++ b/configure @@ -4928,6 +4928,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