From 582c81e68622d44200406137d261688adde0aed9 Mon Sep 17 00:00:00 2001 From: Mohammed Hawari Date: Tue, 20 Sep 2022 18:44:36 +0200 Subject: rdma: unhackish build of rdma-core Change-Id: I2040b560b2a00f8bd176ae6ad46035678a2b249e Type: improvement Signed-off-by: Mohammed Hawari (cherry picked from commit 45e4e9444d961351178ee108b20525a9c929902d) --- src/plugins/dpdk/CMakeLists.txt | 8 ++------ src/plugins/rdma/CMakeLists.txt | 8 +++----- 2 files changed, 5 insertions(+), 11 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/dpdk/CMakeLists.txt b/src/plugins/dpdk/CMakeLists.txt index 91cf236ea05..a9d4f3e514c 100644 --- a/src/plugins/dpdk/CMakeLists.txt +++ b/src/plugins/dpdk/CMakeLists.txt @@ -103,12 +103,8 @@ else() list(APPEND DPDK_LINK_LIBRARIES "${MNL_LIB}") else() message(WARNING "EXPERIMENTAL: DPDK plugin without dlopen mode") - vpp_plugin_find_library(dpdk IBVERBS_LIB "libibverbs.a") - vpp_plugin_find_library(dpdk MLX5_LIB "libmlx5.a") - vpp_plugin_find_library(dpdk MLX4_LIB "libmlx4.a") - vpp_plugin_find_library(dpdk CCAN_LIB "libccan.a") - vpp_plugin_find_library(dpdk RDMA_UTIL_LIB "rdma_util") - string_append(DPDK_LINK_FLAGS "-Wl,--whole-archive,${IBVERBS_LIB},${MLX5_LIB},${MLX4_LIB},${CCAN_LIB},${RDMA_UTIL_LIB},--no-whole-archive") + vpp_plugin_find_library(dpdk IBVERBS_LIB "libibverbs.a") + string_append(DPDK_LINK_FLAGS "${IBVERBS_LIB} -Wl,--exclude-libs,ALL") endif() endif() endif() diff --git a/src/plugins/rdma/CMakeLists.txt b/src/plugins/rdma/CMakeLists.txt index f598ff8c701..ef8bc90c6dd 100644 --- a/src/plugins/rdma/CMakeLists.txt +++ b/src/plugins/rdma/CMakeLists.txt @@ -19,17 +19,16 @@ if (NOT IBVERBS_INCLUDE_DIR) endif() vpp_plugin_find_library(rdma IBVERBS_LIB libibverbs.a) -vpp_plugin_find_library(rdma RDMA_UTIL_LIB librdma_util.a) vpp_plugin_find_library(rdma MLX5_LIB libmlx5.a) -if (NOT IBVERBS_LIB OR NOT RDMA_UTIL_LIB OR NOT MLX5_LIB) +if (NOT IBVERBS_LIB OR NOT MLX5_LIB) message(WARNING "rdma plugin - ibverbs not found - rdma plugin disabled") return() endif() -string_append(RDMA_LINK_FLAGS "-Wl,--whole-archive,${MLX5_LIB},--no-whole-archive") +string_append(RDMA_LINK_FLAGS "-Wl,--whole-archive,${MLX5_LIB},--no-whole-archive -Wl,--exclude-libs,ALL") -set(CMAKE_REQUIRED_FLAGS "-fPIC -shared -pthread -Wno-unused-command-line-argument ${RDMA_LINK_FLAGS} ${IBVERBS_LIB} ${RDMA_UTIL_LIB}") +set(CMAKE_REQUIRED_FLAGS "-fPIC -shared -pthread -Wno-unused-command-line-argument ${RDMA_LINK_FLAGS} ${IBVERBS_LIB}") set(CMAKE_REQUIRED_INCLUDES "${IBVERBS_INCLUDE_DIR}") set(CMAKE_REQUIRED_LIBRARIES "c") # force linkage by including libc explicitely CHECK_C_SOURCE_COMPILES(" @@ -73,5 +72,4 @@ add_vpp_plugin(rdma LINK_LIBRARIES ${IBVERBS_LIB} - ${RDMA_UTIL_LIB} ) -- cgit 1.2.3-korg