From patchwork Tue Jun 13 22:00:06 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: 105439 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp12982qgd; Tue, 13 Jun 2017 15:07:32 -0700 (PDT) X-Received: by 10.200.1.71 with SMTP id f7mr3081312qtg.172.1497391652814; Tue, 13 Jun 2017 15:07:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497391652; cv=none; d=google.com; s=arc-20160816; b=hgi6SQc8RTqHYuhNC2DMslVjkUz6zVcA8zysoBujDqs3mfMgerCrmnkzdwmwjYOECU enyK4ThSd530PPjag904WIy1ud4o7r+uzi3zjxXNHirxx5Y8oUT+lGd8fqElB02bijUK +5+GdSnlSeahpGbvwgh5mutStYRcULw1y+kWJIvmZBDoqH93CUDqImGx0ivVxDKkgCjV zzgwEjibgqFiXO69kRvkgx1bZwQ4etg8RY+Hx8RVqIkWmzOwwWW6xZihdoD0T6oTkHE2 wwP7voO7sZKjWQeMWusdBJP6hIuDxJY9Io9HBWoThA6Ab2HnSVBcxT6tYgL5ixuJYOu2 JgXw== 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=k1sRJ1RMdPRjD3fORrQPA4ZHa4sp4vLsP0UjGBRzpt0=; b=kor6qcEFD/F0p9R+WPQevqs4WZbkEE2Ovgdwqy/Fz0606LTaQx4QJ6mF3G9n+Iev5E cYHMwvNvI9bLF4hk2JYQoVhR0I3bztip34bpBjaUL7KWFn3GJq+da9WpLfXRQavwXcOW jxxtCCkwoz8WWOjM+Hy9pAb3/YG+XlNYjB+NNkph2kiZNGQ1VjjXRbsuqbIOZvr85Ah1 NWNpbXSm+v+k8hdeLxliYp2Uzs/RCn8XiyST8VOKWL3Imvoxg6A07BPQQFFDnB0eGVhV nZgvjSDSl5GeA4/RpOSs/WGIy3mtYB+/gw6X3Y8XcId4m8ukHa/3qdkhgIsaGOo+ZHz3 tE2w== 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 g129si1329294qkf.220.2017.06.13.15.07.32; Tue, 13 Jun 2017 15:07:32 -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 6E8DF60BF0; Tue, 13 Jun 2017 22:07:32 +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, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 38EE260C16; Tue, 13 Jun 2017 22:01:09 +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 0CEE860BF2; Tue, 13 Jun 2017 22:01:00 +0000 (UTC) Received: from forward5p.cmail.yandex.net (forward5p.cmail.yandex.net [77.88.31.20]) by lists.linaro.org (Postfix) with ESMTPS id 48BC3609D1 for ; Tue, 13 Jun 2017 22:00:21 +0000 (UTC) Received: from smtp3m.mail.yandex.net (smtp3m.mail.yandex.net [IPv6:2a02:6b8:0:2519::125]) by forward5p.cmail.yandex.net (Yandex) with ESMTP id 499FA20308 for ; Wed, 14 Jun 2017 01:00:19 +0300 (MSK) Received: from smtp3m.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp3m.mail.yandex.net (Yandex) with ESMTP id 2A2322840D57 for ; Wed, 14 Jun 2017 01:00:18 +0300 (MSK) Received: by smtp3m.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id bQG4KXwTEl-0ICCGOTe; Wed, 14 Jun 2017 01:00:18 +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: Wed, 14 Jun 2017 01:00:06 +0300 Message-Id: <1497391207-13288-9-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1497391207-13288-1-git-send-email-odpbot@yandex.ru> References: <1497391207-13288-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 45 Subject: [lng-odp] [PATCH v2 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: 7cf390d11e69f6b677e6fbfd6414944737406fc3 ** Merge commit sha: 3808f2b5af9d034f6157eb2c7eec543ee8055fbf **/ 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 cf824d3c..56761f9e 100644 --- a/configure.ac +++ b/configure.ac @@ -208,7 +208,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 7928f54a..b0fac238 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 ])