summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorThomas Monjalon <thomas@monjalon.net>2019-01-09 15:23:19 +0100
committerFerruh Yigit <ferruh.yigit@intel.com>2019-01-14 17:44:29 +0100
commit2c0dd7b69fb00fc3e422a6058ff8429edc869f68 (patch)
treefeeb13844b171079eaf058825c1fca2cfecb4b5c /mk
parent72b934adce8f5f9ed035c04ebed8b386243e5a2e (diff)
downloaddpdk-next-eventdev-2c0dd7b69fb00fc3e422a6058ff8429edc869f68.zip
dpdk-next-eventdev-2c0dd7b69fb00fc3e422a6058ff8429edc869f68.tar.gz
dpdk-next-eventdev-2c0dd7b69fb00fc3e422a6058ff8429edc869f68.tar.xz
config: add static linkage of mlx dependency
The libraries provided by rdma-core may be statically linked if enabling CONFIG_RTE_IBVERBS_LINK_STATIC in the make-based build. If CONFIG_RTE_BUILD_SHARED_LIB is disabled, the applications will embed the mlx PMDs with ibverbs and the mlx libraries. If CONFIG_RTE_BUILD_SHARED_LIB is enabled, the mlx PMDs will embed ibverbs and the mlx libraries. Support with meson may be added later. Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Diffstat (limited to 'mk')
-rw-r--r--mk/rte.app.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 97f1b7d..8a4f0f4 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -176,6 +176,10 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += -lrte_pmd_mlx5 -lmnl
ifeq ($(CONFIG_RTE_IBVERBS_LINK_DLOPEN),y)
_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) += $(LIBS_IBVERBS_STATIC)
+_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += $(LIBS_IBVERBS_STATIC)
else
_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += -libverbs -lmlx4
_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += -libverbs -lmlx5