mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2025-12-21 09:07:26 -08:00
dev-libs/rocm-device-libs: add 7.1.0
Signed-off-by: Patrick Lauer <patrick@gentoo.org>
This commit is contained in:
parent
afcec2ec2a
commit
b62f55cf68
@ -1,3 +1,4 @@
|
||||
DIST llvm-project-rocm-6.3.3.tar.gz 206663912 BLAKE2B 939527dbbcd0c4b4785e5cdbd7144149f169120506c2b5b00e84e8208e3877109e24cf58501a1317d1f9dcce0614cf47a0290cb2e0e10aa7b164bcb064c2ffbc SHA512 380d6ca72dd215b1996b14fe9b54f4981bd1d275aae22ed89f4f3efc46ec2988054cc98dcc45e1c678812c2bd3488ed6cf375ca193af4ad272a6cff7f2388872
|
||||
DIST llvm-project-rocm-6.4.3.tar.gz 218920681 BLAKE2B 85c29c1f66f9d23fa7fb6d98baf60cb08a8507a7b3a4c0a5054d9d4d3bc1fb7de56ddae583e37a36c7a3f17f9e57bd49777deca7560ca8b4882c1eea1db5b421 SHA512 b6b4149c6426793f4497dfd1200079b0caef4d5a6f49c1f3a301d70f5f7b322b850085ff2f89d55df1dfab6d6a97948fe4084d4ec14654ee97cdab26e71a45c0
|
||||
DIST llvm-project-rocm-7.0.2.tar.gz 228207703 BLAKE2B 0a46338e43eeb9ee484cf9b79488f38b96983ba0a5736d606b1b1d450b9c7aa214047200c3d6712b8053d742e2f014333b2db28feca7d0c8b6928282604e1f4e SHA512 b7916941711ec062aad518d752d213d2e6c846875956ade650da01fa02df94b2a8501c656c1333bb2febb1d46cc8266dd98fd509c72ac0c9c29321276a919450
|
||||
DIST llvm-project-rocm-7.1.0.tar.gz 228282149 BLAKE2B c4bbaf1842d91747a3f7a9ae8a8db0a4b2485394770f9be5782346de1c2c66c496629a820f4bc9418803c4abe2e629b44083b9d9a8b0ffe79431d04f71a7b191 SHA512 01fa89fcee6910d53407be6cfe3a83bec98260a48beca6393ca7e5991d283897da42a918c6e9888a9cee46adc9c4086dd4b4221e7e25d64108296b755669a7e7
|
||||
|
||||
97
dev-libs/rocm-device-libs/rocm-device-libs-7.1.0.ebuild
Normal file
97
dev-libs/rocm-device-libs/rocm-device-libs-7.1.0.ebuild
Normal file
@ -0,0 +1,97 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
LLVM_COMPAT=( 20 )
|
||||
inherit cmake flag-o-matic llvm-r1
|
||||
|
||||
MY_P=llvm-project-rocm-${PV}
|
||||
components=( "amd/device-libs" )
|
||||
|
||||
if [[ ${PV} == *9999 ]] ; then
|
||||
EGIT_REPO_URI="https://github.com/ROCm/llvm-project"
|
||||
inherit git-r3
|
||||
S="${WORKDIR}/${P}/${components[0]}"
|
||||
else
|
||||
SRC_URI="https://github.com/ROCm/llvm-project/archive/rocm-${PV}.tar.gz -> ${MY_P}.tar.gz"
|
||||
S="${WORKDIR}/${MY_P}/${components[0]}"
|
||||
KEYWORDS="~amd64"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Radeon Open Compute Device Libraries"
|
||||
HOMEPAGE="https://github.com/ROCm/llvm-project/tree/amd-staging/amd/device-libs"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0/$(ver_cut 1-2)"
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
BDEPEND="
|
||||
dev-build/rocm-cmake
|
||||
$(llvm_gen_dep "
|
||||
llvm-core/clang:\${LLVM_SLOT}
|
||||
llvm-core/lld:\${LLVM_SLOT}
|
||||
")
|
||||
"
|
||||
|
||||
CMAKE_BUILD_TYPE=Release
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-6.1.0-fix-llvm-link.patch"
|
||||
"${FILESDIR}/${PN}-6.2.0-test-bitcode-dir.patch"
|
||||
"${FILESDIR}/${PN}-6.4.2-cmake-4-compat.patch"
|
||||
)
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} == *9999 ]] ; then
|
||||
git-r3_fetch
|
||||
git-r3_checkout '' . '' "${components[@]}"
|
||||
else
|
||||
archive="${MY_P}.tar.gz"
|
||||
ebegin "Unpacking from ${archive}"
|
||||
tar -x -z -o \
|
||||
-f "${DISTDIR}/${archive}" \
|
||||
"${components[@]/#/${MY_P}/}" || die
|
||||
eend ${?}
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
sed -e "s:amdgcn/bitcode:lib/amdgcn/bitcode:" \
|
||||
-i "${S}/cmake/OCL.cmake" \
|
||||
-i "${S}/cmake/Packages.cmake" || die
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Do not trust CMake with autoselecting Clang, as it autoselects the latest one
|
||||
# producing too modern LLVM bitcode and causing linker errors in other packages.
|
||||
llvm_prepend_path "${LLVM_SLOT}"
|
||||
local -x CC=${CHOST}-clang
|
||||
local -x CXX=${CHOST}-clang++
|
||||
# Clean up unsupported flags for the switched compiler, see #936099
|
||||
strip-unsupported-flags
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
# install symlink, so that clang won't ask for "--rocm-device-lib-path" flag anymore
|
||||
local bitcodedir="$(clang -print-resource-dir)/$(get_libdir)/amdgcn/bitcode"
|
||||
dosym -r "/usr/lib/amdgcn/bitcode" "${bitcodedir#${EPREFIX}}"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# https://github.com/ROCm/llvm-project/issues/76
|
||||
# "Failing tests are on gfx that are not supported"
|
||||
local CMAKE_SKIP_TESTS=(
|
||||
compile_frexp__gfx600
|
||||
compile_fract__gfx600
|
||||
compile_fract__gfx700
|
||||
compile_atomic_work_item_fence__*
|
||||
)
|
||||
|
||||
cmake_src_test
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user