On 15/04/2015 10:30, Sergio Gonzalez Monroy wrote: > Use flag --as-needed when linking against shared libs, exluding > eal, malloc, mempool and ring as explained in: > 7cee5f6b4a9b ("lib: set LDLIBS for each library") Self-NACK. It is not correct to put the commit id here (it does not exist after all :) ).
I'll send v2 with new commit message, but I'd wait until someone review the rest of the patch first. Sergio > Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy at intel.com> > --- > mk/rte.app.mk | 36 ++++++++++++++++++++---------------- > 1 file changed, 20 insertions(+), 16 deletions(-) > > diff --git a/mk/rte.app.mk b/mk/rte.app.mk > index 62a76ae..c557957 100644 > --- a/mk/rte.app.mk > +++ b/mk/rte.app.mk > @@ -67,6 +67,26 @@ endif > > ifeq ($(CONFIG_RTE_BUILD_COMBINE_LIBS),n) > > +ifeq ($(CONFIG_RTE_LIBRTE_EAL),y) > +LDLIBS += -lrte_eal > +endif > + > +ifeq ($(CONFIG_RTE_LIBRTE_MALLOC),y) > +LDLIBS += -lrte_malloc > +endif > + > +ifeq ($(CONFIG_RTE_LIBRTE_MEMPOOL),y) > +LDLIBS += -lrte_mempool > +endif > + > +ifeq ($(CONFIG_RTE_LIBRTE_RING),y) > +LDLIBS += -lrte_ring > +endif > + > +ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y) > +LDLIBS += --as-needed > +endif > + > ifeq ($(CONFIG_RTE_LIBRTE_DISTRIBUTOR),y) > LDLIBS += -lrte_distributor > endif > @@ -171,22 +191,6 @@ ifeq ($(CONFIG_RTE_LIBRTE_ETHER),y) > LDLIBS += -lethdev > endif > > -ifeq ($(CONFIG_RTE_LIBRTE_MALLOC),y) > -LDLIBS += -lrte_malloc > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_MEMPOOL),y) > -LDLIBS += -lrte_mempool > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_RING),y) > -LDLIBS += -lrte_ring > -endif > - > -ifeq ($(CONFIG_RTE_LIBRTE_EAL),y) > -LDLIBS += -lrte_eal > -endif > - > ifeq ($(CONFIG_RTE_LIBRTE_CMDLINE),y) > LDLIBS += -lrte_cmdline > endif