From 9399b20431bb94f0ba359cf7be24c47acd8c389c Mon Sep 17 00:00:00 2001 From: Darek Stojaczyk Date: Mon, 27 May 2019 14:03:51 +0200 Subject: [PATCH] dpdkbuild: specify ldflags In DPDK 19.05 there's a new test app which we obviously don't need to build, but we have no way not to, as it's built together with a library that we do need. That app may try to link with crypto and compress PMDs, which require IPSec and ISA-L respectively. If those were not installed on the system, the linking would fail. We fix it by providing DPDK with extra -L/path/to/[...] Change-Id: I652efb669d10d2d03d0f643ce539404c1f0e38c4 Signed-off-by: Darek Stojaczyk Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455825 Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto --- dpdkbuild/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dpdkbuild/Makefile b/dpdkbuild/Makefile index 3ff2378d9..9ac0bf556 100644 --- a/dpdkbuild/Makefile +++ b/dpdkbuild/Makefile @@ -46,6 +46,7 @@ ifeq ($(CONFIG_CRYPTO),y) CRYPTO_ENABLED = y DPDK_OPTS += CONFIG_RTE_LIBRTE_PMD_AESNI_MB=y DPDK_CFLAGS += -I$(IPSEC_MB_DIR) +DPDK_LDFLAGS += -L$(IPSEC_MB_DIR) DPDK_OPTS += CONFIG_RTE_LIBRTE_REORDER=y DPDK_OPTS += CONFIG_RTE_LIBRTE_PMD_QAT=y DPDK_OPTS += CONFIG_RTE_LIBRTE_PMD_QAT_SYM=y @@ -67,6 +68,7 @@ endif ifeq ($(CONFIG_REDUCE),y) DPDK_OPTS += CONFIG_RTE_LIBRTE_PMD_ISAL=y DPDK_CFLAGS += -I$(ISAL_DIR) +DPDK_LDFLAGS += -L$(ISAL_DIR)/.libs else DPDK_OPTS += CONFIG_RTE_LIBRTE_PMD_ISAL=n endif @@ -117,7 +119,7 @@ $(SPDK_ROOT_DIR)/dpdk/build: $(Q)$(MAKE) -C $(SPDK_ROOT_DIR)/dpdk config T=$(DPDK_CONFIG) $(DPDK_OPTS) all: $(SPDK_ROOT_DIR)/dpdk/build - $(Q)$(MAKE) -C $(SPDK_ROOT_DIR)/dpdk/build EXTRA_CFLAGS="$(DPDK_CFLAGS)" MAKEFLAGS="T=$(DPDK_CONFIG) -j$(NPROC)" $(DPDK_OPTS) + $(Q)$(MAKE) -C $(SPDK_ROOT_DIR)/dpdk/build EXTRA_CFLAGS="$(DPDK_CFLAGS)" EXTRA_LDFLAGS="$(DPDK_LDFLAGS)" MAKEFLAGS="T=$(DPDK_CONFIG) -j$(NPROC)" $(DPDK_OPTS) clean: $(Q)rm -rf $(SPDK_ROOT_DIR)/dpdk/build