Message ID | 1414078604-1090-1-git-send-email-sergio.gonzalez.monroy@intel.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 8FAC47E9D; Thu, 23 Oct 2014 17:28:25 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 5A0007E99 for <dev@dpdk.org>; Thu, 23 Oct 2014 17:28:23 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 23 Oct 2014 08:31:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,775,1406617200"; d="scan'208";a="610033738" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga001.fm.intel.com with ESMTP; 23 Oct 2014 08:36:46 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id s9NFajxS024651 for <dev@dpdk.org>; Thu, 23 Oct 2014 16:36:45 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id s9NFaiaK001129 for <dev@dpdk.org>; Thu, 23 Oct 2014 16:36:44 +0100 Received: (from smonroy@localhost) by sivswdev02.ir.intel.com with id s9NFaiWc001125 for dev@dpdk.org; Thu, 23 Oct 2014 16:36:44 +0100 From: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com> To: dev@dpdk.org Date: Thu, 23 Oct 2014 16:36:44 +0100 Message-Id: <1414078604-1090-1-git-send-email-sergio.gonzalez.monroy@intel.com> X-Mailer: git-send-email 1.8.5.4 Subject: [dpdk-dev] [PATCH] mk: fix app linking for combined libs X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Sergio Gonzalez Monroy
Oct. 23, 2014, 3:36 p.m. UTC
Building combined shared libraries results in applications being linked
against separeted/individual and combined libs altogether.
Link only against combined lib when the config option is enabled.
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
---
mk/rte.app.mk | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
Comments
> -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Sergio Gonzalez > Monroy > Sent: Thursday, October 23, 2014 4:37 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH] mk: fix app linking for combined libs > > Building combined shared libraries results in applications being linked > against separeted/individual and combined libs altogether. Minor typo in the commit message: "separeted". > > Link only against combined lib when the config option is enabled. > > Signed-off-by: Sergio Gonzalez Monroy > <sergio.gonzalez.monroy@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2014-10-23 16:36, Sergio Gonzalez Monroy: > Building combined shared libraries results in applications being linked > against separeted/individual and combined libs altogether. > > Link only against combined lib when the config option is enabled. > > Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com> [...] > --- a/mk/rte.app.mk > +++ b/mk/rte.app.mk > @@ -217,6 +217,12 @@ endif > > endif # plugins > > +ifeq ($(RTE_BUILD_COMBINE_LIBS),y) > +LDLIBS = --whole-archive You are resetting LDLIBS here. It's not easy to read and probably not desired. I think it would be better to explicitly disable separated libs in this case. > +LDLIBS += --start-group > +LDLIBS += -l$(RTE_LIBNAME) > +endif Thanks
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Friday, November 28, 2014 3:56 PM > > 2014-10-23 16:36, Sergio Gonzalez Monroy: > > Building combined shared libraries results in applications being > > linked against separeted/individual and combined libs altogether. > > > > Link only against combined lib when the config option is enabled. > > > > Signed-off-by: Sergio Gonzalez Monroy > > <sergio.gonzalez.monroy@intel.com> > [...] > > --- a/mk/rte.app.mk > > +++ b/mk/rte.app.mk > > @@ -217,6 +217,12 @@ endif > > > > endif # plugins > > > > +ifeq ($(RTE_BUILD_COMBINE_LIBS),y) > > +LDLIBS = --whole-archive > > You are resetting LDLIBS here. > It's not easy to read and probably not desired. > I think it would be better to explicitly disable separated libs in this case. > Yes, I am resetting LDLIBS so we just link against the combined lib instead of all the previous separated libs. I am not sure I understand what you mean with 'disable separated libs in this case'. Thanks, Sergio > > +LDLIBS += --start-group > > +LDLIBS += -l$(RTE_LIBNAME) > > +endif > > Thanks > -- > Thomas
2014-12-01 09:57, Gonzalez Monroy, Sergio: > > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > 2014-10-23 16:36, Sergio Gonzalez Monroy: > > > Building combined shared libraries results in applications being > > > linked against separeted/individual and combined libs altogether. > > > > > > Link only against combined lib when the config option is enabled. > > > > > > Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com> > > [...] > > > --- a/mk/rte.app.mk > > > +++ b/mk/rte.app.mk > > > @@ -217,6 +217,12 @@ endif > > > > > > endif # plugins > > > > > > +ifeq ($(RTE_BUILD_COMBINE_LIBS),y) > > > +LDLIBS = --whole-archive > > > > You are resetting LDLIBS here. > > It's not easy to read and probably not desired. > > I think it would be better to explicitly disable separated libs in this case. > > > Yes, I am resetting LDLIBS so we just link against the combined lib instead of all the previous separated libs. > I am not sure I understand what you mean with 'disable separated libs in this case'. By "disable separated libs", I mean enclose the LDLIBS lines for separated libs with ifneq ($(RTE_BUILD_COMBINE_LIBS),y) Using ifeq is more explicit than inserting LDLIBS= in the middle of LDLIBS+= lines. Do you agree?
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Monday, December 1, 2014 10:35 AM > > By "disable separated libs", I mean enclose the LDLIBS lines for separated libs > with ifneq ($(RTE_BUILD_COMBINE_LIBS),y) Using ifeq is more explicit than > inserting LDLIBS= in the middle of LDLIBS+= lines. > Do you agree? > That makes sense, I agree it would be easier to read that way. I'll work on a v2. Thanks, Sergio > -- > Thomas
On Thu, Oct 23, 2014 at 04:36:44PM +0100, Sergio Gonzalez Monroy wrote: > Building combined shared libraries results in applications being linked > against separeted/individual and combined libs altogether. > > Link only against combined lib when the config option is enabled. > > Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com> > Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> > > --- > mk/rte.app.mk | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/mk/rte.app.mk b/mk/rte.app.mk > index 285b65c..45444af 100644 > --- a/mk/rte.app.mk > +++ b/mk/rte.app.mk > @@ -217,6 +217,12 @@ endif > > endif # plugins > > +ifeq ($(RTE_BUILD_COMBINE_LIBS),y) > +LDLIBS = --whole-archive > +LDLIBS += --start-group > +LDLIBS += -l$(RTE_LIBNAME) > +endif > + > LDLIBS += $(EXECENV_LDLIBS) > > LDLIBS += --end-group > @@ -240,10 +246,6 @@ build: _postbuild > > exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1)))) > > -ifeq ($(RTE_BUILD_COMBINE_LIBS),y) > -LDLIBS += -l$(RTE_LIBNAME) > -endif > - > ifeq ($(LINK_USING_CC),1) > LDLIBS := $(call linkerprefix,$(LDLIBS)) > LDFLAGS := $(call linkerprefix,$(LDFLAGS)) Acked-by: Neil Horman <nhorman@tuxdriver.com>
2014-12-08 09:53, Neil Horman: > On Thu, Oct 23, 2014 at 04:36:44PM +0100, Sergio Gonzalez Monroy wrote: > > Building combined shared libraries results in applications being linked > > against separeted/individual and combined libs altogether. > > > > Link only against combined lib when the config option is enabled. > > > > Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com> > > Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> [...] > Acked-by: Neil Horman <nhorman@tuxdriver.com> Neil, I didn't noticed your ack which happened after a discussion I had with Sergio. He agreed to make a v2. Actually Hiroshi did it: http://dpdk.org/ml/archives/dev/2014-December/009847.html I'm going to apply Hiroshi's one.
> Subject: Re: [dpdk-dev] mk: fix app linking for combined libs > > 2014-12-08 09:53, Neil Horman: > > On Thu, Oct 23, 2014 at 04:36:44PM +0100, Sergio Gonzalez Monroy wrote: > > > Building combined shared libraries results in applications being linked > > > against separeted/individual and combined libs altogether. > > > > > > Link only against combined lib when the config option is enabled. > > > > > > Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com> > > > Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> > [...] > > Acked-by: Neil Horman <nhorman@tuxdriver.com> > > Neil, I didn't noticed your ack which happened after a discussion I had with > Sergio. He agreed to make a v2. > Actually Hiroshi did it: > http://dpdk.org/ml/archives/dev/2014-December/009847.html > I'm going to apply Hiroshi's one. Ah, I haven't noticed there was the patch to address this issue. thanks, Hiroshi
diff --git a/mk/rte.app.mk b/mk/rte.app.mk index 285b65c..45444af 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -217,6 +217,12 @@ endif endif # plugins +ifeq ($(RTE_BUILD_COMBINE_LIBS),y) +LDLIBS = --whole-archive +LDLIBS += --start-group +LDLIBS += -l$(RTE_LIBNAME) +endif + LDLIBS += $(EXECENV_LDLIBS) LDLIBS += --end-group @@ -240,10 +246,6 @@ build: _postbuild exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1)))) -ifeq ($(RTE_BUILD_COMBINE_LIBS),y) -LDLIBS += -l$(RTE_LIBNAME) -endif - ifeq ($(LINK_USING_CC),1) LDLIBS := $(call linkerprefix,$(LDLIBS)) LDFLAGS := $(call linkerprefix,$(LDFLAGS))