Commit 9cc7b31e authored by Seth Howell's avatar Seth Howell Committed by Ben Walker
Browse files

Enable DPDK shared object build with SPDK shared object build.



When building SPDK with shared objects, we should also build the DPDK
submodule shared libraries. This will make it much easier for peole to
link their applications against a dpdk shared library if the DPDK shared
libraries installed on their system don't have all the symbols that SPDK
needs.

Also, add a linker argument to DPDK to specify that it should look in
the dpdk subdirectory when linking libraries.

Note: this change will not work until the default config options in the
DPDK submodule are updated.

Change-Id: I9546df7b84952eb20fe1ac98e3b3bbd0fcbda3a7
Signed-off-by: default avatarSeth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463028


Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: default avatarJan Kryl <jan.kryl@mayadata.io>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 23707ccf
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -40,11 +40,12 @@ DPDK_FRAMEWORK = n
DPDK_OPTS =
DPDK_CFLAGS =

# We commented out this build option in our DPDK fork, but DPDK makefiles check
# its value specifically against 'n' to set linking flags properly. Set it here
# to 'n' for now.
# TODO allow DPDK to be built as shared library
ifeq ($(CONFIG_SHARED),y)
DPDK_OPTS += CONFIG_RTE_BUILD_SHARED_LIB=y
DPDK_LDFLAGS+= -rpath $(SPDK_ROOT_DIR)/dpdk/build/lib
else
DPDK_OPTS += CONFIG_RTE_BUILD_SHARED_LIB=n
endif

ifeq ($(CONFIG_CRYPTO),y)
DPDK_FRAMEWORK = y