From patchwork Fri Jun 30 23:00:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 106779 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp2884478qge; Fri, 30 Jun 2017 16:06:58 -0700 (PDT) X-Received: by 10.233.220.195 with SMTP id q186mr27207980qkf.244.1498864017939; Fri, 30 Jun 2017 16:06:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498864017; cv=none; d=google.com; s=arc-20160816; b=Y84ZtmR6ZsHG0gadiJieHG7T1+JvGnwa2uvu63AueqoqXtI7+f7ZybYSxwwOogyB/Q XPsPhEj+y5abuk6qfRd3yshlKxSkEtDHb12XgO6rqqMm1XmjoTac57zsGwBDT/9wQVKj usDSb20VXD5YFCl+xYKIfTGAiqifbMwBlQxLA5fA/G1MqW1kDf66JfYIZpZJGqm/JmYb Fp3s1hD+OLbefPD2OQsDVs1RmBRDTx33Rbf7bPtyh9un/fkijmn2b9t5OVAx32lthS79 VMhBUXbuE5ZRjU9TX7VR+aHkZ/8iNTi5u9nsHQn0qbzKhaXOL8EZ1GdK8mMCsesIGN0X SX2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=2cMawwjBvc0sbXenXnyEcgIOjnHPCKilXMdKlCI4INQ=; b=Bks19dQPWtrPRC2ur6Av06Bq8OF8LAhOh2MeRnHLCqkB2HzVAvtsmsHwHL7doVDuOB t3nbXDhewPGdBwUaSnebdy0GYq1oTxasaZZU/01BKrWXVYzGrZzIA4FF++frh6IDczVw mKMI9GgN6MuIYte/r7WWSU8Dv0o3/Mi1mYup2ZHnb/nO9HMSgiWAn0ApvnzicbAA1Xkr PS2UgCVOWeDNyINu1ZpzFli6JyxR5NoBIW0rofQkDwQ+xkOW6gdfLWqFtMr1VdOJdZdJ R9XGWMu1nUUYYvSofJ6ctzS5BtJzVp8yn2vy3zMZp8yq1+CtjKmbUtKv5rxCdx2LjKD0 gz9A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id p41si8830704qta.19.2017.06.30.16.06.57; Fri, 30 Jun 2017 16:06:57 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 8D729622F0; Fri, 30 Jun 2017 23:06:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, URIBL_BLOCKED, URIBL_SBL, URIBL_SBL_A autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 4B9AA62CED; Fri, 30 Jun 2017 23:01:45 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id B1D1462CE2; Fri, 30 Jun 2017 23:01:27 +0000 (UTC) Received: from forward5h.cmail.yandex.net (forward5h.cmail.yandex.net [87.250.230.20]) by lists.linaro.org (Postfix) with ESMTPS id DBCC2622F0 for ; Fri, 30 Jun 2017 23:00:26 +0000 (UTC) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [37.140.190.29]) by forward5h.cmail.yandex.net (Yandex) with ESMTP id DC52420F2F for ; Sat, 1 Jul 2017 02:00:25 +0300 (MSK) Received: from smtp4o.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp4o.mail.yandex.net (Yandex) with ESMTP id B22FF6C01119 for ; Sat, 1 Jul 2017 02:00:25 +0300 (MSK) Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id jomLhvwstF-0O7q38xk; Sat, 01 Jul 2017 02:00:24 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Sat, 1 Jul 2017 02:00:13 +0300 Message-Id: <1498863614-26294-9-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1498863614-26294-1-git-send-email-odpbot@yandex.ru> References: <1498863614-26294-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 45 Subject: [lng-odp] [PATCH v3 8/9] linux-gen: stop poisoning CPPFLAGS with Netmap flags X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Dmitry Eremin-Solenikov Instead of poisoning global AM_CPPFLAGS with Netmap flags, use fine-grained controls for compiling with Netmap. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 45 (lumag:m4) ** https://github.com/Linaro/odp/pull/45 ** Patch: https://github.com/Linaro/odp/pull/45.patch ** Base sha: ceeab69f3af67701adb524c7b9757d19cefb1110 ** Merge commit sha: bc5ee5a9b895a630b180cd264a55c8e4817de750 **/ configure.ac | 1 - platform/linux-generic/Makefile.am | 1 + platform/linux-generic/m4/odp_netmap.m4 | 7 +++++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index d3059ffb..e4903c7a 100644 --- a/configure.ac +++ b/configure.ac @@ -209,7 +209,6 @@ AC_SUBST([testdir]) ########################################################################## # Set conditionals as computed within platform specific files ########################################################################## -AM_CONDITIONAL([netmap_support], [test x$netmap_support = xyes ]) AM_CONDITIONAL([SDK_INSTALL_PATH_], [test "x${SDK_INSTALL_PATH_}" = "x1"]) AM_CONDITIONAL([test_installdir], [test "$testdir" != ""]) AM_CONDITIONAL([cunit_support], [test x$cunit_support = xyes ]) diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index dff10980..40385a7e 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -13,6 +13,7 @@ AM_CFLAGS += -D_ODP_PKTIO_IPC AM_CPPFLAGS += $(OPENSSL_CPPFLAGS) AM_CPPFLAGS += $(DPDK_CPPFLAGS) +AM_CPPFLAGS += $(NETMAP_CPPFLAGS) include_HEADERS = \ $(top_srcdir)/include/odp.h \ diff --git a/platform/linux-generic/m4/odp_netmap.m4 b/platform/linux-generic/m4/odp_netmap.m4 index 880e9d58..dea80626 100644 --- a/platform/linux-generic/m4/odp_netmap.m4 +++ b/platform/linux-generic/m4/odp_netmap.m4 @@ -15,14 +15,14 @@ AC_ARG_WITH([netmap-path], AC_HELP_STRING([--with-netmap-path=DIR path to netmap root directory], [(or in the default path if not specified).]), [NETMAP_PATH=$withval - AM_CPPFLAGS="$AM_CPPFLAGS -isystem $NETMAP_PATH/sys" + NETMAP_CPPFLAGS="-isystem $NETMAP_PATH/sys" netmap_support=yes],[]) ########################################################################## # Save and set temporary compilation flags ########################################################################## OLD_CPPFLAGS=$CPPFLAGS -CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS" +CPPFLAGS="$NETMAP_CPPFLAGS $CPPFLAGS" ########################################################################## # Check for netmap availability @@ -32,6 +32,7 @@ then AC_CHECK_HEADERS([net/netmap_user.h], [], [AC_MSG_FAILURE(["can't find netmap header"])]) ODP_CFLAGS="$ODP_CFLAGS -DODP_NETMAP" + AC_SUBST([NETMAP_CPPFLAGS]) else netmap_support=no fi @@ -40,3 +41,5 @@ fi # Restore old saved variables ########################################################################## CPPFLAGS=$OLD_CPPFLAGS + +AM_CONDITIONAL([netmap_support], [test x$netmap_support = xyes ])