summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-fix-tests.patch17
-rw-r--r--dev-libs/rocm-comgr/rocm-comgr-5.3.3-r1.ebuild4
2 files changed, 21 insertions, 0 deletions
diff --git a/dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-fix-tests.patch b/dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-fix-tests.patch
new file mode 100644
index 000000000000..08a40460c762
--- /dev/null
+++ b/dev-libs/rocm-comgr/files/rocm-comgr-5.3.3-fix-tests.patch
@@ -0,0 +1,17 @@
+Vanilla LLVM does not support calling AMDGPU_KERNEL across different sources/bitcodes.
+Without this patch https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/issues/45 occurs.
+Reference: https://github.com/llvm/llvm-project/issues/60313
+===================================================================
+--- comgr.orig/test/source1.cl
++++ comgr/test/source1.cl
+@@ -35,7 +35,9 @@
+
+ #include "include-a.h"
+
++void kernel source3(__global int *j) { *j = FOO; }
++
+ void kernel source1(__global int *j) {
+ *j += 2;
+- source2(j);
++ source3(j);
+ }
diff --git a/dev-libs/rocm-comgr/rocm-comgr-5.3.3-r1.ebuild b/dev-libs/rocm-comgr/rocm-comgr-5.3.3-r1.ebuild
index 0215adeaba17..c00adc6c1727 100644
--- a/dev-libs/rocm-comgr/rocm-comgr-5.3.3-r1.ebuild
+++ b/dev-libs/rocm-comgr/rocm-comgr-5.3.3-r1.ebuild
@@ -17,6 +17,9 @@ else
KEYWORDS="~amd64"
fi
+IUSE="test"
+RESTRICT="!test? ( test )"
+
PATCHES=(
"${FILESDIR}/${PN}-5.1.3-clang-fix-include.patch"
"${FILESDIR}/${PN}-5.1.3-rocm-path.patch"
@@ -24,6 +27,7 @@ PATCHES=(
"${FILESDIR}/0001-Specify-clang-exe-path-in-Driver-Creation.patch"
"${FILESDIR}/0001-Find-CLANG_RESOURCE_DIR-using-clang-print-resource-d.patch"
"${FILESDIR}/${PN}-5.3.3-HIPIncludePath-not-needed.patch"
+ "${FILESDIR}/${PN}-5.3.3-fix-tests.patch"
)
DESCRIPTION="Radeon Open Compute Code Object Manager"