From patchwork Fri Jun 30 23:00:10 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: 106777 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp2883022qge; Fri, 30 Jun 2017 16:05:08 -0700 (PDT) X-Received: by 10.55.167.76 with SMTP id q73mr31495114qke.77.1498863907966; Fri, 30 Jun 2017 16:05:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498863907; cv=none; d=google.com; s=arc-20160816; b=HiMN4YkCfnZizJcKrzsGJV/o2Xw931WkKZ/Z7wWysNcvU6N8ewbhC//VeR+0vhnxdO iCQRR9iOTB/TE8hfgL8S43qnuy5gypox5/zbDtpxhI8D4R6eRmZLAqNykf4oqvw2nEpf VPQBOrO7ql1kkz1XIcta/K2fcSsbRnJ4ivy/UITXU3ovpdxav1thM0pDaDQi6A9N+Hre EFFGNiP+4SVPd2lqZlaTjdUfM6dfBAQqKqmHe+FZke6Amw3rAM+yzwoSUoo2bfhnQtch EJCgCTa3vgsWwyfLGKRNtr2HeIgV6AW21LMVATDcHQ4MQ6Rg1XTmoHEauZLvlacy9Fx1 Uwng== 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=CN36nxyjFW41m1ChZ5stZl1TMdnYn2NsoKTK5MN5wXA=; b=BVK4N6KKeClxlQhYfpfVwxBsncLlu+r5EbKg/56vH7yHzLvcnWl7D9bbtuaC34DhPl QWw6bavt1bx1/EIyVGZaUZSmsXhI60EZISxHLPBa+a6RDAEOHYsT9yfhDOlW7vqUjYz0 nMxUJ9TZYVc79poMebz+g/4IGYt+HMBWyy2EuYK4K29Omv2yRtOACEwkL0LgzBYY9DnC DNjds/vLbnqNxnV3DsCojYuaWP+0YqxFfRnc0zvkkDWKVAX1jkh+qPYK0KLzxgMBifch SA/KU7YEX7PVWYEmLB4sNCJYwUEkWUKOXdozRwam9W53wfe5iJLijKlNR3Ust3QIAmtI ckcw== 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 w184si8535551qkd.18.2017.06.30.16.05.07; Fri, 30 Jun 2017 16:05:07 -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 9FE4E608D5; Fri, 30 Jun 2017 23:05:07 +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.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, 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 A2BAD62CE2; Fri, 30 Jun 2017 23:01:32 +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 992DE62CE7; Fri, 30 Jun 2017 23:01:19 +0000 (UTC) Received: from forward4j.cmail.yandex.net (forward4j.cmail.yandex.net [5.255.227.22]) by lists.linaro.org (Postfix) with ESMTPS id 70D5560EC3 for ; Fri, 30 Jun 2017 23:00:24 +0000 (UTC) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [37.140.190.29]) by forward4j.cmail.yandex.net (Yandex) with ESMTP id CA39320864 for ; Sat, 1 Jul 2017 02:00:22 +0300 (MSK) Received: from smtp4o.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp4o.mail.yandex.net (Yandex) with ESMTP id 7FA7E6C0110F for ; Sat, 1 Jul 2017 02:00:22 +0300 (MSK) Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id jomLhvwstF-0L7GIRTn; Sat, 01 Jul 2017 02:00:21 +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:10 +0300 Message-Id: <1498863614-26294-6-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 5/9] linux-gen: stop poisoning CPPFLAGS/LDFLAGS with CUnit 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/AM_LDFLAGS with CUnit flags, use fine-grained controls for compiling/linking with CUnit. 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 **/ test/common_plat/common/Makefile.am | 1 + test/common_plat/m4/validation.m4 | 19 +++++++++++-------- test/common_plat/validation/api/Makefile.inc | 2 ++ test/linux-generic/Makefile.inc | 2 ++ 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/test/common_plat/common/Makefile.am b/test/common_plat/common/Makefile.am index fd41fb42..7d88d2ea 100644 --- a/test/common_plat/common/Makefile.am +++ b/test/common_plat/common/Makefile.am @@ -4,6 +4,7 @@ include $(top_srcdir)/test/Makefile.inc noinst_LTLIBRARIES = libcunit_common.la libcpumask_common.la libthrmask_common.la libcunit_common_la_SOURCES = odp_cunit_common.c +libcunit_common_la_LIBADD = $(CUNIT_LIBS) libcpumask_common_la_SOURCES = mask_common.c diff --git a/test/common_plat/m4/validation.m4 b/test/common_plat/m4/validation.m4 index d32f675a..67edac7a 100644 --- a/test/common_plat/m4/validation.m4 +++ b/test/common_plat/m4/validation.m4 @@ -26,24 +26,24 @@ AC_ARG_WITH([cunit-path], AC_HELP_STRING([--with-cunit-path=DIR path to CUnit libs and headers], [(or in the default path if not specified).]), [CUNIT_PATH=$withval - AM_CPPFLAGS="$AM_CPPFLAGS -I$CUNIT_PATH/include" - AM_LDFLAGS="$AM_LDFLAGS -L$CUNIT_PATH/lib" - cunit_support=yes],[]) + CUNIT_CPPFLAGS="-I$CUNIT_PATH/include" + CUNIT_LIBS="-L$CUNIT_PATH/lib" + cunit_support=yes],[]) ########################################################################## # Save and set temporary compilation flags ########################################################################## -OLD_LDFLAGS=$LDFLAGS +OLD_LIBS=$LIBS OLD_CPPFLAGS=$CPPFLAGS -LDFLAGS="$AM_LDFLAGS $LDFLAGS" -CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS" +LIBS="$CUNIT_LIBS $LIBS" +CPPFLAGS="$CUNIT_CPPFLAGS $CPPFLAGS" ########################################################################## # Check for CUnit availability ########################################################################## if test x$cunit_support = xyes then - AC_CHECK_LIB([cunit],[CU_get_error], [], + AC_CHECK_LIB([cunit],[CU_get_error], [CUNIT_LIBS="$CUNIT_LIBS -lcunit"], [AC_MSG_ERROR([CUnit libraries required])]) AC_CHECK_HEADERS([CUnit/Basic.h], [], [AC_MSG_FAILURE(["can't find cunit headers"])]) @@ -51,8 +51,11 @@ else cunit_support=no fi +AC_SUBST([CUNIT_CPPFLAGS]) +AC_SUBST([CUNIT_LIBS]) + ########################################################################## # Restore old saved variables ########################################################################## -LDFLAGS=$OLD_LDFLAGS +LIBS=$OLD_LIBS CPPFLAGS=$OLD_CPPFLAGS diff --git a/test/common_plat/validation/api/Makefile.inc b/test/common_plat/validation/api/Makefile.inc index 6069ee6b..177d2ac3 100644 --- a/test/common_plat/validation/api/Makefile.inc +++ b/test/common_plat/validation/api/Makefile.inc @@ -11,6 +11,8 @@ AM_CFLAGS += -I$(top_srcdir)/test/common_plat/common AM_LDFLAGS += -static AM_LDFLAGS += $(DPDK_PMDS) +AM_CPPFLAGS += $(CUNIT_CPPFLAGS) + LIBCUNIT_COMMON = $(COMMON_DIR)/libcunit_common.la LIBCPUMASK_COMMON = $(COMMON_DIR)/libcpumask_common.la LIBTHRMASK_COMMON = $(COMMON_DIR)/libthrmask_common.la diff --git a/test/linux-generic/Makefile.inc b/test/linux-generic/Makefile.inc index 6e165d8d..30b56e26 100644 --- a/test/linux-generic/Makefile.inc +++ b/test/linux-generic/Makefile.inc @@ -4,6 +4,8 @@ AM_LDFLAGS += -static +AM_CPPFLAGS += $(CUNIT_CPPFLAGS) + LIBCUNIT_COMMON = $(top_builddir)/test/common_plat/common/libcunit_common.la LIB = $(top_builddir)/lib LIBODP = $(LIB)/libodphelper.la $(LIB)/libodp-linux.la $(DPDK_PMDS)