mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
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>
This commit is contained in:
@@ -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);
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user