[dpdk-stable] patch 'mk: fix static linkage of mlx dependency' has been queued to stable release 19.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue May 19 15:04:56 CEST 2020


Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
>From c4c95316484c1f2ece020eb64444647954a64832 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz at mellanox.com>
Date: Wed, 29 Apr 2020 20:11:55 +0800
Subject: [PATCH] mk: fix static linkage of mlx dependency

[ upstream commit c093e28f494d92f71fd3ce16a8daacb0cf1715ae ]

When building a target application with static linking mode via
makefiles and enable linking to ibverbs libs by setting
"CONFIG_RTE_IBVERBS_LINK_STATIC=y". The libibverbs.pc will be
chosen and all the libs listed in the file will be linked
by default. Some static lib archives may contain the same files
and common interfaces inside.
The "--no-whole-archive" needs to be enabled for the linker to
discard the useless symbols and resolve the symbols redefinition
error.

Fixes: 2c0dd7b69fb0 ("config: add static linkage of mlx dependency")

Signed-off-by: Bing Zhao <bingz at mellanox.com>
Acked-by: Thomas Monjalon <thomas at monjalon.net>
---
 mk/rte.app.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 05ea034b99..44dd684cb1 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -196,8 +196,12 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += -ldl
 _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += -ldl
 else ifeq ($(CONFIG_RTE_IBVERBS_LINK_STATIC),y)
 LIBS_IBVERBS_STATIC = $(shell $(RTE_SDK)/buildtools/options-ibverbs-static.sh)
+_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += --no-whole-archive
 _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += $(LIBS_IBVERBS_STATIC)
+_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += --whole-archive
+_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += --no-whole-archive
 _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += $(LIBS_IBVERBS_STATIC)
+_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += --whole-archive
 else
 _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += -libverbs -lmlx4
 _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += -libverbs -lmlx5
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:51.054695246 +0100
+++ 0161-mk-fix-static-linkage-of-mlx-dependency.patch	2020-05-19 14:04:44.500653521 +0100
@@ -1,8 +1,10 @@
-From c093e28f494d92f71fd3ce16a8daacb0cf1715ae Mon Sep 17 00:00:00 2001
+From c4c95316484c1f2ece020eb64444647954a64832 Mon Sep 17 00:00:00 2001
 From: Bing Zhao <bingz at mellanox.com>
 Date: Wed, 29 Apr 2020 20:11:55 +0800
 Subject: [PATCH] mk: fix static linkage of mlx dependency
 
+[ upstream commit c093e28f494d92f71fd3ce16a8daacb0cf1715ae ]
+
 When building a target application with static linking mode via
 makefiles and enable linking to ibverbs libs by setting
 "CONFIG_RTE_IBVERBS_LINK_STATIC=y". The libibverbs.pc will be
@@ -14,28 +16,30 @@
 error.
 
 Fixes: 2c0dd7b69fb0 ("config: add static linkage of mlx dependency")
-Cc: stable at dpdk.org
 
 Signed-off-by: Bing Zhao <bingz at mellanox.com>
 Acked-by: Thomas Monjalon <thomas at monjalon.net>
 ---
- mk/rte.app.mk | 2 ++
- 1 file changed, 2 insertions(+)
+ mk/rte.app.mk | 4 ++++
+ 1 file changed, 4 insertions(+)
 
 diff --git a/mk/rte.app.mk b/mk/rte.app.mk
-index 244e74d883..db619c5e3f 100644
+index 05ea034b99..44dd684cb1 100644
 --- a/mk/rte.app.mk
 +++ b/mk/rte.app.mk
-@@ -209,7 +209,9 @@ ifeq ($(CONFIG_RTE_IBVERBS_LINK_DLOPEN),y)
- _LDLIBS-y                                   += -ldl
+@@ -196,8 +196,12 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += -ldl
+ _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += -ldl
  else ifeq ($(CONFIG_RTE_IBVERBS_LINK_STATIC),y)
  LIBS_IBVERBS_STATIC = $(shell $(RTE_SDK)/buildtools/options-ibverbs-static.sh)
-+_LDLIBS-y                                   += --no-whole-archive
- _LDLIBS-y                                   += $(LIBS_IBVERBS_STATIC)
-+_LDLIBS-y                                   += --whole-archive
++_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += --no-whole-archive
+ _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += $(LIBS_IBVERBS_STATIC)
++_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += --whole-archive
++_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += --no-whole-archive
+ _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += $(LIBS_IBVERBS_STATIC)
++_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += --whole-archive
  else
- ifeq ($(findstring y,$(CONFIG_RTE_LIBRTE_MLX5_PMD)$(CONFIG_RTE_LIBRTE_MLX5_VDPA_PMD)),y)
- _LDLIBS-y                                   += -libverbs -lmlx5
+ _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += -libverbs -lmlx4
+ _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += -libverbs -lmlx5
 -- 
 2.20.1
 


More information about the stable mailing list