From e0b669312a72f86446fe788ef8b3958ecc0554ba Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Wed, 14 Nov 2018 08:51:13 -0700 Subject: [PATCH] spdk_tgt, vhost: move vhost libraries earlier in SPDK_LIB_LIST Upcoming changes will use --whole-archive on all libraries. This introduces some issues with the shared library builds, although it's not entirely clear why these issues don't occur today. vhost depends on both scsi and bdev - but for the spdk_tgt and vhost application Makefiles, vhost is listed later than scsi and bdev. It's best practice to list the libraries in order of dependence - at least until we add dependencies to the shared libraries themselves. Signed-off-by: Jim Harris Change-Id: Ibacfb7781dad60cf3ce6906deaaa2e5c0f5e9571 Reviewed-on: https://review.gerrithub.io/433356 Chandler-Test-Pool: SPDK Automated Test System Tested-by: SPDK CI Jenkins Reviewed-by: Seth Howell Reviewed-by: Shuhei Matsumoto Reviewed-by: Darek Stojaczyk --- app/spdk_tgt/Makefile | 15 +++++++++------ app/vhost/Makefile | 5 +++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/app/spdk_tgt/Makefile b/app/spdk_tgt/Makefile index ad7e03e38..cfb1bb3ad 100644 --- a/app/spdk_tgt/Makefile +++ b/app/spdk_tgt/Makefile @@ -40,17 +40,20 @@ APP = spdk_tgt C_SRCS := spdk_tgt.c -SPDK_LIB_LIST = event_bdev event_copy event_iscsi event_net event_scsi event_nvmf event +SPDK_LIB_LIST = + +ifeq ($(OS),Linux) +ifeq ($(CONFIG_VHOST),y) +SPDK_LIB_LIST += vhost rte_vhost event_vhost +endif +endif + +SPDK_LIB_LIST += event_bdev event_copy event_iscsi event_net event_scsi event_nvmf event SPDK_LIB_LIST += nvmf trace log conf thread util bdev iscsi scsi copy rpc jsonrpc json SPDK_LIB_LIST += app_rpc log_rpc bdev_rpc net ifeq ($(OS),Linux) SPDK_LIB_LIST += event_nbd nbd - -ifeq ($(CONFIG_VHOST),y) -SPDK_LIB_LIST += vhost rte_vhost event_vhost -endif - endif LIBS += $(BLOCKDEV_MODULES_LINKER_ARGS) \ diff --git a/app/vhost/Makefile b/app/vhost/Makefile index ef75e5e31..51437ac2e 100644 --- a/app/vhost/Makefile +++ b/app/vhost/Makefile @@ -40,10 +40,11 @@ APP = vhost C_SRCS := vhost.c -SPDK_LIB_LIST = event_bdev event_copy event_net event_scsi event_vhost event +SPDK_LIB_LIST = vhost rte_vhost event_vhost +SPDK_LIB_LIST += event_bdev event_copy event_net event_scsi event SPDK_LIB_LIST += jsonrpc json rpc bdev_rpc bdev scsi copy trace conf SPDK_LIB_LIST += thread util log log_rpc app_rpc -SPDK_LIB_LIST += vhost rte_vhost event_nbd nbd net +SPDK_LIB_LIST += event_nbd nbd net LIBS += $(BLOCKDEV_MODULES_LINKER_ARGS) \ $(COPY_MODULES_LINKER_ARGS) \