summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/rocm-comgr/files/rocm-comgr-5.7.1-fix-tests-rocm-path.patch')
-rw-r--r--dev-libs/rocm-comgr/files/rocm-comgr-5.7.1-fix-tests-rocm-path.patch12
1 files changed, 12 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