aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenda Xu <heroxbd@gentoo.org>2021-01-20 23:52:50 +0800
committerBenda Xu <heroxbd@gentoo.org>2021-01-21 00:11:24 +0800
commitb9e211344f40538b9a641bae5b188c732afa2f21 (patch)
tree9fdd368d0521df2a02452ef076196305a196d078
parentdev-libs/half: half precision library. (diff)
downloadsci-b9e21134.tar.gz
sci-b9e21134.tar.bz2
sci-b9e21134.zip
dev-util/rocm-clang-ocl: Clang OpenCL compilation wrapper.
This is but a shell script wrapper. To be merged with dev-libs/rocm-opencl-runtime::gentoo. Bug: https://bugs.gentoo.org/650804 Bug: https://github.com/gentoo/gentoo/pull/10724 Suggested-by: Yiyang Wu <xgreenlandforwyy@gmail.com> Suggested-by: Wilfried Holzke <gentoo@holzke.net> Package-Manager: Portage-3.0.12, Repoman-3.0.1 Signed-off-by: Benda Xu <heroxbd@gentoo.org>
-rw-r--r--dev-util/rocm-clang-ocl/Manifest1
-rw-r--r--dev-util/rocm-clang-ocl/metadata.xml11
-rw-r--r--dev-util/rocm-clang-ocl/rocm-clang-ocl-4.0.0-r1.ebuild31
3 files changed, 43 insertions, 0 deletions
diff --git a/dev-util/rocm-clang-ocl/Manifest b/dev-util/rocm-clang-ocl/Manifest
new file mode 100644
index 000000000..cd7d890e8
--- /dev/null
+++ b/dev-util/rocm-clang-ocl/Manifest
@@ -0,0 +1 @@
+DIST rocm-clang-ocl-4.0.0.tar.gz 3259 BLAKE2B a3c0237590b662a9298c39da306559c893ca50ff9dcb4a7cb150dcf381db0a9c17da7be553e0e33075a63c7a00c77e9dd30a40ae1ebdee225b0fd9cd199b0c9e SHA512 8d1b3a976fd1995980b524c32345a67eb6876ed76253efe99d55aea8dc07c673d6f84f69bf6379aeba95fd9d49ad745555096fce63300090c7e2868f3eecd261
diff --git a/dev-util/rocm-clang-ocl/metadata.xml b/dev-util/rocm-clang-ocl/metadata.xml
new file mode 100644
index 000000000..336bdb639
--- /dev/null
+++ b/dev-util/rocm-clang-ocl/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM 'http://www.gentoo.org/dtd/metadata.dtd'>
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ </maintainer>
+ <maintainer type="person">
+ <email>gentoo@holzke.net</email>
+ <name>Wilfried Holzke</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-util/rocm-clang-ocl/rocm-clang-ocl-4.0.0-r1.ebuild b/dev-util/rocm-clang-ocl/rocm-clang-ocl-4.0.0-r1.ebuild
new file mode 100644
index 000000000..e153f61d3
--- /dev/null
+++ b/dev-util/rocm-clang-ocl/rocm-clang-ocl-4.0.0-r1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="OpenCL compilation with clang compiler"
+HOMEPAGE="https://github.com/RadeonOpenCompute/clang-ocl.git"
+SRC_URI="https://github.com/RadeonOpenCompute/clang-ocl/archive/rocm-${PV}.tar.gz -> rocm-clang-ocl-${PV}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="dev-libs/rocm-opencl-runtime"
+DEPEND="dev-util/cmake
+ dev-util/rocm-cmake
+ ${RDEPEND}"
+
+S=${WORKDIR}/clang-ocl-rocm-${PV}
+
+src_prepare() {
+ sed -e "s:HINTS \${CXX_COMPILER_PATH}/bin:NO_DEFAULT_PATH:" \
+ -e "s:/opt/rocm/llvm/bin:${EPREFIX}/usr/lib/llvm/roc/bin:" \
+ -e "/AMDDeviceLibs PATHS/s:/opt/rocm:${EPREFIX}/usr/lib/cmake/AMDDeviceLibs:" \
+ -e "s:\${AMD_DEVICE_LIBS_PREFIX}/amdgcn/bitcode:${EPREFIX}/usr/lib/amdgcn/bitcode:" \
+ -i CMakeLists.txt || die
+
+ cmake_src_prepare
+}