From 8d5dbd847cbc704a6a06405856e94b461011afe3 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 27 Mar 2021 06:06:27 +0000 Subject: gentoo resync : 27.03.2021 --- sys-devel/llvm-roc/Manifest | 2 + sys-devel/llvm-roc/llvm-roc-4.1.0.ebuild | 93 ++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 sys-devel/llvm-roc/llvm-roc-4.1.0.ebuild (limited to 'sys-devel/llvm-roc') diff --git a/sys-devel/llvm-roc/Manifest b/sys-devel/llvm-roc/Manifest index 8a45d93d219a..1e651c60719a 100644 --- a/sys-devel/llvm-roc/Manifest +++ b/sys-devel/llvm-roc/Manifest @@ -9,6 +9,7 @@ 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 EBUILD llvm-roc-3.10.0.ebuild 1536 BLAKE2B 60a1d393a5df2291d971e67f9bbd2675611f935530410e9f9f18cc2178606de298266200c258c2d23bd857198ff41b292d072d0e2c03154b9a640a9ecabf94af SHA512 46771c99d57027271c61dc45d057ee5848745affa5018d218da166dfd4c20f58a38ab2dfede1c42ccb306264b0c81ea6d267353bad34cb6a0d34c2d7255a3608 EBUILD llvm-roc-3.7.0-r1.ebuild 1397 BLAKE2B 08aec56b8ab26093f28a9118ca043adb35dcb84ae5899da5890cbeecb5d10f8d6b08e767a490272a5f35d1b3a5ee8d912a52b448ee57582cda9f99fce57ec8ec SHA512 745f2a9fa18bc3b9d76a324beb1e5165f9be8f720ef133b35e1509c08c08e48872ec4c7402e52d29a3b493e27729a43081fd0e90afe90d30b64d6da3f046e824 EBUILD llvm-roc-3.8.0.ebuild 1492 BLAKE2B 73fd9fd2c47a18b5de44222b84fead548f85b4e67c18838050c52917b6836debee77bc83db6aa0a378516b48a56e5daaac53dde84bdbe1dbefd02494b06498d8 SHA512 d45f0e60c2f12e9b98425310fe370aeeb5d29cd24bfa83b1b908bcbc25866a49e6e1fc7facb04e699bd897f1960a394f2e3a4c5a8308ad9af6177f735dc40631 @@ -16,4 +17,5 @@ EBUILD llvm-roc-3.9.0.ebuild 1529 BLAKE2B 07aac1728864214e61ed45cee3ca718c783083 EBUILD llvm-roc-4.0.0-r2.ebuild 2374 BLAKE2B 3944380f53d89d30e8d93314f37a191c37359095dc10c23ce9ad85cc8e9b25eaf86907fa48cd9bf2ae0adc2348d57733bc56b134fa106104e84cae34b2f6432d SHA512 2204600e6e06c08baab1fa655e1d818e0b8b8bbb057b5d8cd838e7206f47ad0af1302f38d4bbf1420c566d5d2bc1023727a695244bc7e0fccf56ec592ddbe5f9 EBUILD llvm-roc-4.0.0.ebuild 2209 BLAKE2B 69cb35d21ea261977032b7ba780bee60d1feda3a3246e81bb16b33f21b5b08fb094fbe34b117aa68e00d1cd42551a44fb53dd64bb40a74254bf02ba872f4cc32 SHA512 34a7d3f9cfd920adad596fe7532a15c347f56ccbd3cc9f66eb02fa77efa7b512ef3ba119c5377a059471cd6e256424c4ae34fac49dd08620674e0b22375d8268 EBUILD llvm-roc-4.0.1.ebuild 2374 BLAKE2B 3944380f53d89d30e8d93314f37a191c37359095dc10c23ce9ad85cc8e9b25eaf86907fa48cd9bf2ae0adc2348d57733bc56b134fa106104e84cae34b2f6432d SHA512 2204600e6e06c08baab1fa655e1d818e0b8b8bbb057b5d8cd838e7206f47ad0af1302f38d4bbf1420c566d5d2bc1023727a695244bc7e0fccf56ec592ddbe5f9 +EBUILD llvm-roc-4.1.0.ebuild 2330 BLAKE2B 28c3482eca9f3d1025e76b9eb9e03ce12469387f799228cfe1d1011414a3db9e20c35969b3da2ce4ca25a17cb347bf67f0ff3ee7b15ba6caeafa2b6a5b4c16da SHA512 f648e70cacefbbe172b2c8c4e703d03ecae597a5bf8420be04d61a02350f17e9a80f81cd55bbe31fab829f748a1b0a5542e7264671a873d442693f931f59d66c MISC metadata.xml 461 BLAKE2B 5a060c417f0bb9bf1fba8375292e7bff20b2c50c3a2ab490bd436f81a954dbd370d61ba59b305b8bdaad9887e9c6a872eb30fea31c566dc6d74d3493b40d0a26 SHA512 a82c2186fc0642dab37608155dcf0aafd20701cb7e2769c6eb3aae88d4df6690743769a75f47efdb36fd8a3d6771f0feecd3efd01c98460fe195394c16d95660 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 000000000000..eb7e40df837d --- /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}" +} -- cgit v1.2.3