From 6c4f29bb012db163944dcdd6d0df05e699a68233 Mon Sep 17 00:00:00 2001 From: Seth Howell Date: Wed, 12 Sep 2018 12:43:47 -0700 Subject: [PATCH] make: simplify rdma dependency linking Instead of adding the linker flags just before application compilation on linux, move that linking to earlier in the process. This will also be useful for the shared library build. This series is aimed at fixing github issue 434 Change-Id: I84bcc6bd922ddb6e48adb2dfe0b154700773cf27 Signed-off-by: Seth Howell Reviewed-on: https://review.gerrithub.io/425435 Chandler-Test-Pool: SPDK Automated Test System Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Lance Hartmann Reviewed-by: Shuhei Matsumoto Reviewed-by: Jim Harris --- mk/spdk.common.mk | 12 ++++-------- test/app/stub/Makefile | 4 ---- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/mk/spdk.common.mk b/mk/spdk.common.mk index 2c150cf942..2411729ef4 100644 --- a/mk/spdk.common.mk +++ b/mk/spdk.common.mk @@ -125,17 +125,13 @@ LIBS += -L$(CONFIG_VPP_DIR)/lib64 COMMON_CFLAGS += -I$(CONFIG_VPP_DIR)/include endif +ifeq ($(CONFIG_RDMA),y) +SYS_LIBS += -libverbs -lrdmacm +endif + #Attach only if FreeBSD and RDMA is specified with configure ifeq ($(OS),FreeBSD) ifeq ($(CONFIG_RDMA),y) -# RDMA Userspace Verbs Library -ifneq ("$(wildcard /usr/lib/libibverbs.*)","") -SYS_LIBS += -libverbs -endif -# RDMA Connection Manager Library -ifneq ("$(wildcard /usr/lib/librdmacm.*)","") -SYS_LIBS += -lrdmacm -endif # Mellanox - MLX4 HBA Userspace Library ifneq ("$(wildcard /usr/lib/libmlx4.*)","") SYS_LIBS += -lmlx4 diff --git a/test/app/stub/Makefile b/test/app/stub/Makefile index b4dd7463ea..9cca6b2c8a 100644 --- a/test/app/stub/Makefile +++ b/test/app/stub/Makefile @@ -46,10 +46,6 @@ LIBS += $(SOCK_MODULES_LINKER_ARGS) LIBS += $(SPDK_LIB_LINKER_ARGS) LIBS += $(ENV_LINKER_ARGS) -ifeq ($(CONFIG_RDMA),y) -SYS_LIBS += -libverbs -lrdmacm -endif - all : $(APP) @: