From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id C4F052B98; Tue, 31 Jan 2017 11:58:15 +0100 (CET) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP; 31 Jan 2017 02:58:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,314,1477983600"; d="scan'208";a="59164914" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.38]) ([10.237.220.38]) by orsmga005.jf.intel.com with ESMTP; 31 Jan 2017 02:58:13 -0800 To: Jerin Jacob References: <1484207214-13638-1-git-send-email-jerin.jacob@caviumnetworks.com> <6167bd74-c515-fc12-744d-9168a633c646@intel.com> <20170113032155.GA31838@localhost.localdomain> <2563842.f8ghPspXGG@xps13> <55b009ac-8186-12fe-43b2-b937dc32b8eb@intel.com> <20170113160124.GA17956@localhost.localdomain> <45b10ccc-d9f8-c762-3590-c9997319def0@intel.com> Cc: Thomas Monjalon , dev@dpdk.org, stable@dpdk.org From: Ferruh Yigit Message-ID: <5ee6cd3f-3395-5932-56c9-fac613df92e4@intel.com> Date: Tue, 31 Jan 2017 10:58:12 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <45b10ccc-d9f8-c762-3590-c9997319def0@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] app/testpmd: fix static build link ordering X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2017 10:58:16 -0000 On 1/13/2017 4:12 PM, Ferruh Yigit wrote: > On 1/13/2017 4:01 PM, Jerin Jacob wrote: >> On Fri, Jan 13, 2017 at 03:57:59PM +0000, Ferruh Yigit wrote: >>> On 1/13/2017 3:53 PM, Thomas Monjalon wrote: >>>> 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? >>>> >>> >>> LDLIBS should be OK, as long as wrapped with SHARED check. Is following >>> not working: >> >> No, due to the following line >> mk/rte.app.mk:LDLIBS += $(_LDLIBS-y) $(CPU_LDLIBS) $(EXTRA_LDLIBS) >> >> Again -lrte_pmd_ixgbe comes first. > > You are right. After second thought. -lrte_pmd_ixgbe coming first is problem for static compilation, but these libraries used only for dynamic compilation. And locations shouldn't matter with dynamic compilation. Can you please try converting to the following, that should work: +ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y) +ifeq ($(CONFIG_RTE_LIBRTE_IXGBE_PMD),y) +LDLIBS += -lrte_pmd_ixgbe +endif +endif I will send a patch for this. > > No objection to initial proposal. >