summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSv. Lockal <lockalsash@gmail.com>2023-11-02 21:22:34 +0000
committerSam James <sam@gentoo.org>2024-03-08 19:21:56 +0000
commit7a3035702e3527a0e4a2140dd620d3f9221324f0 (patch)
tree5a9b3fdba87836548512eec9e39408d49539e2a3 /dev-libs/rocm-comgr
parentdev-util/rocm-smi: add 5.7.1 (diff)
downloadgentoo-7a3035702e3527a0e4a2140dd620d3f9221324f0.tar.gz
gentoo-7a3035702e3527a0e4a2140dd620d3f9221324f0.tar.bz2
gentoo-7a3035702e3527a0e4a2140dd620d3f9221324f0.zip
dev-libs/rocm-comgr: add fix-tests-rocm-path patch
Signed-off-by: Sv. Lockal <lockalsash@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs/rocm-comgr')
-rw-r--r--dev-libs/rocm-comgr/files/rocm-comgr-5.7.1-fix-tests-rocm-path.patch12
-rw-r--r--dev-libs/rocm-comgr/rocm-comgr-5.7.1.ebuild1
2 files changed, 13 insertions, 0 deletions
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.7.1-fix-tests-rocm-path.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.7.1-fix-tests-rocm-path.patch
new file mode 100644
index 000000000000..30a44577b1aa
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-5.7.1-fix-tests-rocm-path.patch
@@ -0,0 +1,12 @@
+Vanilla clang requires either -nogpulib or both --rocm-path and --rocm-device-lib-path flags
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -39,7 +39,7 @@ endmacro()
+ macro(add_test_input_bitcode name input output)
+ add_custom_command(
+ OUTPUT "${output}"
+- COMMAND "$<TARGET_FILE:clang>" -c --offload-arch=gfx906 -emit-llvm -fgpu-rdc
++ COMMAND "$<TARGET_FILE:clang>" -c --offload-arch=gfx906 -emit-llvm -fgpu-rdc --rocm-path=@GENTOO_PORTAGE_EPREFIX@/usr --hip-device-lib-path=@GENTOO_PORTAGE_EPREFIX@/usr/lib/amdgcn/bitcode
+ --gpu-bundle-output ${ARGN} "${CMAKE_CURRENT_SOURCE_DIR}/${input}"
+ -o "${output}"
+ VERBATIM
diff --git a/dev-libs/rocm-comgr/rocm-comgr-5.7.1.ebuild b/dev-libs/rocm-comgr/rocm-comgr-5.7.1.ebuild
index ff181f1b4615..099a4def161a 100644
--- a/dev-libs/rocm-comgr/rocm-comgr-5.7.1.ebuild
+++ b/dev-libs/rocm-comgr/rocm-comgr-5.7.1.ebuild
@@ -50,6 +50,7 @@ src_prepare() {
sed '/sys::path::append(HIPPath/s,"hip","",' -i src/comgr-env.cpp || die
sed "/return LLVMPath;/s,LLVMPath,llvm::SmallString<128>(\"$(get_llvm_prefix ${LLVM_MAX_SLOT})\")," -i src/comgr-env.cpp || die
eapply $(prefixify_ro "${FILESDIR}"/${PN}-5.0-rocm_path.patch)
+ eapply $(prefixify_ro "${FILESDIR}"/${PN}-5.7.1-fix-tests-rocm-path.patch)
cmake_src_prepare
}