commit:     ff5673d31363d797f1e40afa8038b9a9fa4c56c1
Author:     Yiyang Wu <xgreenlandforwyy <AT> gmail <DOT> com>
AuthorDate: Fri Jan 27 05:37:34 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Feb  2 12:53:03 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff5673d3

dev-libs/rocm-comgr: enable tests

Includes a patch that fixes the failed test due to unsupported feature
of vanilla llvm, which is a better approach compares to
https://src.fedoraproject.org/rpms/rocm-compilersupport/c/84acb10b0c831e674a4d01e677a51d7c672d2f43?branch=rawhide

100% tests passed, 0 tests failed out of 29

Total Test time (real) =   7.45 sec
 * Tests succeeded.

Bug: https://bugs.gentoo.org/836475
Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../rocm-comgr/files/rocm-comgr-5.3.3-fix-tests.patch   | 17 +++++++++++++++++
 dev-libs/rocm-comgr/rocm-comgr-5.3.3-r1.ebuild          |  4 ++++
 2 files changed, 21 insertions(+)

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"

Reply via email to