backport of further dpdk 16.07 fixes for library linking
[deb_dpdk.git] / debian / patches / ubuntu-backport-44-linking-cleanup.patch
1 Description: backport of dpdk 16.07 fixes for library linking
2
3 This is a merge of related upstream discussions:
4 - [PATCH 1/3] mk: fix librte_pipeline dependency list truncation
5 - [PATCH 3/3] mk: fail build on incomplete shared library dependencies
6
7 Forwarded: yes (likely in DPDK 16.07 in some way)
8 Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
9 Last-Update: 2016-06-23
10 Index: deb_dpdk/lib/librte_pipeline/Makefile
11 ===================================================================
12 --- deb_dpdk.orig/lib/librte_pipeline/Makefile
13 +++ deb_dpdk/lib/librte_pipeline/Makefile
14 @@ -53,7 +53,7 @@ SYMLINK-$(CONFIG_RTE_LIBRTE_PIPELINE)-in
15  
16  # this lib depends upon:
17  DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_eal
18 -DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) := lib/librte_table
19 +DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_table
20  DEPDIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib/librte_port
21  
22  include $(RTE_SDK)/mk/rte.lib.mk
23 Index: deb_dpdk/lib/librte_port/Makefile
24 ===================================================================
25 --- deb_dpdk.orig/lib/librte_port/Makefile
26 +++ deb_dpdk/lib/librte_port/Makefile
27 @@ -70,7 +70,7 @@ SYMLINK-$(CONFIG_RTE_LIBRTE_PORT)-includ
28  SYMLINK-$(CONFIG_RTE_LIBRTE_PORT)-include += rte_port_source_sink.h
29  
30  # this lib depends upon:
31 -DEPDIRS-$(CONFIG_RTE_LIBRTE_PORT) := lib/librte_eal
32 +DEPDIRS-$(CONFIG_RTE_LIBRTE_PORT) += lib/librte_eal
33  DEPDIRS-$(CONFIG_RTE_LIBRTE_PORT) += lib/librte_mbuf
34  DEPDIRS-$(CONFIG_RTE_LIBRTE_PORT) += lib/librte_mempool
35  DEPDIRS-$(CONFIG_RTE_LIBRTE_PORT) += lib/librte_ether
36 Index: deb_dpdk/lib/librte_table/Makefile
37 ===================================================================
38 --- deb_dpdk.orig/lib/librte_table/Makefile
39 +++ deb_dpdk/lib/librte_table/Makefile
40 @@ -72,7 +72,7 @@ SYMLINK-$(CONFIG_RTE_LIBRTE_TABLE)-inclu
41  SYMLINK-$(CONFIG_RTE_LIBRTE_TABLE)-include += rte_table_stub.h
42  
43  # this lib depends upon:
44 -DEPDIRS-$(CONFIG_RTE_LIBRTE_TABLE) := lib/librte_eal
45 +DEPDIRS-$(CONFIG_RTE_LIBRTE_TABLE) += lib/librte_eal
46  DEPDIRS-$(CONFIG_RTE_LIBRTE_TABLE) += lib/librte_mbuf
47  DEPDIRS-$(CONFIG_RTE_LIBRTE_TABLE) += lib/librte_mempool
48  DEPDIRS-$(CONFIG_RTE_LIBRTE_TABLE) += lib/librte_port
49 Index: deb_dpdk/mk/rte.lib.mk
50 ===================================================================
51 --- deb_dpdk.orig/mk/rte.lib.mk
52 +++ deb_dpdk/mk/rte.lib.mk
53 @@ -94,7 +94,7 @@ O_TO_A_DO = @set -e; \
54         echo $(O_TO_A_CMD) > $(call exe2cmd,$(@))
55  
56  O_TO_S = $(LD) -L$(RTE_OUTPUT)/lib $(_CPU_LDFLAGS) $(EXTRA_LDFLAGS) \
57 -         -shared $(OBJS-y) $(LDLIBS) -Wl,-soname,$(LIB) -o $(LIB)
58 +         -shared $(OBJS-y) -z defs $(LDLIBS) -Wl,-soname,$(LIB) -o $(LIB)
59  O_TO_S_STR = $(subst ','\'',$(O_TO_S)) #'# fix syntax highlight
60  O_TO_S_DISP = $(if $(V),"$(O_TO_S_STR)","  LD $(@)")
61  O_TO_S_DO = @set -e; \