From patchwork Tue Jan 16 15:00:23 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: 124731 Delivered-To: patch@linaro.org Received: by 10.46.64.148 with SMTP id r20csp1043404lje; Tue, 16 Jan 2018 07:04:41 -0800 (PST) X-Google-Smtp-Source: ACJfBotm1hZztKhHXnbfjfelwQBGVS/QqX3oBjPO8CY0JAPHnqOoEYr5ThxadWrhYcTU2A+QCkiq X-Received: by 10.237.41.69 with SMTP id s63mr10434607qtd.218.1516115081039; Tue, 16 Jan 2018 07:04:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516115081; cv=none; d=google.com; s=arc-20160816; b=0n1sPcSuFMmDtP/FrPPT2l74mEqsgUhJ6w0rzQjPxfMsoxLFys+clpVm/rgwVor8Ig qeM3XL744eLcHdOcLHb/oaey0Ws1owULMZYaLDL7dUYRW98uPFsKBeXPDKtjgWCJ5WZj Tm1Pboam3VqVqRankDKcXzSyxDLtQlf+xfKIGWkd7/tTAeVBpiucpw8SZqMYOvlktboL qd/W3QcPsAfFFl051V3DwxEsH1tfbgQG/bg8IdnW/8R+5G8lEN/8s/ZXRMlvYBDRS+Db Jo9cyXa+wNob1mRNO3w1uF261beWv9bqFNo9gUlgAiiQSExwYgBOk4U+/hojAQjj6vXL b2gw== 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=j+W10S4EUrTtRzV/Ze9AtQqkWAr8KaRrnksXavo533M=; b=SWnMBXNNNeOjWUYeafSZqRHyyMIrJC2QrJ3zXadvS9tXogohI/+I0K4BPy2W1YIM+S +Cr0o2h9e9lQ8RNDRE74oLIXV7xKirFHh+IuiHH5iKQ+wbELwT+zhSSAGf9woqKcWqqT K0urv5YPyIy1SVLyZZIC/0/P3eclrBZgkxpwwkZoJqEpwgFAS+Q3ny1Qrf/KXkF4t314 3c3Mj1oKz+XlcWDiKOD/+otiq6JqtR14dGeRu3HE+4b3wUL8PJCW0/R7N/uJevisFL7L wFPoAIzFvqRpqSCeULv3JNi3n0ea9q1/6u4yEepJ1lSPEv3Npw8B2/uUYbVauPVqb7kH nJHw== 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 j35si2397393qtk.363.2018.01.16.07.04.40; Tue, 16 Jan 2018 07:04:41 -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 AE76A617E4; Tue, 16 Jan 2018 15:04:40 +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_H2 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 C93BA617FD; Tue, 16 Jan 2018 15:00:58 +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 D09F8617D4; Tue, 16 Jan 2018 15:00:32 +0000 (UTC) Received: from forward105p.mail.yandex.net (forward105p.mail.yandex.net [77.88.28.108]) by lists.linaro.org (Postfix) with ESMTPS id E9442617D4 for ; Tue, 16 Jan 2018 15:00:28 +0000 (UTC) Received: from mxback9j.mail.yandex.net (mxback9j.mail.yandex.net [IPv6:2a02:6b8:0:1619::112]) by forward105p.mail.yandex.net (Yandex) with ESMTP id 0CBCA4083B24 for ; Tue, 16 Jan 2018 18:00:26 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback9j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id z1UAp7aVLx-0PYGmVIK; Tue, 16 Jan 2018 18:00:26 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id I8GBs6aG5N-0PhCuSsD; Tue, 16 Jan 2018 18:00:25 +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 18:00:23 +0300 Message-Id: <1516114824-5567-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516114824-5567-1-git-send-email-odpbot@yandex.ru> References: <1516114824-5567-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 390 Subject: [lng-odp] [PATCH v2 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: 520c170d758f2d37554631bf1467ec50e027cd3e ** Merge commit sha: 99e3ea3ce3180085458e6433d371763dec004329 **/ configure.ac | 11 +++++++++++ example/Makefile.inc | 4 ++++ platform/linux-generic/test/ring/Makefile.am | 5 +++++ test/Makefile.inc | 11 ++++++++++- 4 files changed, 30 insertions(+), 1 deletion(-) 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..91c278302 100644 --- a/test/Makefile.inc +++ b/test/Makefile.inc @@ -11,9 +11,14 @@ LIBTHRMASK_COMMON = $(COMMON_DIR)/libthrmask_common.la #in the following line, the libs using the symbols should come before #the libs containing them! The includer is given a chance to add things #before libodp by setting PRELDADD before the inclusion. -LDADD = $(PRELDADD) $(LIBODP) $(DPDK_LIBS_LT) +LDADD = $(PRELDADD) $(LIBODP) PRELDADD = +# Do not link to DPDK twice in case of dynamic linking with ODP +if STATIC_LINK +LDADD += $(DPDK_LIBS_LT) +endif + INCFLAGS = \ -I$(top_builddir)/platform/@with_platform@/include \ -I$(top_srcdir)/helper/include \ @@ -28,7 +33,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 15:00:24 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: 124732 Delivered-To: patch@linaro.org Received: by 10.46.64.148 with SMTP id r20csp1043600lje; Tue, 16 Jan 2018 07:05:14 -0800 (PST) X-Google-Smtp-Source: ACJfBov1ecNc/9heU8U/IrfjjpsRwo0suB+/TirDIdBV22l8ufWFHUgkUj/VdJfh0MIrmqNaMUSS X-Received: by 10.233.223.71 with SMTP id t68mr21979315qkf.326.1516115114328; Tue, 16 Jan 2018 07:05:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516115114; cv=none; d=google.com; s=arc-20160816; b=kfMQjg9MEzOUx/dxZ/G36k2J1koISm376hnZLClWUyUNE5ePj4SrLljLkgOAnx3D7A E9exGqgqjDU3MYAYXUxU0ClDyKqKWpaBZdA8aQBmlCHFJeYxtveMKp9jWaZdyx4g7Vx0 W9e2q44jIAhl7mHCdK/9AhGgkBTChjANRP6vnmhLK4zmaeRHYzGm0xybMx/hxWKn45M3 SuWsQirMUaigsjyAgoJl9mzMaXKzpRGaEeUJi5j7O+TGmWg9K6XVGkaePnAARcmO6tPq qH9q6llJcaERQ1euz0oslD7Hi/W+jPxnOLpqK2jrYUYo1HfxFaVaGaG1pZAr4GmT80yS iVXw== 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=TBeT7WgQeGxry4byaAqtwRiBGt6+aPaNS4quZPfsvzU=; b=Xf7mQSIXY0d9FKooCDeznIpgHqAFAe9mtvXNFxQ14gQ6G+t4rsaaVMg3hDoM3OsqAy fjLp6bFG+hZCjWYxZeL5XVb5oxKzABSXR5PqAKmt+e8BJbDWxnkPkuE9G/SrXHNy1ppG YjQDCxeOygbOgSFMSQIT7SJKqovWtpSJnMQKzkb/VnhjUe7wF/8VeacA2IqM0hM7EBbc o+7tLJ1IidE4aL3RWT9CQveOuJxN3OtMsqxAACWcumADUeqAV0wDz2PAJPdaMdKaDRBK 1+FLGpGhRDajJnA0J7AxBERezloyGMN070NsQMzdjUTSWLwmI5wYNR7gkYaiIpZTkpfQ FvHg== 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 m18si1940603qke.333.2018.01.16.07.05.14; Tue, 16 Jan 2018 07:05:14 -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 0E593617DE; Tue, 16 Jan 2018 15:05:14 +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_H2 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 1C2C961801; Tue, 16 Jan 2018 15:01:06 +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 38221617E0; Tue, 16 Jan 2018 15:00:34 +0000 (UTC) Received: from forward103p.mail.yandex.net (forward103p.mail.yandex.net [77.88.28.106]) by lists.linaro.org (Postfix) with ESMTPS id D4D99617CF for ; Tue, 16 Jan 2018 15:00:27 +0000 (UTC) Received: from mxback10o.mail.yandex.net (mxback10o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::24]) by forward103p.mail.yandex.net (Yandex) with ESMTP id AEC0B21817B3 for ; Tue, 16 Jan 2018 18:00:26 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback10o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id KWOzx1XCf3-0Q3OIX4J; Tue, 16 Jan 2018 18:00:26 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id I8GBs6aG5N-0Qh80RaM; Tue, 16 Jan 2018 18:00:26 +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 18:00:24 +0300 Message-Id: <1516114824-5567-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516114824-5567-1-git-send-email-odpbot@yandex.ru> References: <1516114824-5567-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 390 Subject: [lng-odp] [PATCH v2 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: 520c170d758f2d37554631bf1467ec50e027cd3e ** Merge commit sha: 99e3ea3ce3180085458e6433d371763dec004329 **/ .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"