File openmp-use-in-tree-hsa-runtime.patch of Package rocm-llvm
diff --git a/openmp/libomptarget/hostexec/CMakeLists.txt b/openmp/libomptarget/hostexec/CMakeLists.txt
index dc8b255b3..b80b81ffa 100644
--- a/openmp/libomptarget/hostexec/CMakeLists.txt
+++ b/openmp/libomptarget/hostexec/CMakeLists.txt
@@ -19,7 +19,7 @@ endif()
# If we are bootstrapping hsa via external project we need to use find_library
# as it will not be installed.
if(DEFINED LIBOMPTARGET_EXTERNAL_PROJECT_HSA_PATH)
- find_library(HSA_RUNTIME hsa-runtime64 HINTS ${CMAKE_BINARY_DIR}/../../runtimes/rocr-runtime-prefix/src/rocr-runtime-build ${CMAKE_INSTALL_PREFIX} PATHS /opt/rocm)
+ find_library(HSA_RUNTIME hsa-runtime64 HINTS ${LIBOMPTARGET_EXTERNAL_PROJECT_HSA_PATH})
else()
# As of rocm-3.7, hsa is installed with cmake packages and kmt is found via hsa
find_package(hsa-runtime64 QUIET 1.2.0 HINTS ${CMAKE_INSTALL_PREFIX} PATHS /opt/rocm)
diff --git a/openmp/libomptarget/plugins-nextgen/amdgpu/CMakeLists.txt b/openmp/libomptarget/plugins-nextgen/amdgpu/CMakeLists.txt
index 1f0a2a5aa..2a21ab008 100644
--- a/openmp/libomptarget/plugins-nextgen/amdgpu/CMakeLists.txt
+++ b/openmp/libomptarget/plugins-nextgen/amdgpu/CMakeLists.txt
@@ -22,7 +22,7 @@ endif()
# If we are bootstrapping hsa via external project we need to use find_library
# as it will not be installed.
if(DEFINED LIBOMPTARGET_EXTERNAL_PROJECT_HSA_PATH)
- find_library(HSA_RUNTIME hsa-runtime64 HINTS ${CMAKE_BINARY_DIR}/../../runtimes/rocr-runtime-prefix/src/rocr-runtime-build ${CMAKE_INSTALL_PREFIX})
+ find_library(HSA_RUNTIME hsa-runtime64 HINTS ${LIBOMPTARGET_EXTERNAL_PROJECT_HSA_PATH})
else()
# As of rocm-3.7, hsa is installed with cmake packages and kmt is found via hsa
find_package(hsa-runtime64 QUIET 1.2.0 HINTS ${CMAKE_INSTALL_PREFIX} PATHS /opt/rocm)