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 822DF1382C5 for ; Thu, 25 Mar 2021 17:56:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BB4BCE081A; Thu, 25 Mar 2021 17:56:02 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 621A5E0815 for ; Thu, 25 Mar 2021 17:56:02 +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 4F87133BE19 for ; Thu, 25 Mar 2021 17:56:01 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0769E5CE for ; Thu, 25 Mar 2021 17:56:00 +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: <1616694956.cb4f74b84500dafa0e51100870b028c3d9bf63c7.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.1.0.ebuild X-VCS-Directories: sys-devel/llvm-roc/ X-VCS-Committer: candrews X-VCS-Committer-Name: Craig Andrews X-VCS-Revision: cb4f74b84500dafa0e51100870b028c3d9bf63c7 X-VCS-Branch: master Date: Thu, 25 Mar 2021 17:56:00 +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: 4604424b-0575-4884-801a-354c72f12a15 X-Archives-Hash: c0589c3191b6c659eb7858c8ab92c936 commit: cb4f74b84500dafa0e51100870b028c3d9bf63c7 Author: Wilfried Holzke holzke net> AuthorDate: Wed Mar 24 15:39:54 2021 +0000 Commit: Craig Andrews gentoo org> CommitDate: Thu Mar 25 17:55:56 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb4f74b8 sys-devel/llvm-roc: Version bump to 4.1.0 Signed-off-by: Wilfried Holzke holzke.net> Package-Manager: Portage-3.0.13, Repoman-3.0.2 Closes: https://github.com/gentoo/gentoo/pull/20103 Signed-off-by: Craig Andrews gentoo.org> sys-devel/llvm-roc/Manifest | 1 + sys-devel/llvm-roc/llvm-roc-4.1.0.ebuild | 93 ++++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+) diff --git a/sys-devel/llvm-roc/Manifest b/sys-devel/llvm-roc/Manifest index 352199eee19..d69ea4e31ba 100644 --- a/sys-devel/llvm-roc/Manifest +++ b/sys-devel/llvm-roc/Manifest @@ -4,3 +4,4 @@ DIST llvm-rocm-ocl-3.8.0.tar.gz 117004300 BLAKE2B 13c3213f0fb951fb9d574e8f6d76bb DIST llvm-rocm-ocl-3.9.0.tar.gz 123591368 BLAKE2B 54b44d705e7704921df1914bac6dc1da8e420f9383efb698a9cf6a339b653d71cad29aa077a9e24d6764ca81fb8dc55fa70abb0cfac004d40f7d811e20ec9945 SHA512 3404390506b33c1de1d05980fafb219692985f38b52d852e9a47ab94e57228caa25ccd0d0d69da656281de32c75e001f60cb9f22453e70fea7b39d065d4333af DIST llvm-rocm-ocl-4.0.0.tar.gz 123595983 BLAKE2B 69dd47a50a53cf7d8168f872778bcda0e028907c2341b165f40152bdf03b668ee6c209dc60fa1018dde2a946d891f15eb92a38cfbc12bb5798dd132c1ce79bf1 SHA512 2ac3d643e0bee72239089003cd2889711a7cd58dc588467fb0ca0a50bec264fda992aa2e3352d5210011a9dc1eea4dd9eacdc7d0c313cd69c7b491df126a4e4e DIST llvm-rocm-ocl-4.0.1.tar.gz 123608276 BLAKE2B dd5a4d6bc198c7fb6fdc2514cd8c4533a2df6ded7a574c9b4762cda3cb65498a464a0e78427db94db05b468a29ce78d3d8131ac7c6e42953fc503896732474e3 SHA512 d23dceaee2badf46cda27aa725bce5b82bab2fba7d1c2220fedb4795eee455de5077b4ff7299ecd6850eeb0bbdb131ea12a699357f373aef818758d845550f04 +DIST llvm-rocm-ocl-4.1.0.tar.gz 128913932 BLAKE2B 15a041ec7b9fec91e409c8ab98ff88f2d15ce58822aa8a77a26ff21416378a4a77a5904fce4e26c5447653da4ec2dbbb5bfec4ae70c72e8e64b2a5f5986ffb92 SHA512 8576e5a43754a9587613f166dc6cad18890812f07bfa55e563ab3de150b6f01ae1b5515aaaf4eef238a7f79e87890533ce791ef07528e4557ea8290c2642ebd3 diff --git a/sys-devel/llvm-roc/llvm-roc-4.1.0.ebuild b/sys-devel/llvm-roc/llvm-roc-4.1.0.ebuild new file mode 100644 index 00000000000..eb7e40df837 --- /dev/null +++ b/sys-devel/llvm-roc/llvm-roc-4.1.0.ebuild @@ -0,0 +1,93 @@ +# 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="virtual/cblas + dev-libs/libxml2 + sys-libs/zlib + sys-libs/ncurses:=" +DEPEND="${RDEPEND}" +PDEPEND="dev-libs/rocr-runtime" + +S="${WORKDIR}/llvm-project-rocm-${PV}/llvm" + +PATCHES=( + "${FILESDIR}/${PN}-3.7.0-current_pos.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.0.0-hip-location.patch" + + if [[ -n ${EPREFIX} ]]; then + pushd "${S}"/../clang >/dev/null || die + sed -i -e "s@DEFAULT_SYSROOT \"\"@DEFAULT_SYSROOT \"${EPREFIX}\"@" CMakeLists.txt + 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 + 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 + 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 + + 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" + -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}" +}