diff options
author | Sv. Lockal <lockalsash@gmail.com> | 2024-03-17 13:04:07 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-06-26 10:18:52 +0100 |
commit | 64d64910378e95f6ee7a85c3bd9640424227c2d5 (patch) | |
tree | f67a6e4282c005f59edd6f6e05942d6c61fd13cc /dev-libs | |
parent | dev-libs/rocm-device-libs: fix tests (diff) | |
download | gentoo-64d64910378e95f6ee7a85c3bd9640424227c2d5.tar.gz gentoo-64d64910378e95f6ee7a85c3bd9640424227c2d5.tar.bz2 gentoo-64d64910378e95f6ee7a85c3bd9640424227c2d5.zip |
dev-libs/rocm-device-libs: add llvm-18 compatibility patch
Changes:
* add llvm-18 compatibility patch (bug: https://github.com/ROCm/ROCm-Device-Libs/issues/96)
* remove RESTRICT variable, it was shadowed and non-functional
* rename RadeonOpenCompute -> ROCm
* update llvm eclass to r1
* add comment about llvm 18 compatibility issue
* add myself to maintainers
Signed-off-by: Sv. Lockal <lockalsash@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs')
3 files changed, 40 insertions, 10 deletions
diff --git a/dev-libs/rocm-device-libs/files/rocm-device-libs-6.0.0-add-gws-attribute.patch b/dev-libs/rocm-device-libs/files/rocm-device-libs-6.0.0-add-gws-attribute.patch new file mode 100644 index 000000000000..1aaecbb0c1e6 --- /dev/null +++ b/dev-libs/rocm-device-libs/files/rocm-device-libs-6.0.0-add-gws-attribute.patch @@ -0,0 +1,22 @@ +Fix compatilibity with Clang-18 +https://github.com/ROCm/ROCm-Device-Libs/issues/96 + +Backports https://github.com/ROCm/llvm-project/commit/688c78d85caf499957db175811f8b00c7c818f83 +--- a/ockl/src/cg.cl ++++ b/ockl/src/cg.cl +@@ -84,13 +84,13 @@ multi_grid_sync(__global struct mg_sync *s, uint members) + } + } + +-void ++__attribute__((target("gws"))) void + __ockl_gws_init(uint nwm1, uint rid) + { + __builtin_amdgcn_ds_gws_init(nwm1, rid); + } + +-void ++__attribute__((target("gws"))) void + __ockl_gws_barrier(uint nwm1, uint rid) + { + __builtin_amdgcn_ds_gws_barrier(nwm1, rid);
\ No newline at end of file diff --git a/dev-libs/rocm-device-libs/metadata.xml b/dev-libs/rocm-device-libs/metadata.xml index c47f589544e4..cbbf3a273306 100644 --- a/dev-libs/rocm-device-libs/metadata.xml +++ b/dev-libs/rocm-device-libs/metadata.xml @@ -5,7 +5,11 @@ <email>candrews@gentoo.org</email> <name>Craig Andrews</name> </maintainer> + <maintainer type="person"> + <email>lockalsash@gmail.com</email> + <name>Sv. Lockal</name> + </maintainer> <upstream> - <remote-id type="github">RadeonOpenCompute/ROCm-Device-Libs</remote-id> + <remote-id type="github">ROCm/ROCm-Device-Libs</remote-id> </upstream> </pkgmetadata> diff --git a/dev-libs/rocm-device-libs/rocm-device-libs-6.0.0.ebuild b/dev-libs/rocm-device-libs/rocm-device-libs-6.0.0.ebuild index f9c4313d40ac..f4371bae36c0 100644 --- a/dev-libs/rocm-device-libs/rocm-device-libs-6.0.0.ebuild +++ b/dev-libs/rocm-device-libs/rocm-device-libs-6.0.0.ebuild @@ -3,29 +3,32 @@ EAPI=8 -inherit cmake llvm - -LLVM_MAX_SLOT=17 +LLVM_COMPAT=( 17 ) +inherit cmake llvm-r1 if [[ ${PV} == *9999 ]] ; then - EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCm-Device-Libs/" + EGIT_REPO_URI="https://github.com/ROCm/ROCm-Device-Libs.git" inherit git-r3 S="${WORKDIR}/${P}/src" else - SRC_URI="https://github.com/RadeonOpenCompute/ROCm-Device-Libs/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz" + SRC_URI="https://github.com/ROCm/ROCm-Device-Libs/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz" S="${WORKDIR}/ROCm-Device-Libs-rocm-${PV}" KEYWORDS="~amd64" fi DESCRIPTION="Radeon Open Compute Device Libraries" -HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-Device-Libs" +HOMEPAGE="https://github.com/ROCm/ROCm-Device-Libs" LICENSE="MIT" SLOT="0/$(ver_cut 1-2)" IUSE="test" RESTRICT="strip !test? ( test )" -RDEPEND="sys-devel/clang:${LLVM_MAX_SLOT}" +RDEPEND=" + $(llvm_gen_dep ' + sys-devel/clang:${LLVM_SLOT} + ') +" DEPEND="${RDEPEND}" CMAKE_BUILD_TYPE=Release @@ -34,7 +37,8 @@ PATCHES=( "${FILESDIR}/${PN}-5.5.0-test-bitcode-dir.patch" "${FILESDIR}/${PN}-5.5.1-fix-llvm-link.patch" "${FILESDIR}/${PN}-5.5.1-remove-gfx700-tests.patch" - ) + "${FILESDIR}/${PN}-6.0.0-add-gws-attribute.patch" +) src_prepare() { sed -e "s:amdgcn/bitcode:lib/amdgcn/bitcode:" -i "${S}/cmake/OCL.cmake" || die @@ -44,7 +48,7 @@ src_prepare() { src_configure() { local mycmakeargs=( - -DLLVM_DIR="$(get_llvm_prefix "${LLVM_MAX_SLOT}")" + -DLLVM_DIR="$(get_llvm_prefix)" ) cmake_src_configure } |