summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilfried Holzke <gentoo@holzke.net>2019-12-28 13:18:10 +0100
committerCraig Andrews <candrews@gentoo.org>2019-12-29 17:21:54 -0500
commit3ee99c860e04f770f755bd1ec34404e9bd8797d5 (patch)
treede9fc18eb1d869b003e958a23ce3bc2a01e92799 /sys-devel/llvm-roc
parentdev-libs/rocr-runtime: 3.0.0 version bump (diff)
downloadgentoo-3ee99c860e04f770f755bd1ec34404e9bd8797d5.tar.gz
gentoo-3ee99c860e04f770f755bd1ec34404e9bd8797d5.tar.bz2
gentoo-3ee99c860e04f770f755bd1ec34404e9bd8797d5.zip
sys-devel/llvm-roc: New ebuild for llvm-roc 3.0.0
Signed-off-by: Wilfried Holzke <gentoo@holzke.net> Package-Manager: Portage-2.3.79, Repoman-2.3.16 Closes: https://github.com/gentoo/gentoo/pull/14149 Signed-off-by: Craig Andrews <candrews@gentoo.org>
Diffstat (limited to 'sys-devel/llvm-roc')
-rw-r--r--sys-devel/llvm-roc/Manifest1
-rw-r--r--sys-devel/llvm-roc/files/llvm-roc-3.0.0-add_libraries.patch20
-rw-r--r--sys-devel/llvm-roc/llvm-roc-3.0.0.ebuild57
3 files changed, 78 insertions, 0 deletions
diff --git a/sys-devel/llvm-roc/Manifest b/sys-devel/llvm-roc/Manifest
index 395040255d9b..ded021d5a92f 100644
--- a/sys-devel/llvm-roc/Manifest
+++ b/sys-devel/llvm-roc/Manifest
@@ -13,3 +13,4 @@ DIST llvm-roc-ocl-2.6.0.tar.gz 48417665 BLAKE2B 9b7ff7cc57d98b2076994d3a55855634
DIST llvm-roc-ocl-2.7.0.tar.gz 50008043 BLAKE2B 7cbb6f0e268991bbeae6dd5f38f00ee35a3d04f563212a6a3c32676574668ca84e44ae5acc14d1a77ea6985e70b47a0faff86d86521fb3a7375aa58a043d65ec SHA512 ae1547d1547345be56f547c59a6ddd09e68bb1eaea1f3c8eb4911dee1f2616b43384a296a2e2754bf2a833ef4906da4463820e4fe734c3bcfd7a602ef3c2de17
DIST llvm-roc-ocl-2.8.0.tar.gz 50245388 BLAKE2B 29aa4fdb08b5c3ca1ec41f8948b48d4655768632cd07b217e742e32fcfe0e306130697cd18d4c481aec440686464271b380b5a1a7f02bba84ee8cb98c13d2a7f SHA512 51eb98160d556aa0b60fdce95af54f57529e218899874df0a59e583dad5a8fbcad822c3d778668ce0ec4897b28ff3423cde4d55e18719cf4edfb56735cb3d80b
DIST llvm-roc-ocl-2.9.0.tar.gz 50246154 BLAKE2B 5ed8faf4582a41dac3bdc71a9fc6e12e3f70652fe80d4659315589e5c6f6326bc03853cea1d3e7acf6b210dd4c83056bae27aded3e173756d6f7c2c5694ae386 SHA512 e29767bb92bf719b7f3b6d2853dc61d6cb968e3f0dc54714ee6a78ff5340139935ce0d1cf3124c5757d96f93af01e0f9927e72d29a35b84229e44e7a69e6d391
+DIST llvm-roc-ocl-3.0.0.tar.gz 117363122 BLAKE2B a85e456e715629fbb3349e13e50a62aee7c82c6479127d7e46ff2de13f0eab108dd0332136aa736c30ed46c1563207b7ab22df0f7f53404315d51f0a172b5e86 SHA512 7d1281fc1628e4e88ddd740ccf03107cdccf86178046dfe79efd6b503193b3be4e23a67363f24f1d6250a156da86fe0d93933d9c67510b755d1e454e7bbedb68
diff --git a/sys-devel/llvm-roc/files/llvm-roc-3.0.0-add_libraries.patch b/sys-devel/llvm-roc/files/llvm-roc-3.0.0-add_libraries.patch
new file mode 100644
index 000000000000..120ab819f5b4
--- /dev/null
+++ b/sys-devel/llvm-roc/files/llvm-roc-3.0.0-add_libraries.patch
@@ -0,0 +1,20 @@
+diff -Naur a/clang/lib/Basic/CMakeLists.txt b/clang/lib/Basic/CMakeLists.txt
+--- a/clang/lib/Basic/CMakeLists.txt 2019-12-28 07:42:49.119055933 +0100
++++ b/clang/lib/Basic/CMakeLists.txt 2019-12-28 07:42:13.265056070 +0100
+@@ -2,6 +2,7 @@
+ Core
+ MC
+ Support
++ Option
+ )
+
+ find_first_existing_vc_file("${LLVM_MAIN_SRC_DIR}" llvm_vc)
+diff -Naur a/clang/lib/Driver/CMakeLists.txt b/clang/lib/Driver/CMakeLists.txt
+--- a/clang/lib/Driver/CMakeLists.txt 2019-12-28 07:41:39.521056199 +0100
++++ b/clang/lib/Driver/CMakeLists.txt 2019-12-28 07:40:23.998056487 +0100
+@@ -79,4 +79,5 @@
+ LINK_LIBS
+ clangBasic
+ ${system_libs}
++ pthread
+ )
diff --git a/sys-devel/llvm-roc/llvm-roc-3.0.0.ebuild b/sys-devel/llvm-roc/llvm-roc-3.0.0.ebuild
new file mode 100644
index 000000000000..af16a02096ed
--- /dev/null
+++ b/sys-devel/llvm-roc/llvm-roc-3.0.0.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-utils
+
+DESCRIPTION="Radeon Open Compute llvm,lld,clang"
+HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm/"
+SRC_URI="https://github.com/RadeonOpenCompute/llvm-project/archive/roc-ocl-${PV}.tar.gz -> llvm-roc-ocl-${PV}.tar.gz"
+
+LICENSE="UoI-NCSA rc BSD public-domain"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug"
+
+RDEPEND="virtual/cblas
+ dev-libs/rocr-runtime"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/llvm-project-roc-ocl-${PV}/llvm"
+
+CMAKE_BUILD_TYPE=RelWithDebInfo
+
+src_prepare() {
+ cd "${WORKDIR}/llvm-project-roc-ocl-${PV}"
+ eapply "${FILESDIR}/${P}-add_libraries.patch"
+ eapply_user
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/roc"
+ -DLLVM_ENABLE_PROJECTS="clang;lld"
+ -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-utils_src_configure
+}
+
+src_install(){
+ cmake-utils_src_install
+ cat > "99${PN}" <<-EOF
+ LDPATH="${EROOT}/usr/lib/llvm/roc/lib"
+ EOF
+ doenvd "99${PN}"
+}