From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id CB85C5A44 for ; Mon, 1 May 2017 22:10:40 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 6CD2C206CA; Mon, 1 May 2017 16:10:40 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Mon, 01 May 2017 16:10:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=fUA gkO2ONCsWFqjQKp0ITwKSunJFKhB3y/MPRj7OAAs=; b=lJ6bnygUufQbsHJfjX7 RGU+cFC4ST5AH7skFFNWbxyHscYoezbZcWUULFe3ZZHFsuEQ2AQEeF1l7ejSMGtZ uNn2vN634Ikc1+M3dVEtVw1I3jmBmgvWevQmijKlHAAo+vxD4ND0iitpOq9Cp584 PQKQzHXEikWB55CHUsuRBzoU= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=fm1; bh=fUAgkO2ONCsWFqjQKp0ITwKSunJFKhB3y/MPRj7OA As=; b=Gen8KjvsG7kl4FodB+RK1LMviCCQciFv0MQySTUXMfuwga+MR4R1WxiwW D9XXf3hBqCAEeFrL9BbG+jThP1YXg6zcBWhHrpqRSwIjXPqE1a182svuME37b2MS LkuZoLgae5U5Dkm11X7mPrAOpcCzs1b81Z74CnSwBvzvsF9TTSVV01QT2ylJrCf4 WhGU/3f9yxVlJyr2V6R+rkA1nrxcMDHz7k6sY/V9Drttv9654YPElcqCLbtQWNkh CYB0UemfX4/9h7eUkmjBtcYkYJVR69yA3TxQzEbUAns8dW6llFlTTYxMIMRv72E1 TsejAL9Za+iKjytFkNjge2e0eHYwA== X-ME-Sender: X-Sasl-enc: KCQ//7/gS8G5sSy/Ajlns+ix4LMSJJfsDXLOtgz3BxJW 1493669440 Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id DCF7824050; Mon, 1 May 2017 16:10:39 -0400 (EDT) From: Thomas Monjalon To: Markos Chandras Cc: dev@dpdk.org Date: Mon, 1 May 2017 22:10:32 +0200 Message-Id: <20170501201032.24028-1-thomas@monjalon.net> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170216161731.4590-1-mchandras@suse.de> References: <20170216161731.4590-1-mchandras@suse.de> Subject: [dpdk-dev] [PATCH v2] examples/ethtool: fix link with ixgbe shared lib X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 May 2017 20:10:41 -0000 From: Markos Chandras When RTE_DEVEL_BUILD is unset, -rpath is unset. So the ethtool app cannot link with ixgbe shared library which is required by ethtool lib: warning: librte_pmd_ixgbe.so.1, needed by examples/ethtool/lib/x86_64-native-linuxapp-gcc/lib/librte_ethtool.so, not found (try using -rpath or -rpath-link) It is fixed by adding the library in the application link. The library link is also improved to specify that this explicit link to ixgbe is needed only in the shared lib mode. Fixes: 077d223e25c3 ("examples/ethtool: use ixgbe public function") Signed-off-by: Markos Chandras Acked-by: Remy Horton Acked-by: Timothy Redaelli Signed-off-by: Thomas Monjalon --- v2: add condition on CONFIG_RTE_BUILD_SHARED_LIB --- examples/ethtool/ethtool-app/Makefile | 5 +++++ examples/ethtool/lib/Makefile | 2 ++ 2 files changed, 7 insertions(+) diff --git a/examples/ethtool/ethtool-app/Makefile b/examples/ethtool/ethtool-app/Makefile index 09c66ad19..96abf53b2 100644 --- a/examples/ethtool/ethtool-app/Makefile +++ b/examples/ethtool/ethtool-app/Makefile @@ -50,5 +50,10 @@ CFLAGS += $(WERROR_FLAGS) LDLIBS += -L$(subst ethtool-app,lib,$(RTE_OUTPUT))/lib LDLIBS += -lrte_ethtool +ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y) +ifeq ($(CONFIG_RTE_LIBRTE_IXGBE_PMD),y) +LDLIBS += -lrte_pmd_ixgbe +endif +endif include $(RTE_SDK)/mk/rte.extapp.mk diff --git a/examples/ethtool/lib/Makefile b/examples/ethtool/lib/Makefile index 197c1d6f5..266babade 100644 --- a/examples/ethtool/lib/Makefile +++ b/examples/ethtool/lib/Makefile @@ -54,8 +54,10 @@ SRCS-y := rte_ethtool.c CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y) ifeq ($(CONFIG_RTE_LIBRTE_IXGBE_PMD),y) LDLIBS += -lrte_pmd_ixgbe endif +endif include $(RTE_SDK)/mk/rte.extlib.mk -- 2.12.2