From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by dpdk.org (Postfix) with ESMTP id 4F76A5A3E for ; Thu, 16 Feb 2017 17:17:51 +0100 (CET) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id CC7E6ACB0 for ; Thu, 16 Feb 2017 16:17:50 +0000 (UTC) From: Markos Chandras To: dev@dpdk.org Cc: Markos Chandras , Nirmoy Das Date: Thu, 16 Feb 2017 16:17:31 +0000 Message-Id: <20170216161731.4590-1-mchandras@suse.de> X-Mailer: git-send-email 2.11.0 Subject: [dpdk-dev] [PATCH] examples: ethtool: Link against librte_pmd_ixgbe if necessary 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: Thu, 16 Feb 2017 16:17:51 -0000 The librte_ethtool library depends on librte_pmd_ixgbe if that pmd driver is enabled so we need to link against it when we compile the ethtool application. It fixes the following build problem: /usr/lib64/gcc/x86_64-suse-linux/6/../../../../x86_64-suse-linux/bin/ld: warning: librte_pmd_ixgbe.so.1, needed by /home/abuild/rpmbuild/BUILD/ dpdk-17.02/examples/ethtool/lib/x86_64-native-linuxapp-gcc/lib/ librte_ethtool.so, not found (try using -rpath or -rpath-link) /home/abuild/rpmbuild/BUILD/dpdk-17.02/examples/ethtool/lib/ x86_64-native-linuxapp-gcc/lib/librte_ethtool.so: undefined reference to `rte_pmd_ixgbe_set_vf_rxmode@DPDK_17.02' collect2: error: ld returned 1 exit status Cc: Nirmoy Das Signed-off-by: Markos Chandras --- examples/ethtool/ethtool-app/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/ethtool/ethtool-app/Makefile b/examples/ethtool/ethtool-app/Makefile index 09c66ad19..9382ca7c3 100644 --- a/examples/ethtool/ethtool-app/Makefile +++ b/examples/ethtool/ethtool-app/Makefile @@ -50,5 +50,8 @@ CFLAGS += $(WERROR_FLAGS) LDLIBS += -L$(subst ethtool-app,lib,$(RTE_OUTPUT))/lib LDLIBS += -lrte_ethtool +ifeq ($(CONFIG_RTE_LIBRTE_IXGBE_PMD),y) +LDLIBS += -lrte_pmd_ixgbe +endif include $(RTE_SDK)/mk/rte.extapp.mk -- 2.11.0