diff mbox

[rdma-core,05/17] rdmacm: Drop SONAME in rspreload

Message ID 1475787103-13283-6-git-send-email-jgunthorpe@obsidianresearch.com (mailing list archive)
State Accepted
Headers show

Commit Message

Jason Gunthorpe Oct. 6, 2016, 8:51 p.m. UTC
A LD_PRELOAD library should not have a SONAME, switch cmake from
SHARED to MODEL mode.

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
---
 librdmacm/src/CMakeLists.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/librdmacm/src/CMakeLists.txt b/librdmacm/src/CMakeLists.txt
index 0a60786c5f7a..bff631ea7f0d 100644
--- a/librdmacm/src/CMakeLists.txt
+++ b/librdmacm/src/CMakeLists.txt
@@ -22,10 +22,12 @@  target_link_libraries(rdmacm LINK_PRIVATE ${CMAKE_THREAD_LIBS_INIT})
 
 # The preload library is a bit special, it needs to be open coded
 # Since it is a LD_PRELOAD it has no soname, and is installed in sub dir
-add_library(rspreload SHARED
+add_library(rspreload MODULE
   preload.c
   indexer.c
   )
+# Even though this is a module we still want to use Wl,--no-undefined
+set_target_properties(rspreload PROPERTIES LINK_FLAGS ${CMAKE_SHARED_LINKER_FLAGS})
 set_target_properties(rspreload PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${BUILD_LIB}")
 rdma_set_library_map(rspreload librspreload.map)
 target_link_libraries(rspreload LINK_PRIVATE