Skip to content

Commit 0b9e691

Browse files
[RDC] Fix RPATH for lib/rdc/*.so and librdc_bootstrap.so
librdc_bootstrap.so does dlopen and doesn't need therock's fancy mangling of rpath. Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com> [rocm-systems] ROCm/rocm-systems#4011 (commit 6dec507)
1 parent b424f1d commit 0b9e691

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

rdc_libs/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,12 @@ if(RDC_LIB_MODULES)
115115
EXPORT rdcTargets
116116
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/${RDC} COMPONENT ${CLIENT_COMPONENT}
117117
)
118-
set_target_properties(${RDC_LIB_MODULES} PROPERTIES INSTALL_RPATH "\$ORIGIN:\$ORIGIN/..")
118+
set_target_properties(
119+
${RDC_LIB_MODULES}
120+
PROPERTIES
121+
INSTALL_RPATH "\$ORIGIN:\$ORIGIN/.."
122+
THEROCK_INSTALL_RPATH_ORIGIN "${CMAKE_INSTALL_LIBDIR}/${RDC}"
123+
)
119124
endif()
120125

121126
install(

rdc_libs/bootstrap/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ target_include_directories(
4848
# Set the VERSION and SOVERSION values
4949
set_property(TARGET ${BOOTSTRAP_LIB} PROPERTY SOVERSION "${VERSION_MAJOR}")
5050
set_property(TARGET ${BOOTSTRAP_LIB} PROPERTY VERSION "${SO_VERSION_STRING}")
51-
set_target_properties(${BOOTSTRAP_LIB} PROPERTIES INSTALL_RPATH "\$ORIGIN:\$ORIGIN/rdc")
51+
set_target_properties(
52+
${BOOTSTRAP_LIB}
53+
PROPERTIES INSTALL_RPATH "\$ORIGIN:\$ORIGIN/rdc" THEROCK_NO_INSTALL_RPATH TRUE
54+
)
5255

5356
# If the library is a release, strip the target library
5457
if("${CMAKE_BUILD_TYPE}" STREQUAL Release)

0 commit comments

Comments
 (0)