File rocclr-hipamd-cmake.patch of Package rocclr
diff --git a/hipamd/hip-config-amd.cmake b/hipamd/hip-config-amd.cmake
index 6a00f8f43..cf6660ce9 100755
--- a/hipamd/hip-config-amd.cmake
+++ b/hipamd/hip-config-amd.cmake
@@ -42,7 +42,7 @@ else()
# set a default path for ROCM_PATH
if(NOT DEFINED ROCM_PATH)
- set(ROCM_PATH ${PACKAGE_PREFIX_DIR})
+ set(ROCM_PATH "/usr/rocm")
endif()
endif()
@@ -55,7 +55,7 @@ if(WIN32)
file(TO_CMAKE_PATH "${HIP_PATH}/../lc" HIP_CLANG_ROOT)
endif()
else()
- set(HIP_CLANG_ROOT "${ROCM_PATH}/llvm")
+ set(HIP_CLANG_ROOT "/usr")
endif()
if(NOT HIP_CXX_COMPILER)
@@ -63,7 +63,7 @@ if(NOT HIP_CXX_COMPILER)
endif()
if(NOT WIN32)
- find_dependency(AMDDeviceLibs)
+ find_dependency(AMDDeviceLibs HINTS ${ROCM_PATH} PATHS "/usr/rocm")
endif()
# If AMDGPU_TARGETS is not defined by the app, amdgpu-arch is run to find the gpu archs
@@ -72,7 +72,7 @@ if(NOT AMDGPU_TARGETS)
if (WIN32)
set(AMDGPU_ARCH "${HIP_CLANG_ROOT}/bin/amdgpu-arch.exe")
else()
- set(AMDGPU_ARCH "${HIP_CLANG_ROOT}/bin/amdgpu-arch")
+ set(AMDGPU_ARCH "${HIP_CLANG_ROOT}/bin/amdgpu-arch-rocm")
endif()
execute_process(
COMMAND ${AMDGPU_ARCH}
@@ -96,7 +96,7 @@ endif()
set(GPU_TARGETS "${AMDGPU_TARGETS}" CACHE STRING "GPU targets to compile for")
if(NOT WIN32)
- find_dependency(amd_comgr)
+ find_dependency(amd_comgr HINTS ${HIP_PATH} PATHS "/usr")
endif()
include( "${CMAKE_CURRENT_LIST_DIR}/hip-targets.cmake" )
@@ -105,7 +105,7 @@ include( "${CMAKE_CURRENT_LIST_DIR}/hip-targets.cmake" )
#This makes the cmake generated file xxxx-targets to supply the linker libraries
# without worrying other transitive dependencies
if(NOT WIN32)
- find_dependency(hsa-runtime64)
+ find_dependency(hsa-runtime64 HINTS ${HIP_PATH} PATHS "/usr")
find_dependency(Threads)
endif()
@@ -168,7 +168,7 @@ execute_process(
RESULT_VARIABLE CLANGRT_BUILTINS_FETCH_EXIT_CODE)
if( CLANGRT_Error )
- if (HIP_CXX_COMPILER MATCHES ".*clang\\+\\+")
+ if (HIP_CXX_COMPILER MATCHES ".*clang\\+\\+.*")
message(AUTHOR_WARNING "${HIP_CXX_COMPILER}: CLANGRT compiler options not supported.")
endif()
else()