aboutsummaryrefslogtreecommitdiffstats
path: root/debian/patches/ubuntu-backport-40-linking-fixes-stage-1-4.patch
diff options
context:
space:
mode:
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>2016-06-15 20:29:06 +0200
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>2016-06-15 20:37:12 +0200
commit199e427d5dea3051eec1726eb9c857aa3d5fdde2 (patch)
tree5477b3bd4868676a210bbd3ef67a469d34814e61 /debian/patches/ubuntu-backport-40-linking-fixes-stage-1-4.patch
parentb5cdd645c9fc62341d55aebbfc93a1b648415512 (diff)
Merge Ubuntu DPDK packaging as of 15th June 2016
As discussed this shall be our initial baseline. If history is needed for any sort of debugging or analysis it can be found at https://code.launchpad.net/~ubuntu-server/dpdk/+git/dpdk Change-Id: Ie95c7effbbea34d723df14f6451c1f782000cbc1 Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Diffstat (limited to 'debian/patches/ubuntu-backport-40-linking-fixes-stage-1-4.patch')
-rw-r--r--debian/patches/ubuntu-backport-40-linking-fixes-stage-1-4.patch101
1 files changed, 101 insertions, 0 deletions
diff --git a/debian/patches/ubuntu-backport-40-linking-fixes-stage-1-4.patch b/debian/patches/ubuntu-backport-40-linking-fixes-stage-1-4.patch
new file mode 100644
index 00000000..5336cd49
--- /dev/null
+++ b/debian/patches/ubuntu-backport-40-linking-fixes-stage-1-4.patch
@@ -0,0 +1,101 @@
+Description: backport of dpdk 16.07 fix for library underlinking - stage 1/4
+
+This is a merge of related upstream fixes:
+- c6417ce6: mk: add build-time library directory to linker path
+- aace9d0b: mk: cleanup leftover references to malloc library
+- bf5a46fa: mk: generate internal library dependencies
+
+Forwarded: yes (in DPDK 16.07)
+Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
+Last-Update: 2016-06-14
+
+Index: dpdk/drivers/net/cxgbe/Makefile
+===================================================================
+--- dpdk.orig/drivers/net/cxgbe/Makefile
++++ dpdk/drivers/net/cxgbe/Makefile
+@@ -82,6 +82,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_CXGBE_PMD) += t
+ # this lib depends upon:
+ DEPDIRS-$(CONFIG_RTE_LIBRTE_CXGBE_PMD) += lib/librte_eal lib/librte_ether
+ DEPDIRS-$(CONFIG_RTE_LIBRTE_CXGBE_PMD) += lib/librte_mempool lib/librte_mbuf
+-DEPDIRS-$(CONFIG_RTE_LIBRTE_CXGBE_PMD) += lib/librte_net lib/librte_malloc
++DEPDIRS-$(CONFIG_RTE_LIBRTE_CXGBE_PMD) += lib/librte_net
+
+ include $(RTE_SDK)/mk/rte.lib.mk
+Index: dpdk/drivers/net/ena/Makefile
+===================================================================
+--- dpdk.orig/drivers/net/ena/Makefile
++++ dpdk/drivers/net/ena/Makefile
+@@ -54,7 +54,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_ENA_PMD) += ena
+ # this lib depends upon:
+ DEPDIRS-$(CONFIG_RTE_LIBRTE_ENA_PMD) += lib/librte_eal lib/librte_ether
+ DEPDIRS-$(CONFIG_RTE_LIBRTE_ENA_PMD) += lib/librte_mempool lib/librte_mbuf
+-DEPDIRS-$(CONFIG_RTE_LIBRTE_ENA_PMD) += lib/librte_net lib/librte_malloc
++DEPDIRS-$(CONFIG_RTE_LIBRTE_ENA_PMD) += lib/librte_net
+
+ CFLAGS += $(INCLUDES)
+
+Index: dpdk/drivers/net/mpipe/Makefile
+===================================================================
+--- dpdk.orig/drivers/net/mpipe/Makefile
++++ dpdk/drivers/net/mpipe/Makefile
+@@ -42,6 +42,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_MPIPE_PMD) += m
+
+ DEPDIRS-$(CONFIG_RTE_LIBRTE_MPIPE_PMD) += lib/librte_eal lib/librte_ether
+ DEPDIRS-$(CONFIG_RTE_LIBRTE_MPIPE_PMD) += lib/librte_mempool lib/librte_mbuf
+-DEPDIRS-$(CONFIG_RTE_LIBRTE_MPIPE_PMD) += lib/librte_net lib/librte_malloc
++DEPDIRS-$(CONFIG_RTE_LIBRTE_MPIPE_PMD) += lib/librte_net
+
+ include $(RTE_SDK)/mk/rte.lib.mk
+Index: dpdk/drivers/net/nfp/Makefile
+===================================================================
+--- dpdk.orig/drivers/net/nfp/Makefile
++++ dpdk/drivers/net/nfp/Makefile
+@@ -53,6 +53,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_NFP_PMD) += nfp
+ # this lib depends upon:
+ DEPDIRS-$(CONFIG_RTE_LIBRTE_NFP_PMD) += lib/librte_eal lib/librte_ether
+ DEPDIRS-$(CONFIG_RTE_LIBRTE_NFP_PMD) += lib/librte_mempool lib/librte_mbuf
+-DEPDIRS-$(CONFIG_RTE_LIBRTE_NFP_PMD) += lib/librte_net lib/librte_malloc
++DEPDIRS-$(CONFIG_RTE_LIBRTE_NFP_PMD) += lib/librte_net
+
+ include $(RTE_SDK)/mk/rte.lib.mk
+Index: dpdk/drivers/net/szedata2/Makefile
+===================================================================
+--- dpdk.orig/drivers/net/szedata2/Makefile
++++ dpdk/drivers/net/szedata2/Makefile
+@@ -57,7 +57,6 @@ SYMLINK-y-include +=
+ # this lib depends upon:
+ DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_SZEDATA2) += lib/librte_mbuf
+ DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_SZEDATA2) += lib/librte_ether
+-DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_SZEDATA2) += lib/librte_malloc
+ DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_SZEDATA2) += lib/librte_kvargs
+
+ include $(RTE_SDK)/mk/rte.lib.mk
+Index: dpdk/mk/rte.lib.mk
+===================================================================
+--- dpdk.orig/mk/rte.lib.mk
++++ dpdk/mk/rte.lib.mk
+@@ -77,6 +77,13 @@ else
+ _CPU_LDFLAGS := $(CPU_LDFLAGS)
+ endif
+
++# Translate DEPDIRS-y into LDLIBS
++# Ignore (sub)directory dependencies which do not provide an actual library
++_IGNORE_DIRS = lib/librte_eal/% lib/librte_net lib/librte_compat
++_DEPDIRS = $(filter-out $(_IGNORE_DIRS),$(DEPDIRS-y))
++_LDDIRS = $(subst librte_ether,libethdev,$(_DEPDIRS))
++LDLIBS += $(subst lib/lib,-l,$(_LDDIRS))
++
+ O_TO_A = $(AR) crDs $(LIB) $(OBJS-y)
+ O_TO_A_STR = $(subst ','\'',$(O_TO_A)) #'# fix syntax highlight
+ O_TO_A_DISP = $(if $(V),"$(O_TO_A_STR)"," AR $(@)")
+@@ -86,8 +93,8 @@ O_TO_A_DO = @set -e; \
+ $(O_TO_A) && \
+ echo $(O_TO_A_CMD) > $(call exe2cmd,$(@))
+
+-O_TO_S = $(LD) $(_CPU_LDFLAGS) $(EXTRA_LDFLAGS) -shared $(OBJS-y) $(LDLIBS) \
+- -Wl,-soname,$(LIB) -o $(LIB)
++O_TO_S = $(LD) -L$(RTE_OUTPUT)/lib $(_CPU_LDFLAGS) $(EXTRA_LDFLAGS) \
++ -shared $(OBJS-y) $(LDLIBS) -Wl,-soname,$(LIB) -o $(LIB)
+ O_TO_S_STR = $(subst ','\'',$(O_TO_S)) #'# fix syntax highlight
+ O_TO_S_DISP = $(if $(V),"$(O_TO_S_STR)"," LD $(@)")
+ O_TO_S_DO = @set -e; \