[dpdk-dev] [PATCH] mk: fix app linking for combined libs

Thomas Monjalon thomas.monjalon at 6wind.com
Mon Dec 1 11:35:05 CET 2014


2014-12-01 09:57, Gonzalez Monroy, Sergio:
> > From: Thomas Monjalon [mailto:thomas.monjalon at 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 at 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?

-- 
Thomas


More information about the dev mailing list