[dpdk-dev,v2,3/6] mk: remove library grouping during application linking

Message ID 1465564749-1405-4-git-send-email-thomas.monjalon@6wind.com (mailing list archive)
State Accepted, archived
Headers

Commit Message

Thomas Monjalon June 10, 2016, 1:19 p.m. UTC
  From "man ld":
  Using this option has a significant performance cost.
  It is best to use it only when there are unavoidable
  circular references between two or more archives.

Remove the option since it does not seem necessary.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 mk/rte.app.mk | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
  

Comments

Ferruh Yigit June 10, 2016, 2:54 p.m. UTC | #1
On 6/10/2016 2:19 PM, Thomas Monjalon wrote:
> From "man ld":
>   Using this option has a significant performance cost.
>   It is best to use it only when there are unavoidable
>   circular references between two or more archives.
> 
> Remove the option since it does not seem necessary.
> 
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>

To remove this, I think we should order libraries in a way:

pmd -> librte -> external libraries.
Than we can remove --whole-archive too.

And perhaps keep it still to wrap around librte_eal and librte_mempool,
which still has cyclic dependencies.
  
Thomas Monjalon June 10, 2016, 3:14 p.m. UTC | #2
2016-06-10 15:54, Ferruh Yigit:
> On 6/10/2016 2:19 PM, Thomas Monjalon wrote:
> > From "man ld":
> >   Using this option has a significant performance cost.
> >   It is best to use it only when there are unavoidable
> >   circular references between two or more archives.
> > 
> > Remove the option since it does not seem necessary.
> > 
> > Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> 
> To remove this, I think we should order libraries in a way:
> 
> pmd -> librte -> external libraries.
> Than we can remove --whole-archive too.
> 
> And perhaps keep it still to wrap around librte_eal and librte_mempool,
> which still has cyclic dependencies.

OK looks good
I let you do a v3
  

Patch

diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 8068e66..9306b30 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -95,8 +95,6 @@  endif
 _LDLIBS-$(CONFIG_RTE_PORT_PCAP)             += -lpcap
 endif # !CONFIG_RTE_BUILD_SHARED_LIBS
 
-_LDLIBS-y += --start-group
-
 _LDLIBS-$(CONFIG_RTE_LIBRTE_KVARGS)         += -lrte_kvargs
 _LDLIBS-$(CONFIG_RTE_LIBRTE_MBUF)           += -lrte_mbuf
 _LDLIBS-$(CONFIG_RTE_LIBRTE_IP_FRAG)        += -lrte_ip_frag
@@ -151,7 +149,7 @@  endif # CONFIG_RTE_LIBRTE_CRYPTODEV
 endif # ! $(CONFIG_RTE_BUILD_SHARED_LIB)
 
 _LDLIBS-y += $(EXECENV_LDLIBS)
-_LDLIBS-y += --end-group
+
 _LDLIBS-y += --no-whole-archive
 
 LDLIBS += $(_LDLIBS-y) $(CPU_LDLIBS) $(EXTRA_LDLIBS)