From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] app/testpmd: fix static build link ordering Date: Fri, 13 Jan 2017 16:53:46 +0100 Message-ID: <2563842.f8ghPspXGG@xps13> References: <1484207214-13638-1-git-send-email-jerin.jacob@caviumnetworks.com> <6167bd74-c515-fc12-744d-9168a633c646@intel.com> <20170113032155.GA31838@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: Ferruh Yigit , dev@dpdk.org, stable@dpdk.org To: Jerin Jacob Return-path: Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by dpdk.org (Postfix) with ESMTP id E5DF5AB08 for ; Fri, 13 Jan 2017 16:53:47 +0100 (CET) Received: by mail-wm0-f44.google.com with SMTP id r126so70890109wmr.0 for ; Fri, 13 Jan 2017 07:53:47 -0800 (PST) In-Reply-To: <20170113032155.GA31838@localhost.localdomain> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2017-01-13 08:51, Jerin Jacob: > On Thu, Jan 12, 2017 at 03:27:30PM +0000, Ferruh Yigit wrote: > > On 1/12/2017 1:58 PM, Jerin Jacob wrote: > > > On Thu, Jan 12, 2017 at 10:26:08AM +0100, Thomas Monjalon wrote: > > >> 2017-01-12 13:16, Jerin Jacob: > > >>> +ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y) > > >>> _LDLIBS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += -lrte_pmd_ixgbe > > >>> +endif > > >> > > >> _LDLIBS is an internal variable of rte.app.mk. > > >> Please could you check that there is no issue when using LDLIBS instead > > >> of _LDLIBS? > > > > LDLIBS is not helping the situation as LDLIBS comes before the _LDLIBS-y > mk/rte.app.mk:LDLIBS += $(_LDLIBS-y) $(CPU_LDLIBS) $(EXTRA_LDLIBS) > > But moving to EXTRA_LDLIBS looks OK.But it has to be under CONFIG_RTE_LIBRTE_IXGBE_PMD > > Thomas, Ferruh > Let me know if you have any objection on below mentioned diff > > -ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y) > -_LDLIBS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += -lrte_pmd_ixgbe > +ifeq ($(CONFIG_RTE_LIBRTE_IXGBE_PMD),y) > +EXTRA_LDLIBS += -lrte_pmd_ixgbe > endif You need to keep the shared lib check. Anyway, EXTRA_LDLIBS should be reserved to users and not used in a Makefile. I prefer your initial patch using _LDLIBS. Any objection to merge initial proposal?