···1414, fetchurl
1515, gfortran
1616, gpuTargets ? [ ] # Non-CUDA targets, that is HIP
1717-, rocmPackages
1717+, rocmPackages_5
1818, lapack
1919, lib
2020, libpthreadstubs
···43434444 inherit (effectiveCudaPackages) cudaAtLeast cudaFlags cudaOlder;
4545 inherit (cudaFlags) cudaCapabilities;
4646+4747+ # move to newer ROCm version once supported
4848+ rocmPackages = rocmPackages_5;
46494750 # NOTE: The lists.subtractLists function is perhaps a bit unintuitive. It subtracts the elements
4851 # of the first list *from* the second list. That means:
···11+diff --git a/cmake/Packages.cmake b/cmake/Packages.cmake
22+index 07c60eb..c736b3e 100644
33+--- a/cmake/Packages.cmake
44++++ b/cmake/Packages.cmake
55+@@ -12,24 +12,29 @@ set_target_properties(${target} PROPERTIES
66+ IMPORTED_LOCATION \"${target_path}\")")
77+ endforeach()
88+ configure_file(AMDDeviceLibsConfig.cmake.in
99+- ${PACKAGE_PREFIX}/AMDDeviceLibsConfig.cmake
1010++ lib/cmake/AMDDeviceLibs/AMDDeviceLibsConfig.cmake
1111+ @ONLY)
1212+1313+1414+ set(install_path_suffix "amdgcn/bitcode")
1515+1616+ # Generate the install-tree package.
1717+-# We do not know the absolute path to the intall tree until we are installed,
1818+-# so we calculate it dynamically in AMD_DEVICE_LIBS_PREFIX_CODE and use
1919+-# relative paths in the target imports in AMD_DEVICE_LIBS_TARGET_CODE.
2020+-set(AMD_DEVICE_LIBS_PREFIX_CODE "
2121++if(IS_ABSOLUTE "${CMAKE_INSTALL_PREFIX}")
2222++ set(AMD_DEVICE_LIBS_PREFIX_CODE "set(AMD_DEVICE_LIBS_PREFIX \"${CMAKE_INSTALL_PREFIX}\")")
2323++else()
2424++ # We do not know the absolute path to the install tree until we are installed,
2525++ # so we calculate it dynamically in AMD_DEVICE_LIBS_PREFIX_CODE and use
2626++ # relative paths in the target imports in AMD_DEVICE_LIBS_TARGET_CODE.
2727++ set(AMD_DEVICE_LIBS_PREFIX_CODE "
2828+ # Derive absolute install prefix from config file path.
2929+ get_filename_component(AMD_DEVICE_LIBS_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)")
3030+-string(REGEX REPLACE "/" ";" count "${PACKAGE_PREFIX}")
3131+-foreach(p ${count})
3232+- set(AMD_DEVICE_LIBS_PREFIX_CODE "${AMD_DEVICE_LIBS_PREFIX_CODE}
3333++ string(REGEX REPLACE "/" ";" count "${PACKAGE_PREFIX}")
3434++ foreach(p ${count})
3535++ set(AMD_DEVICE_LIBS_PREFIX_CODE "${AMD_DEVICE_LIBS_PREFIX_CODE}
3636+ get_filename_component(AMD_DEVICE_LIBS_PREFIX \"\${AMD_DEVICE_LIBS_PREFIX}\" PATH)")
3737+-endforeach()
3838++ endforeach()
3939++endif()
4040++
4141+ set(AMD_DEVICE_LIBS_TARGET_CODE)
4242+ foreach(target ${AMDGCN_LIB_LIST})
4343+ get_target_property(target_name ${target} ARCHIVE_OUTPUT_NAME)