eddd4c3601
ldconfig is run during rocm-opencl package installation. Installing libamdocl.so in /opt/rocm-xxx/lib exposes all ROCm libraries when /opt/rocm/lib is added to ldconfig. To prevent this, libamdocl.so is now installed in /opt/rocm-xxx/lib/opencl. ldconfig will use the updated path, limiting exposure to only libamdocl.so library. Co-authored-by: raramakr <raramakr@amd.com>
23 linhas
373 B
Bash
23 linhas
373 B
Bash
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
INSTALL_PATH=@CPACK_PACKAGING_INSTALL_PREFIX@
|
|
|
|
do_ldconfig() {
|
|
echo ${INSTALL_PATH}/@CMAKE_INSTALL_LIBDIR@/@AMDOCL_INSTALL_LIBDIR@ > /@CMAKE_INSTALL_SYSCONFDIR@/ld.so.conf.d/10-rocm-opencl.conf && ldconfig
|
|
|
|
}
|
|
|
|
case "$1" in
|
|
abort-deconfigure|abort-remove|abort-upgrade)
|
|
echo "$1"
|
|
;;
|
|
configure)
|
|
do_ldconfig
|
|
;;
|
|
*)
|
|
exit 0
|
|
;;
|
|
esac
|