DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] mk: fix link to combined library
@ 2014-12-11  2:54 Hiroshi Shimamoto
  2014-12-16 23:45 ` Thomas Monjalon
  0 siblings, 1 reply; 7+ messages in thread
From: Hiroshi Shimamoto @ 2014-12-11  2:54 UTC (permalink / raw)
  To: dev; +Cc: Hayato Momma

From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>

The application should be linked to the single combined library in the
condition that both of CONFIG_RTE_BUILD_COMBINE_LIB and
CONFIG_RTE_BUILD_SHARED_LIB are enabled.

The current makefile generates an application that links to each library.
This patch fixes to link the single library.

Before
$ ldd x86_64-ivshmem-linuxapp-gcc/app/test
	linux-vdso.so.1 =>  (0x00007fff232a1000)
	librte_distributor.so => not found
	librte_kni.so => not found
	librte_ivshmem.so => not found
	librte_pipeline.so => not found
	librte_table.so => not found
	librte_port.so => not found
	librte_timer.so => not found
	librte_hash.so => not found
	librte_lpm.so => not found
	librte_power.so => not found
	librte_acl.so => not found
	librte_meter.so => not found
	librte_sched.so => not found
	libm.so.6 => /lib64/libm.so.6 (0x00007fc638020000)
	librt.so.1 => /lib64/librt.so.1 (0x00007fc637e18000)
	librte_kvargs.so => not found
	librte_mbuf.so => not found
	librte_ip_frag.so => not found
	libethdev.so => not found
	librte_malloc.so => not found
	librte_mempool.so => not found
	librte_ring.so => not found
	librte_eal.so => not found
	librte_cmdline.so => not found
	librte_cfgfile.so => not found
	librte_pmd_bond.so => not found
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fc637bfe000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007fc6379fa000)
	libintel_dpdk.so => not found
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fc6377dd000)
	libc.so.6 => /lib64/libc.so.6 (0x00007fc63741c000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fc638330000)

After
$ ldd x86_64-ivshmem-linuxapp-gcc/app/test
	linux-vdso.so.1 =>  (0x00007fffb79fe000)
	librt.so.1 => /lib64/librt.so.1 (0x00007f0d8a971000)
	libm.so.6 => /lib64/libm.so.6 (0x00007f0d8a66f000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f0d8a458000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007f0d8a254000)
	libintel_dpdk.so => not found
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f0d8a037000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f0d89c76000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f0d8ab82000)

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Reviewed-by: Hayato Momma <h-momma@ce.jp.nec.com>
---
 mk/rte.app.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 84ec4df..3782eab 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -61,6 +61,8 @@ ifeq ($(NO_AUTOLIBS),)
 
 LDLIBS += --whole-archive
 
+ifeq ($(RTE_BUILD_COMBINE_LIBS),n)
+
 ifeq ($(CONFIG_RTE_LIBRTE_DISTRIBUTOR),y)
 LDLIBS += -lrte_distributor
 endif
@@ -119,8 +121,12 @@ LDLIBS += -lm
 LDLIBS += -lrt
 endif
 
+endif # ! RTE_BUILD_COMBINE_LIBS
+
 LDLIBS += --start-group
 
+ifeq ($(RTE_BUILD_COMBINE_LIBS),n)
+
 ifeq ($(CONFIG_RTE_LIBRTE_KVARGS),y)
 LDLIBS += -lrte_kvargs
 endif
@@ -216,6 +222,8 @@ endif
 
 endif # plugins
 
+endif # ! RTE_BUILD_COMBINE_LIBS
+
 LDLIBS += $(EXECENV_LDLIBS)
 
 LDLIBS += --end-group
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-12-17 11:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-11  2:54 [dpdk-dev] [PATCH] mk: fix link to combined library Hiroshi Shimamoto
2014-12-16 23:45 ` Thomas Monjalon
2014-12-17 10:38   ` Bruce Richardson
2014-12-17 10:43     ` Bruce Richardson
2014-12-17 10:43     ` Thomas Monjalon
2014-12-17 10:46       ` Bruce Richardson
2014-12-17 11:07         ` Hiroshi Shimamoto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).