From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 75A0A158CB7 for ; Thu, 19 Aug 2021 19:46:32 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 905ECE0825; Thu, 19 Aug 2021 19:46:31 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6C2BBE0825 for ; Thu, 19 Aug 2021 19:46:31 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4DD23335DCD for ; Thu, 19 Aug 2021 19:46:30 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0B89B7BD for ; Thu, 19 Aug 2021 19:46:29 +0000 (UTC) From: "Craig Andrews" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Craig Andrews" Message-ID: <1629402380.6347743a24727acb0defd04b54c6bd1ed09c5d8e.candrews@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/llvm-roc/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-devel/llvm-roc/Manifest sys-devel/llvm-roc/llvm-roc-4.3.0.ebuild X-VCS-Directories: sys-devel/llvm-roc/ X-VCS-Committer: candrews X-VCS-Committer-Name: Craig Andrews X-VCS-Revision: 6347743a24727acb0defd04b54c6bd1ed09c5d8e X-VCS-Branch: master Date: Thu, 19 Aug 2021 19:46:29 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: f5889576-fdb5-4950-9585-f979484a3a9e X-Archives-Hash: e022cd29e0562a05ff80beefd5b256bc commit: 6347743a24727acb0defd04b54c6bd1ed09c5d8e Author: YiyangWu gmail com> AuthorDate: Thu Aug 19 13:25:12 2021 +0000 Commit: Craig Andrews gentoo org> CommitDate: Thu Aug 19 19:46:20 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6347743a sys-devel/llvm-roc: bump version to 4.3.0 Die if sed command fails. Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Yiyang Wu gmail.com> Closes: https://github.com/gentoo/gentoo/pull/22027 Signed-off-by: Craig Andrews gentoo.org> sys-devel/llvm-roc/Manifest | 1 + sys-devel/llvm-roc/llvm-roc-4.3.0.ebuild | 94 ++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) diff --git a/sys-devel/llvm-roc/Manifest b/sys-devel/llvm-roc/Manifest index 34ffa4e3f6b..80142c71322 100644 --- a/sys-devel/llvm-roc/Manifest +++ b/sys-devel/llvm-roc/Manifest @@ -7,3 +7,4 @@ DIST llvm-rocm-ocl-4.0.1.tar.gz 123608276 BLAKE2B dd5a4d6bc198c7fb6fdc2514cd8c45 DIST llvm-rocm-ocl-4.1.0.tar.gz 128913932 BLAKE2B 15a041ec7b9fec91e409c8ab98ff88f2d15ce58822aa8a77a26ff21416378a4a77a5904fce4e26c5447653da4ec2dbbb5bfec4ae70c72e8e64b2a5f5986ffb92 SHA512 8576e5a43754a9587613f166dc6cad18890812f07bfa55e563ab3de150b6f01ae1b5515aaaf4eef238a7f79e87890533ce791ef07528e4557ea8290c2642ebd3 DIST llvm-rocm-ocl-4.1.1.tar.gz 128914019 BLAKE2B 9806d1da497e9d9864fd015fc92f5e2d8a6077315d96538064357a38347bc9180948c65cdca9e29574b40f8df62c0660762731564822ac9e8b5364bebf016e43 SHA512 0e4c6b9b0c0330d58616f22d8ec6ebdd6c83aef9ce9968765ac56c022bcd76cba8af5a6cdfb47ed560b33cd67832ac5b026502357af6caec4ab699f1443163fd DIST llvm-rocm-ocl-4.2.0.tar.gz 132337711 BLAKE2B f08781f881f2853cd551828ef9190c1253e33ca1bfb13aac790b6484838fe5481be9519609ea9cf4bc09a6c8631c54a567123dfe97c25498c51c464d215049de SHA512 694c37c707c84d18cddb92054d8d59e1eea82c9c9928d0111992cbae1421d6bb614a0889891993b444a821c35fa6e91c801ac8555761c2cd0803f89981475952 +DIST llvm-rocm-ocl-4.3.0.tar.gz 134152148 BLAKE2B aaadb75f0b2f72d3c4dca4b375a38b2806491b854d45f6f95bc398c4b7685fccbc4e6df86869c200f08ced5ddb540344ace2402819cdd3c27c5167a71a78bb3b SHA512 4f85f06d5331770b8697bbe62776579ed02016d899ed9c5328d5953fc5992a0996f7934e7417d6062e77a317d242295803fbeab04b0428d5f257cecd4c25c0cd diff --git a/sys-devel/llvm-roc/llvm-roc-4.3.0.ebuild b/sys-devel/llvm-roc/llvm-roc-4.3.0.ebuild new file mode 100644 index 00000000000..f055da5b939 --- /dev/null +++ b/sys-devel/llvm-roc/llvm-roc-4.3.0.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake + +DESCRIPTION="Radeon Open Compute llvm,lld,clang" +HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm/" +SRC_URI="https://github.com/RadeonOpenCompute/llvm-project/archive/rocm-${PV}.tar.gz -> llvm-rocm-ocl-${PV}.tar.gz" + +LICENSE="UoI-NCSA rc BSD public-domain" +SLOT="0" +KEYWORDS="~amd64" +IUSE="debug +runtime" + +RDEPEND=" + dev-libs/libxml2 + sys-libs/zlib + sys-libs/ncurses:=" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/llvm-project-rocm-${PV}/llvm" + +PATCHES=( + "${FILESDIR}/${PN}-4.2.0-current_pos.patch" + "${FILESDIR}/${PN}-4.2.0-add_Object.patch" +) + +CMAKE_BUILD_TYPE=RelWithDebInfo + +src_prepare() { + cd "${WORKDIR}/llvm-project-rocm-${PV}" || die + eapply "${FILESDIR}/${PN}-3.0.0-add_libraries.patch" + eapply "${FILESDIR}/${PN}-4.0.0-remove-isystem-usr-include.patch" + eapply "${FILESDIR}/${PN}-4.2.0-cyclades.patch" + + if [[ -n ${EPREFIX} ]]; then + pushd "${S}"/../clang >/dev/null || die + sed -i -e "s@DEFAULT_SYSROOT \"\"@DEFAULT_SYSROOT \"${EPREFIX}\"@" CMakeLists.txt || die + eend $? + ebegin "Use "${EPREFIX}" as default sysroot" + cd lib/Driver/ToolChains >/dev/null || die + ebegin "Use dynamic linker from ${EPREFIX}" + sed -i -e "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" Linux.cpp || die + eend $? + + ebegin "Remove --sysroot call on ld for native toolchain" + sed -i -e "$(grep -n -B1 sysroot= Gnu.cpp | sed -ne '{1s/-.*//;1p}'),+1 d" Gnu.cpp || die + eend $? + popd >/dev/null || die + fi + + # handled by sysroot, don't prefixify here. + sed -e 's:/opt/rocm:/usr/lib/hip:' \ + -i "${S}"/../clang/lib/Driver/ToolChains/AMDGPU.cpp || die + + eapply_user + cmake_src_prepare +} + +src_configure() { + PROJECTS="clang;lld" + + if usex runtime; then + PROJECTS+=";compiler-rt" + fi + + local mycmakeargs=( + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/roc" + -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON + -DLLVM_ENABLE_PROJECTS="${PROJECTS}" + -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86" + -DLLVM_BUILD_DOCS=NO + -DLLVM_ENABLE_OCAMLDOC=OFF + -DLLVM_ENABLE_SPHINX=NO + -DLLVM_ENABLE_DOXYGEN=OFF + -DLLVM_INSTALL_UTILS=ON + -DLLVM_VERSION_SUFFIX=roc + -DOCAMLFIND=NO + ) + + use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" + + cmake_src_configure +} + +src_install() { + cmake_src_install + cat > "99${PN}" <<-EOF + LDPATH="${EROOT}/usr/lib/llvm/roc/lib" + EOF + doenvd "99${PN}" +}