mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-17 14:49:30 -07:00
dev-libs/rocm-comgr: add 7.2.0
Signed-off-by: Sv. Lockal <lockalsash@gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/45826 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -2,3 +2,4 @@ DIST llvm-project-rocm-6.3.3.tar.gz 206663912 BLAKE2B 939527dbbcd0c4b4785e5cdbd7
|
||||
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
|
||||
DIST llvm-project-rocm-7.2.0.tar.gz 249851021 BLAKE2B f17a1c753ed4325ed15f5a007e770d5004bf53493af98619830105f1a6b0edc52ada1f2eaa8d5cf912158d36dd9f1aaedd42846947ab6ce065ca72aa21873452 SHA512 cc68b61605e89291d8417e438e4134a6cb7c5112145fe0ac72e358ddbf300dc86bbed18a9bc143e86d5f4085b327e1c5f81e14b6d17001605d63c1171c29841e
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
LLVM-22 compatibility fixes.
|
||||
Partially backports https://github.com/ROCm/llvm-project/commit/0216fcfc5d2a4f3384873f6e9ac70198760d5a52
|
||||
--- a/src/comgr-compiler.cpp
|
||||
+++ b/src/comgr-compiler.cpp
|
||||
@@ -659,7 +659,7 @@ amd_comgr_status_t executeCommand(const Command &Job, raw_ostream &LogS,
|
||||
|
||||
std::unique_ptr<CompilerInstance> Clang(new CompilerInstance());
|
||||
Clang->setVerboseOutputStream(LogS);
|
||||
- Clang->setFileManager(new FileManager(Clang->getFileSystemOpts(), &FS));
|
||||
+ Clang->setVirtualFileSystem(&FS);
|
||||
if (!Argv.back()) {
|
||||
Argv.pop_back();
|
||||
}
|
||||
@@ -909,8 +909,7 @@ amd_comgr_status_t AMDGPUCompiler::processFile(DataObject *Input,
|
||||
}
|
||||
|
||||
// By default clang driver will ask CC1 to leak memory.
|
||||
- Argv.push_back("-Xclang");
|
||||
- Argv.push_back("-no-disable-free");
|
||||
+ Argv.push_back("-disable-free=false");
|
||||
|
||||
Argv.push_back(InputFilePath);
|
||||
|
||||
92
dev-libs/rocm-comgr/rocm-comgr-7.2.0.ebuild
Normal file
92
dev-libs/rocm-comgr/rocm-comgr-7.2.0.ebuild
Normal file
@@ -0,0 +1,92 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
LLVM_COMPAT=( 22 )
|
||||
|
||||
inherit cmake llvm-r2
|
||||
|
||||
MY_P=llvm-project-rocm-${PV}
|
||||
components=( "amd/comgr" )
|
||||
|
||||
DESCRIPTION="Radeon Open Compute Code Object Manager"
|
||||
HOMEPAGE="https://github.com/ROCm/llvm-project/tree/amd-staging/amd/comgr"
|
||||
SRC_URI="https://github.com/ROCm/llvm-project/archive/rocm-${PV}.tar.gz -> ${MY_P}.tar.gz"
|
||||
S="${WORKDIR}/${MY_P}/${components[0]}"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0/$(ver_cut 1-2)"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-6.4.1-extend-isa-compatibility-check.patch"
|
||||
"${FILESDIR}/${PN}-6.1.0-dont-add-nogpulib.patch"
|
||||
"${FILESDIR}/${PN}-7.2.0-llvm-22-compat.patch"
|
||||
)
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/rocm-device-libs:${SLOT}
|
||||
llvm-runtimes/clang-runtime:=
|
||||
$(llvm_gen_dep "
|
||||
llvm-core/clang:\${LLVM_SLOT}=
|
||||
llvm-core/lld:\${LLVM_SLOT}=
|
||||
llvm-core/llvm:\${LLVM_SLOT}=
|
||||
")
|
||||
dev-util/hipcc:${SLOT}
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
# Circular dependency: to build tests, hip compiler must be functional
|
||||
BDEPEND="test? ( dev-util/hip:${SLOT} )"
|
||||
|
||||
CMAKE_BUILD_TYPE=Release
|
||||
|
||||
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:\${CLANG_CMAKE_DIR}/../../../\*:${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/include:" \
|
||||
-i cmake/opencl_header.cmake || die
|
||||
|
||||
# Backports for llvm-22 from amd-staging:
|
||||
# https://github.com/ROCm/llvm-project/commit/ebcaa3d9226921c8761a5291526291e54611e4a4
|
||||
# https://github.com/ROCm/llvm-project/commit/ccb14ba83fd6bdc01423f71944b4676f740b97cc
|
||||
sed -e "s:Driver/Options.h:Options/Options.h:" \
|
||||
-e "s/clang::driver::options/clang::options/" \
|
||||
-e "s/Driver::GetResourcesPath/GetResourcesPath/" \
|
||||
-i src/comgr-compiler.cpp || die
|
||||
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
llvm_prepend_path "${LLVM_SLOT}"
|
||||
|
||||
local mycmakeargs=(
|
||||
-DCMAKE_STRIP="" # disable stripping defined at lib/comgr/CMakeLists.txt:58
|
||||
-DBUILD_TESTING=$(usex test ON OFF)
|
||||
-DCOMGR_DISABLE_SPIRV=ON # requires ROCm/SPIRV-LLVM-Translator (fork of dev-util/spirv-llvm-translator)
|
||||
)
|
||||
# Prevent CMake from finding systemwide hip, which breaks tests
|
||||
use test && mycmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_hip=ON )
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_test() {
|
||||
cmake_src_test
|
||||
}
|
||||
Reference in New Issue
Block a user