From patchwork Tue Jan 16 04:00:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 124607 Delivered-To: patch@linaro.org Received: by 10.46.64.148 with SMTP id r20csp880528lje; Mon, 15 Jan 2018 20:00:50 -0800 (PST) X-Google-Smtp-Source: ACJfBov+HKrpIgOSk4aC5adYUHgahMZfZjOOqcaJBt/LhVvEX2S4hAbQkb2dwKp2InyJiaXO0Ltw X-Received: by 10.200.5.10 with SMTP id u10mr16184974qtg.103.1516075250728; Mon, 15 Jan 2018 20:00:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516075250; cv=none; d=google.com; s=arc-20160816; b=wHv/hDad18afEV4bHhnUDn1RippKvo7O97bOfx0xBvq03q07uYW0m2lXCXmF4Wf2es nd5nO7/46JpggIWgV5lSlXalXBLBvYKyBVsEKhHhVhBGeQnXN8vPVrT//18g7CPgbTxB 3FK7JdoyL5A/8Xt2spPWG8+qiZfNKRSenEghPHwavkXDq2nxzz4GisO83gGnrervO7RX NaTRlj6kIVJhIbJvUQ5rHl8++dUpVOyXKoxjl5pL6AHPlzukhU8WAg1g4dJhWcfnQ3I2 673EHuLsYBzK17bBSxSCreEjoOaj1a9vIEyXkwdFVfgcEOj18ZCNt7Tl12mu9jbk4Tbj WmUg== 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=3bunHVtDuJyBxA3Wa/GHfGheFEyZZL1HJT+6+kaKIlE=; b=rvyfyTkUXjV8AHTZ0jxnzv/nIISDozmFjNJvUKWXNdNG+6UZaxUEDtgc+zxs9dpRQ2 XIoH+lKh8G71G28xnHq2dqkIb4T7YC9BufedC/m4JZ80VloqYUxBgRMNkkky/jrBejAk SWDASJpUGKV8qmGCG5sVqPNERz07u0JQaFUUFbbwtsV1vBndkQs6PDQ4jlG1hZPtF3y8 lJh8nZwSCF/k44G1/K1U3NCUgKXeH6u2n0cLC4H4fBNFINFu5vOV1znCrT7RoqAcyNW/ QVYhyNuKNd0CHWItvxwSbgXQO+3MdDFh7EO9RTo8JC2rfjDzZCD5BQ3xlOfq4EG9QZxF TJlw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 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 (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id y30si399099qtd.108.2018.01.15.20.00.50; Mon, 15 Jan 2018 20:00:50 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 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 6D2B361732; Tue, 16 Jan 2018 04:00:50 +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=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL 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 9965161104; Tue, 16 Jan 2018 04:00:19 +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 EEFBC60AFA; Tue, 16 Jan 2018 04:00:15 +0000 (UTC) Received: from forward102j.mail.yandex.net (forward102j.mail.yandex.net [5.45.198.243]) by lists.linaro.org (Postfix) with ESMTPS id 66D6360AFA for ; Tue, 16 Jan 2018 04:00:12 +0000 (UTC) Received: from mxback9g.mail.yandex.net (mxback9g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:170]) by forward102j.mail.yandex.net (Yandex) with ESMTP id E592B5602BAE for ; Tue, 16 Jan 2018 07:00:10 +0300 (MSK) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [2a02:6b8:0:1a2d::26]) by mxback9g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 9lzIFeXgCa-0Ame8L1a; Tue, 16 Jan 2018 07:00:10 +0300 Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 81Z67MVIpB-0A7WLEBL; Tue, 16 Jan 2018 07:00:10 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Tue, 16 Jan 2018 07:00:07 +0300 Message-Id: <1516075208-29652-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516075208-29652-1-git-send-email-odpbot@yandex.ru> References: <1516075208-29652-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 390 Subject: [lng-odp] [PATCH v1 1/2] build: provide an option to link examples dynamically 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 Distributions won't like statically-linked binaries. Provide configure switch to link examples and tests dynamically. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 390 (lumag:dynamic-link-tests) ** https://github.com/Linaro/odp/pull/390 ** Patch: https://github.com/Linaro/odp/pull/390.patch ** Base sha: 6c0942658b564835e200def502c053f63d55c400 ** Merge commit sha: dac929931c77d467994eb01c80e0e841045390d6 **/ configure.ac | 11 +++++++++++ example/Makefile.inc | 4 ++++ platform/linux-generic/test/ring/Makefile.am | 5 +++++ test/Makefile.inc | 4 ++++ 4 files changed, 24 insertions(+) diff --git a/configure.ac b/configure.ac index 177881a58..3242c453c 100644 --- a/configure.ac +++ b/configure.ac @@ -172,6 +172,16 @@ AS_IF([test "${with_platform}" = "linux-generic"], AC_DEFINE_UNQUOTED([IMPLEMENTATION_NAME], ["$IMPLEMENTATION_NAME"], [Define to the name of the implementation]) +########################################################################## +# Build examples/tests dynamically +########################################################################## +AC_ARG_ENABLE([static-tests], + [AS_HELP_STRING([--disable-static-tests], + [disable static linking of examples and tests] + [ with ODP])], [], + [enable_static_tests=yes]) +AM_CONDITIONAL([STATIC_LINK], [test "x$enable_static_tests" != "xno"]) + ########################################################################## # Include m4 files ########################################################################## @@ -383,6 +393,7 @@ AC_MSG_RESULT([ Deprecated APIs: ${deprecated} debug: ${enable_debug} cunit: ${cunit_support} + static tests linkage: ${enable_static_tests} test_vald: ${test_vald} test_perf: ${test_perf} test_perf_proc: ${test_perf_proc} diff --git a/example/Makefile.inc b/example/Makefile.inc index fa1224338..829977ce8 100644 --- a/example/Makefile.inc +++ b/example/Makefile.inc @@ -13,4 +13,8 @@ AM_CFLAGS = \ -I$(top_srcdir)/platform/@with_platform@/arch/@ARCH_DIR@ \ -I$(top_builddir)/include +if STATIC_LINK AM_LDFLAGS = -L$(LIB) -static +else +AM_LDFLAGS = +endif diff --git a/platform/linux-generic/test/ring/Makefile.am b/platform/linux-generic/test/ring/Makefile.am index 8287c7e04..637d08e6a 100644 --- a/platform/linux-generic/test/ring/Makefile.am +++ b/platform/linux-generic/test/ring/Makefile.am @@ -1,3 +1,7 @@ +# ring test uses internal symbols from libodp-linux which are not available +# when linking test with libodp-linux.so +if STATIC_LINK + include $(top_srcdir)/test/Makefile.inc test_PROGRAMS = ring_main @@ -7,3 +11,4 @@ ring_main_SOURCES = \ ring_basic.c ring_stress.c PRELDADD += $(LIBCUNIT_COMMON) +endif diff --git a/test/Makefile.inc b/test/Makefile.inc index b0a8749dc..81854e262 100644 --- a/test/Makefile.inc +++ b/test/Makefile.inc @@ -28,7 +28,11 @@ AM_CPPFLAGS = $(INCFLAGS) AM_CPPFLAGS += -I$(top_srcdir)/test/common AM_CFLAGS = $(CUNIT_CFLAGS) +if STATIC_LINK AM_LDFLAGS = -L$(LIB) -static +else +AM_LDFLAGS = +endif @VALGRIND_CHECK_RULES@ From patchwork Tue Jan 16 04:00:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 124609 Delivered-To: patch@linaro.org Received: by 10.46.64.148 with SMTP id r20csp880694lje; Mon, 15 Jan 2018 20:01:28 -0800 (PST) X-Google-Smtp-Source: ACJfBosUygm1sBq7g/Zouu4DY0oxxJJcARQaqUC9IYngYYqrMNRc3jeWIemCpI4H4BOzDvhwFGJq X-Received: by 10.55.112.132 with SMTP id l126mr4707672qkc.63.1516075288206; Mon, 15 Jan 2018 20:01:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516075288; cv=none; d=google.com; s=arc-20160816; b=B6cNKDhUFY2P6QqWXphYYPrwm2UwyM4RrcYPp3Uf67iRlVOjGg5QYHXkOk5hx3DRZ/ +U2DSrqvQIfQDfERZAYM73kh0tUxwYUaR/41X7TQrALiM5402tViEiUUACPRWxgoeu6P 2ieQPmTjPt6RM4uZWY1YPIXhs3WidqBy9qhrawC9ht4kEGvO1MM5ZRWyiukbjaJblFYg 547l1Ssd7zTU0g7HAh+BHe9LhKXi2MJcO3amckvp4zH5QiFwqOOf9fRdmi40quaI9siX Uy3JSzUPmbfNKuGSsRAKzJWoPYt7ag/CMPuq5E6MAgU3Llzb2LovEprfugE7yDlskCHU sU/g== 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=DuoObjo8tfYca55kcG+cnqn9PWpMrwX4Qc9prropsFg=; b=QnBlgbODV40p4qrIRb97+7myhy9XfaXSrW/XDwa84Mq2USdQhkgN72cuOtWgV+ay1T eXfLmPwVQcIxPHaR3ySskWhx3ohSQMn8qAe3l2Ue86DhibaZD8CdL5x7nkuIO+TUQ3DO Qzp+ETzrwNzyU1nnhQ6vpL9S9sRBkuqcgou31HDdYsR2CRq/sGVT2pXxEeRokkRGURTV ckcpiR7PwvoQAcThQF7JDr+e76UuBuN8GqNoHV2GUrxv5Q5SKI3TR5V7vyz0knCpQoLH yb/jk/Q404ZBIsVSQJAyLQ6h+Xtf8avYiaWlX6QKN7HTHX5MdzJk0q3PXm+Rj+tlVfq+ 1X+A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 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 (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id y50si1368169qtc.329.2018.01.15.20.01.27; Mon, 15 Jan 2018 20:01:28 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 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 CC0ED6151C; Tue, 16 Jan 2018 04:01:27 +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=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL 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 1649B61511; Tue, 16 Jan 2018 04:00:23 +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 7FD2B60AFA; Tue, 16 Jan 2018 04:00:16 +0000 (UTC) Received: from forward103j.mail.yandex.net (forward103j.mail.yandex.net [5.45.198.246]) by lists.linaro.org (Postfix) with ESMTPS id EFCD160C5E for ; Tue, 16 Jan 2018 04:00:12 +0000 (UTC) Received: from mxback9o.mail.yandex.net (mxback9o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::23]) by forward103j.mail.yandex.net (Yandex) with ESMTP id 9937234C2E73 for ; Tue, 16 Jan 2018 07:00:11 +0300 (MSK) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [2a02:6b8:0:1a2d::26]) by mxback9o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id x94k3u7TfE-0BAWr39M; Tue, 16 Jan 2018 07:00:11 +0300 Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 81Z67MVIpB-0A7WNk3t; Tue, 16 Jan 2018 07:00:10 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Tue, 16 Jan 2018 07:00:08 +0300 Message-Id: <1516075208-29652-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516075208-29652-1-git-send-email-odpbot@yandex.ru> References: <1516075208-29652-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 390 Subject: [lng-odp] [PATCH v1 2/2] travis: run tests with dynamically-linked tests 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 Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 390 (lumag:dynamic-link-tests) ** https://github.com/Linaro/odp/pull/390 ** Patch: https://github.com/Linaro/odp/pull/390.patch ** Base sha: 6c0942658b564835e200def502c053f63d55c400 ** Merge commit sha: dac929931c77d467994eb01c80e0e841045390d6 **/ .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index fa352b572..a70df39d5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -74,6 +74,7 @@ env: - CONF="--enable-schedule-iquery" - CONF="--enable-schedule-scalable" - CONF="--enable-dpdk-zero-copy" + - CONF="--disable-static-tests" - CROSS_ARCH="arm64" - CROSS_ARCH="armhf" CFLAGS="-march=armv7-a" - CROSS_ARCH="powerpc"