env_dpdk: add functions to define dpdk_env make variables
Create dpdk_lib_list_to_libs and dpdk_env_linker_args functions to generate the library filename list and the linker arguments respectively. Use these functions internally as well. These will be useful as part of the Seastar work, where Seastar pkg-config includes a bunch of the DPDK libraries, and SPDK needs to just add a few more. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Iaa6b49a8e1defacf63b3f6b414cd2e947670f8eb Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469751 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
685cbeebd4
commit
916f3d1471
@ -109,7 +109,15 @@ endif
|
||||
endif
|
||||
endif
|
||||
|
||||
DPDK_LIB = $(DPDK_LIB_LIST:%=$(DPDK_ABS_DIR)/lib/lib%$(DPDK_LIB_EXT))
|
||||
define dpdk_lib_list_to_libs
|
||||
$(1:%=$(DPDK_ABS_DIR)/lib/lib%$(DPDK_LIB_EXT))
|
||||
endef
|
||||
|
||||
define dpdk_env_linker_args
|
||||
$(ENV_DPDK_FILE) -Wl,--whole-archive,--no-as-needed $(call dpdk_lib_list_to_libs,$1) -Wl,--no-whole-archive
|
||||
endef
|
||||
|
||||
DPDK_LIB = $(call dpdk_lib_list_to_libs,$(DPDK_LIB_LIST))
|
||||
|
||||
# SPDK memory registration requires experimental (deprecated) rte_memory API for DPDK 18.05
|
||||
ENV_CFLAGS = $(DPDK_INC) -Wno-deprecated-declarations
|
||||
@ -120,7 +128,7 @@ else
|
||||
ENV_DPDK_FILE = $(call spdk_lib_list_to_static_libs,env_dpdk)
|
||||
endif
|
||||
ENV_LIBS = $(ENV_DPDK_FILE) $(DPDK_LIB)
|
||||
ENV_LINKER_ARGS = $(ENV_DPDK_FILE) -Wl,--whole-archive,--no-as-needed $(DPDK_LIB) -Wl,--no-whole-archive
|
||||
ENV_LINKER_ARGS = $(call dpdk_env_linker_args,$(DPDK_LIB_LIST))
|
||||
|
||||
ifeq ($(CONFIG_IPSEC_MB),y)
|
||||
ENV_LINKER_ARGS += -lIPSec_MB -L$(IPSEC_MB_DIR)
|
||||
|
Loading…
Reference in New Issue
Block a user