From patchwork Thu Jan 18 23:00:19 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: 125058 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp34095ljf; Thu, 18 Jan 2018 15:03:54 -0800 (PST) X-Google-Smtp-Source: ACJfBouz9duY5AjvtjCipMcbVDKjS0cwIlMtp0xaKVz2hJyo81CwWBYTaWrw+IMRfJkfmeBTa3E+ X-Received: by 10.200.42.18 with SMTP id k18mr9114885qtk.150.1516316634111; Thu, 18 Jan 2018 15:03:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516316634; cv=none; d=google.com; s=arc-20160816; b=ZXPeYrz4q1Djni0rSvYbgIn4Xqhea7pIuES64UjzhhJHRY7Y0/aGXfCVqmkR8Aa3jh YpdnoBLPeup8gHE+SNCkYrv8dxlAbpjloqPec66nY9cELSSJvDPxp17tf5+gTlbSU2mG sXW+xWHV8/AXXf9NXtOKJRovVv3ymZOnICsbe7F0ZGDv61bxjLMoHkT+NZfJHeca1XN0 AznCQ5tLUjMU0HIpfa2mCZNiaEMSoFnFvA0j4DAnoTk1UiK4olblYdw0lmp+lPcC8uCX uSU/d+GB17QiD2dNe7jImNHZo+WQRMb7SrcDQ6dZck9Vt/vMzcCXO4/XrVeZSPU/qpok Df6A== 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=hyut+qcm/NpHToNIwoDkLiPykJJkd96vpiWiUeIdLZw=; b=PqIHPcMuDh2WCPAw3+xvDExbKpf3Rs6KiRuW4+FpM0tE6KzQ+iFF0wb13+pVSomEyt znHZg7bmgYylUEG63kMyp2DMQY/w/W4Jq0G8A54SB66tUJcp3VOee1AxgDgQpLL/QBgb cgIZE7ILRkLxe8iR7Rnp7yEWwjYAtazyBahyfON7mDMM5jUdEQSXIwMtETHfIgNIUzC1 6leEZMcMo+2pdI15ZMdJ7frH8LOGfbaqK/3Cyd/nItGJwS8/r4iskRZyR0pjEPrOePXD bB1CBRDH37ytz5neB4t+mzX7Jtda3WmoZnNH9OuRxp3gZdDBcEBDn441kmEQFsxU8g4m AM4A== 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 n66si3022496qka.363.2018.01.18.15.03.53; Thu, 18 Jan 2018 15:03:54 -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 CD855617AA; Thu, 18 Jan 2018 23:03:53 +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 8493D617D2; Thu, 18 Jan 2018 23:02:40 +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 341AD6172F; Thu, 18 Jan 2018 23:02:29 +0000 (UTC) Received: from forward100o.mail.yandex.net (forward100o.mail.yandex.net [37.140.190.180]) by lists.linaro.org (Postfix) with ESMTPS id 754C261792 for ; Thu, 18 Jan 2018 23:02:14 +0000 (UTC) Received: from mxback12g.mail.yandex.net (mxback12g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:91]) by forward100o.mail.yandex.net (Yandex) with ESMTP id 810A02A21396 for ; Fri, 19 Jan 2018 02:02:08 +0300 (MSK) Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:7]) by mxback12g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id IrUY7kzKOj-28XWnnCg; Fri, 19 Jan 2018 02:02:08 +0300 Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id dngx7RWyZH-21qmdaUe; Fri, 19 Jan 2018 02:02:01 +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: Fri, 19 Jan 2018 02:00:19 +0300 Message-Id: <1516316420-16628-6-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516316420-16628-1-git-send-email-odpbot@yandex.ru> References: <1516316420-16628-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 402 Subject: [lng-odp] [PATCH v2 5/6] build: another fix for linking with shared libdpdk 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 402 (lumag:travis-upd) ** https://github.com/Linaro/odp/pull/402 ** Patch: https://github.com/Linaro/odp/pull/402.patch ** Base sha: 5a4502fc6bc53e6503169da3028f456b64811a0b ** Merge commit sha: 3d02540f1ad3c03edc8b784bf0f92b86d9b756a1 **/ m4/odp_dpdk.m4 | 20 ++++++++++++++------ platform/linux-generic/Makefile.am | 2 +- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/m4/odp_dpdk.m4 b/m4/odp_dpdk.m4 index 1887b0431..315a2fc4d 100644 --- a/m4/odp_dpdk.m4 +++ b/m4/odp_dpdk.m4 @@ -17,18 +17,28 @@ AS_VAR_APPEND([DPDK_PMDS], [--no-whole-archive]) # _ODP_DPDK_SET_LIBS # -------------------- -# Set DPDK_LIBS/DPDK_LIBS_LT depending on DPDK setup +# Set DPDK_LIBS/DPDK_LIBS_LT/DPDK_LIBS_LIBODP depending on DPDK setup AC_DEFUN([_ODP_DPDK_SET_LIBS], [dnl AS_IF([test "x$DPDK_SHARED" = "xyes"], [dnl - DPDK_LIBS_LT="" + # applications don't need to be linked to anything, just rpath + DPDK_LIBS_LT="$DPDK_RPATH_LT" + # static linking flags will need -ldpdk DPDK_LIBS="$DPDK_LDFLAGS $DPDK_RPATH $DPDK_LIBS" + # link libodp-linux with -ldpdk + DPDK_LIBS_LIBODP="$DPDK_LDFLAGS $DPDK_LIBS" ], [dnl ODP_DPDK_PMDS([$DPDK_PMD_PATH]) + # build long list of libraries for applications, which should not be + # rearranged by libtool DPDK_LIBS_LT="`echo $DPDK_LIBS | sed -e 's/^/-Wc,/' -e 's/ /,/g'`" DPDK_LIBS_LT="$DPDK_LDFLAGS $DPDK_PMDS $DPDK_LIBS_LT $DPDK_LIBS" + # static linking flags follow the suite DPDK_LIBS="$DPDK_LDFLAGS $DPDK_PMDS $DPDK_LIBS" + # link libodp-linux with libtool linking flags + DPDK_LIBS_LIBODP="$DPDK_LIBS_LT" ]) AC_SUBST([DPDK_LIBS]) +AC_SUBST([DPDK_LIBS_LIBODP]) AC_SUBST([DPDK_LIBS_LT]) ]) @@ -99,7 +109,6 @@ AC_DEFUN([ODP_DPDK], [dnl AS_IF([test "x$1" = "xsystem"], [dnl DPDK_CPPFLAGS="-isystem/usr/include/dpdk" DPDK_LDFLAGS="" - DPDK_RPATH="" DPDK_LIB_PATH="`$CC --print-file-name=libdpdk.so`" if test "x$DPDK_LIB_PATH" = "x" ; then DPDK_LIB_PATH="`$CC --print-file-name=libdpdk.a`" @@ -115,10 +124,9 @@ AS_IF([test "x$1" = "xsystem"], [dnl DPDK_LDFLAGS="-L$DPDK_LIB_PATH" DPDK_PMD_PATH="$DPDK_LIB_PATH" if test -r "$DPDK_LIB_PATH"/libdpdk.so ; then - DPDK_RPATH="-R$DPDK_LIB_PATH" + DPDK_RPATH="-Wl,-rpath,$DPDK_LIB_PATH" + DPDK_RPATH_LT="-R$DPDK_LIB_PATH" DPDK_SHARED=yes - else - DPDK_RPATH= fi ]) _ODP_DPDK_CHECK([$DPDK_CPPFLAGS], [$DPDK_LDFLAGS], [$2], [$3]) diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 9b7ee37e5..3abf765b5 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -271,7 +271,7 @@ endif __LIB__libodp_linux_la_LIBADD = $(ATOMIC_LIBS) __LIB__libodp_linux_la_LIBADD += $(OPENSSL_LIBS) -__LIB__libodp_linux_la_LIBADD += $(DPDK_LIBS_LT) +__LIB__libodp_linux_la_LIBADD += $(DPDK_LIBS_LIBODP) __LIB__libodp_linux_la_LIBADD += $(PTHREAD_LIBS) __LIB__libodp_linux_la_LIBADD += $(TIMER_LIBS)