summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Lauer <patrick@gentoo.org>2023-03-02 17:29:46 +0000
committerPatrick Lauer <patrick@gentoo.org>2023-03-02 17:45:50 +0000
commitdfd6445cf1acf78f133028f3e17494702346f464 (patch)
tree24757edff97a697765eacec572be489cea78e18c /dev-util/hip
parentwww-client/chromium: change SLOT to 0/stable (diff)
downloadgentoo-dfd6445cf1acf78f133028f3e17494702346f464.tar.gz
gentoo-dfd6445cf1acf78f133028f3e17494702346f464.tar.bz2
gentoo-dfd6445cf1acf78f133028f3e17494702346f464.zip
dev-util/hip: add 5.4.3
Signed-off-by: Patrick Lauer <patrick@gentoo.org>
Diffstat (limited to 'dev-util/hip')
-rw-r--r--dev-util/hip/Manifest4
-rw-r--r--dev-util/hip/files/hip-5.4.3-clang-include.patch30
-rw-r--r--dev-util/hip/files/hip-5.4.3-clang-version.patch70
-rw-r--r--dev-util/hip/files/hip-5.4.3-correct-ldflag.patch20
-rw-r--r--dev-util/hip/hip-5.4.3.ebuild151
5 files changed, 275 insertions, 0 deletions
diff --git a/dev-util/hip/Manifest b/dev-util/hip/Manifest
index 91fbbb7d722a..8cb4cece793c 100644
--- a/dev-util/hip/Manifest
+++ b/dev-util/hip/Manifest
@@ -1,10 +1,14 @@
DIST hip-5.1.3-update-header.patch.gz 3406 BLAKE2B 805539c3396a9cdcc4b807afd96eacd2de0e494a9ec927a1526cb8ce26b1c6e0a4d06415cd0210cba1398b5ff70f995fa67ad22b659578c075eb24c2a2cc9228 SHA512 eef4d70f9470a61d1d8cb140728cc4f2e792a4e64e0900a7410a74f3a6421410e7546e4e62bbbf35ae231b566bf162fb85de1f1ad1d8cfb2f282d2ed9a34b53a
DIST rocclr-5.1.3.tar.gz 618606 BLAKE2B 02b7732ddd03c0883bee49c56466cd21c649159f801bfb2537eea6e640c65613eb57b37d942f465a9deb83d65735f51212dde5e4f77ba8239d1a6b7037e1800c SHA512 89fd2eca39ed84a1cf525b2c606089ef39f64c1f997c4880e10722da6de4864110752640e1508db1aeb9d15c48ba4e6fe5dbe7a9e56718853ece42548028b2ca
DIST rocclr-5.3.3.tar.gz 625944 BLAKE2B 0cdbc1415a355e1d56628834846aaa8587c9827eeea59f4312b788e868265dcb42197181fd5ef411416da2e11662c7f665f578aa750ab88c3a5405bcc58ee449 SHA512 3f85532cffc09c2ca8e7cd1770263d1c1a38633ed2bc5cfe62072e12a6f8f669db400519950718be31f6b77693d372e2ef905f06c7f02e126aa9ff7d2da97924
+DIST rocclr-5.4.3.tar.gz 640557 BLAKE2B 9ab91bab7ffb06c9c0d1c2ae79533fccc597071dda289ac375e32eb2965c638a7029951d2a49d46eeead9d7d242fe3a0cedb3e444d877af1bbf0e2d801c91e11 SHA512 c1d1a2ca08c2d762a221c04d394469aa7aff46086151333b145e0db9a7c7eb3dbbf8b9693e50d816aa9a13c16b4ebacf5ff3d5d8ff3393a8a764728ef5172d3a
DIST rocm-hip-5.1.3.tar.gz 967696 BLAKE2B 15cb52b5934b84acf515fe9c83b7c8982e00a23e20af933bdd2c4bc5b56fd42b08c8a08e840c85d2e0a8386d5a0e9c110504f68499989de1aaad00e9a5efcf43 SHA512 6b6fd6c12d73788df1711b12326b97fc7a184f319e0db114947b7967b75f2ee131f81e42e43a4981456b507221a6013133731120409f90214e13304299ccbc24
DIST rocm-hip-5.3.3.tar.gz 1151858 BLAKE2B 5f460b2078c850b3eb4414fcec4a6f951a3b282aa9828f77ba5d5adfdc0ee8d2e62c856e112a154c340daaf7dad49f4871412edd7b38f7fae2e6b17840ee144b SHA512 e747cc10e78cd09009cac762f0e060be13f3447af7ec2a4a2889cbdc09cd76ecb1b5b58c89f09a3b45a8296c2c71e1c55baf113e58a5a12434af3de7168b8d87
+DIST rocm-hip-5.4.3.tar.gz 1195173 BLAKE2B 7452ee7a874bc4703b0d3aaaf9fa2a51e223d5650c65c34982a9981dbe14e8ec70c93d7e70c5ad36a8d02c3d2214fa6a393e20502a01418fb3320d8cfe363feb SHA512 1f4100e114576dcbad83aae453e21ab85cf25bd8a6ada380bb11cfc30e5f92ba903055b7257a099321a84b65adb444dd52b8258e82567f4bc882e65d89369b43
DIST rocm-hipamd-5.1.3.tar.gz 331996 BLAKE2B 176121fe199d53c02a0fc407015681c2f08c8a72104738b457581fd81b37d16efb8170a46d687fb85a45242ba8564246cdd5746e78d9b73dd0bdc9b24eb8378c SHA512 daa6f4da97f71a5fd1f79d8c9e5fc43324743aec91362a05fa62e08966397a637d794abc7e14230eccf5f1271f9fac58d1336aaad1f2cded6cd10792845a494b
DIST rocm-hipamd-5.3.3.tar.gz 383179 BLAKE2B 45c4fbf28d639095db3cec0632e1b1d872104b3755bdca818ed37ac46caab399fcd2224330e6ac8df7ab155fb146b6272b3ed2efe00d7358b47f31ca2cb1e4f5 SHA512 34c62d915990b6742a2df9b37b6b2bad09f7383e561009519911095e8b65f6f1d79486f7f9b97fa76d7a9755b59fca5a5dff321d8c8b15fd83f2fd22ce08834c
+DIST rocm-hipamd-5.4.3.tar.gz 387070 BLAKE2B c5f30b606227692eea4bf9e35d35bff861648ef44357994996b7f1fb798ffe8b3ccf909bedd47d5486049c9742e426002f2d6636daabc679bae1b70e9ee5e89b SHA512 f2e36ceeca2580fd85f6847dc8320640bd43382bcd584f67362b11580a1d429c36596adbde252967a96d3a2dfc2bdca4d34bd23f5fb0d5e5e73e7844f925b03b
DIST rocm-opencl-runtime-5.1.3.tar.gz 1004765 BLAKE2B 64d9b42026d2be1d0e4aa666785699f6b4ec0584a927904a94bf830883050943503f8bdd7c97438a2fb11c71686a330d526f633959916c5c6c8da2e037841e79 SHA512 b83c3ae0bfad80f867bacce36710a8964f6dd7e64bf50da3ec6ce842217d6de63299d9ceaab9dc25a22252484520a85d02859809463dad5dda9b1f00a86863e0
DIST rocm-opencl-runtime-5.3.3.tar.gz 1007773 BLAKE2B a3f600a68183337f92b152a123241cb7025889cca2ef6814d9d5b5a2146a78703b171d20bcb432bc7a2cdd1f24ad349408c17816b25a66702e9f0f5345af9082 SHA512 391f0f244b7f02972df8cada821e69ee8d81d96b9cff3c14f1d0838da583d8fb136ec4bd5ee820f6dd261968e9eef5e9a5b10b7bb76b1b64625c399d79bcb03f
+DIST rocm-opencl-runtime-5.4.3.tar.gz 1005268 BLAKE2B f9398e4c2b0f045f1b5d8df9f31b7f2bef6a9201885aa6ee5fc5d71632cfde26a078d9a5ea38c3da12d3c187faf04c7bdcf1a8ecb9927cdba56b1efdfcdc44ee SHA512 f65d4622ce8721a6b91ab5b5b306d142ba507d3e631ac3ab0b76c5bc6d8d18455e02debd954c82e7eb609f232b509f1ec1a013dc2fad467c2c2ad31fdf15755d
DIST rocm-tracer-5.1.3.tar.gz 511617 BLAKE2B 4142979b3b7d649798a7ac0b2a04b42aa7fbcbf82f2cf51b0e5363ec0da538046d6e59283d0ce1bfd341317bf24ac2f694d5c8a7d1f132f9b21caea5caf7eda3 SHA512 e73b0c921ffbdcac571d8b0825de39bd8a4fd5f2720ecdd0c189951db85efb607a0b1cd7a9bb02b3dbf329b277cb5e197525216a8e8927eea4e6ce290b7e7c7b
diff --git a/dev-util/hip/files/hip-5.4.3-clang-include.patch b/dev-util/hip/files/hip-5.4.3-clang-include.patch
new file mode 100644
index 000000000000..21b2c5bac8e8
--- /dev/null
+++ b/dev-util/hip/files/hip-5.4.3-clang-include.patch
@@ -0,0 +1,30 @@
+diff --git a/bin/hipcc.pl b/bin/hipcc.pl
+index a143983..331881e 100755
+--- a/bin/hipcc.pl
++++ b/bin/hipcc.pl
+@@ -180,9 +180,6 @@ if ($HIP_PLATFORM eq "amd") {
+ $HIP_CLANG_RT_LIB = `$HIPCC --print-runtime-dir`;
+ chomp($HIP_CLANG_RT_LIB);
+
+- if (! defined $HIP_CLANG_INCLUDE_PATH) {
+- $HIP_CLANG_INCLUDE_PATH = abs_path("$HIP_CLANG_PATH/../lib/clang/$HIP_CLANG_VERSION/include");
+- }
+ if (! defined $HIP_INCLUDE_PATH) {
+ $HIP_INCLUDE_PATH = "$HIP_PATH/include";
+ }
+@@ -195,15 +192,12 @@ if ($HIP_PLATFORM eq "amd") {
+ print ("HIP_ROCCLR_HOME=$HIP_ROCCLR_HOME\n");
+ }
+ print ("HIP_CLANG_PATH=$HIP_CLANG_PATH\n");
+- print ("HIP_CLANG_INCLUDE_PATH=$HIP_CLANG_INCLUDE_PATH\n");
+ print ("HIP_INCLUDE_PATH=$HIP_INCLUDE_PATH\n");
+ print ("HIP_LIB_PATH=$HIP_LIB_PATH\n");
+ print ("DEVICE_LIB_PATH=$DEVICE_LIB_PATH\n");
+ print ("HIP_CLANG_RT_LIB=$HIP_CLANG_RT_LIB\n");
+ }
+
+- $HIPCXXFLAGS .= " -isystem \"$HIP_CLANG_INCLUDE_PATH/..\"";
+- $HIPCFLAGS .= " -isystem \"$HIP_CLANG_INCLUDE_PATH/..\"";
+ $HIPLDFLAGS .= " -L\"$HIP_LIB_PATH\"";
+ if ($isWindows) {
+ $HIPLDFLAGS .= " -lamdhip64";
diff --git a/dev-util/hip/files/hip-5.4.3-clang-version.patch b/dev-util/hip/files/hip-5.4.3-clang-version.patch
new file mode 100644
index 000000000000..88290db66af0
--- /dev/null
+++ b/dev-util/hip/files/hip-5.4.3-clang-version.patch
@@ -0,0 +1,70 @@
+From 73430b62a5437d1ba6c36a1d812a1434d1ad9df7 Mon Sep 17 00:00:00 2001
+From: ROCm CI Service Account <66695075+rocm-ci@users.noreply.github.com>
+Date: Tue, 20 Dec 2022 06:51:12 +0530
+Subject: [PATCH 1/3] SWDEV-344620 - hipcc fails to parse version of clang in
+ some cases (#3119)
+
+Change-Id: I46f716c82a7500b9a2bcaf5f9ff4ad8a8f982770
+Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
+---
+ bin/hipcc.pl | 22 +++++++---------------
+ 1 file changed, 7 insertions(+), 15 deletions(-)
+
+diff --git a/bin/hipcc.pl b/bin/hipcc.pl
+index 645ae62d..2a01dcc3 100755
+--- a/bin/hipcc.pl
++++ b/bin/hipcc.pl
+@@ -144,7 +144,7 @@ if ($HIP_PLATFORM eq "amd") {
+ $execExtension = "";
+ if($isWindows) {
+ $execExtension = ".exe";
+- }
++ }
+ $HIPCC="$HIP_CLANG_PATH/clang++" . $execExtension;
+
+ # If $HIPCC clang++ is not compiled, use clang instead
+@@ -176,13 +176,9 @@ if ($HIP_PLATFORM eq "amd") {
+ $HIPLDFLAGS .= " -fuse-ld=lld";
+ $HIPLDFLAGS .= " --ld-path=$HIP_CLANG_PATH/lld-link.exe";
+ }
+- $HIP_CLANG_VERSION = `$HIPCC --version`;
+- $HIP_CLANG_VERSION=~/.*clang version (\S+).*/;
+- $HIP_CLANG_VERSION=$1;
+-
+- # Figure out the target with which llvm is configured
+- $HIP_CLANG_TARGET = `$HIPCC -print-target-triple`;
+- chomp($HIP_CLANG_TARGET);
++ # get Clang RT Builtin path
++ $HIP_CLANG_RT_LIB = `$HIPCC --print-runtime-dir`;
++ chomp($HIP_CLANG_RT_LIB);
+
+ if (! defined $HIP_CLANG_INCLUDE_PATH) {
+ $HIP_CLANG_INCLUDE_PATH = abs_path("$HIP_CLANG_PATH/../lib/clang/$HIP_CLANG_VERSION/include");
+@@ -184,7 +181,7 @@ if ($HIP_PLATFORM eq "amd") {
+ print ("HIP_INCLUDE_PATH=$HIP_INCLUDE_PATH\n");
+ print ("HIP_LIB_PATH=$HIP_LIB_PATH\n");
+ print ("DEVICE_LIB_PATH=$DEVICE_LIB_PATH\n");
+- print ("HIP_CLANG_TARGET=$HIP_CLANG_TARGET\n");
++ print ("HIP_CLANG_RT_LIB=$HIP_CLANG_RT_LIB\n");
+ }
+
+ if ($isWindows) {
+@@ -715,13 +712,8 @@ if ($HIP_PLATFORM eq "amd") {
+ } else {
+ $toolArgs = ${toolArgs} . " -Wl,--enable-new-dtags -Wl,-rpath=$HIP_LIB_PATH:$ROCM_PATH/lib -lamdhip64 ";
+ }
+- # To support __fp16 and _Float16, explicitly link with compiler-rt
+- $HIP_CLANG_BUILTIN_LIB="$HIP_CLANG_PATH/../lib/clang/$HIP_CLANG_VERSION/lib/$HIP_CLANG_TARGET/libclang_rt.builtins.a";
+- if (-e $HIP_CLANG_BUILTIN_LIB) {
+- $toolArgs .= " -L$HIP_CLANG_PATH/../lib/clang/$HIP_CLANG_VERSION/lib/$HIP_CLANG_TARGET -lclang_rt.builtins "
+- } else {
+- $toolArgs .= " -L$HIP_CLANG_PATH/../lib/clang/$HIP_CLANG_VERSION/lib/linux -lclang_rt.builtins-x86_64 "
+- }
++
++ $toolArgs .= " -L$HIP_CLANG_RT_LIB -lclang_rt.builtins-x86_64 "
+ }
+ }
+
+--
+2.38.1
+
diff --git a/dev-util/hip/files/hip-5.4.3-correct-ldflag.patch b/dev-util/hip/files/hip-5.4.3-correct-ldflag.patch
new file mode 100644
index 000000000000..3dbbb6721f3b
--- /dev/null
+++ b/dev-util/hip/files/hip-5.4.3-correct-ldflag.patch
@@ -0,0 +1,20 @@
+This removes ldflag -L"/usr/lib" and -Wl,-rpath=/usr/lib:/usr/lib which
+causes `ld: skipping incompatible /usr/lib/libm.so when searching for -lm`
+Reference: https://github.com/justxi/rocm/issues/8#issuecomment-1166193820
+===================================================================
+Index: HIP-rocm-5.3.3/bin/hipcc.pl
+===================================================================
+--- HIP-rocm-5.3.3.orig/bin/hipcc.pl
++++ HIP-rocm-5.3.3/bin/hipcc.pl
+@@ -711,9 +711,9 @@ if ($HIP_PLATFORM eq "amd") {
+
+ if (not $isWindows and not $compileOnly) {
+ if ($linkType eq 0) {
+- $toolArgs = " -L$HIP_LIB_PATH -lamdhip64 -L$ROCM_PATH/lib -lhsa-runtime64 -ldl -lnuma " . ${toolArgs};
++ $toolArgs = " -lamdhip64 -lhsa-runtime64 -ldl -lnuma " . ${toolArgs};
+ } else {
+- $toolArgs = ${toolArgs} . " -Wl,-rpath=$HIP_LIB_PATH:$ROCM_PATH/lib -lamdhip64 ";
++ $toolArgs = ${toolArgs} . " -Wl,--enable-new-dtags -lamdhip64 ";
+ }
+ # To support __fp16 and _Float16, explicitly link with compiler-rt
+ $HIP_CLANG_BUILTIN_LIB="$HIP_CLANG_PATH/../lib/clang/$HIP_CLANG_VERSION/lib/$HIP_CLANG_TARGET/libclang_rt.builtins.a";
diff --git a/dev-util/hip/hip-5.4.3.ebuild b/dev-util/hip/hip-5.4.3.ebuild
new file mode 100644
index 000000000000..417b2b6c3290
--- /dev/null
+++ b/dev-util/hip/hip-5.4.3.ebuild
@@ -0,0 +1,151 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DOCS_BUILDER="doxygen"
+DOCS_DEPEND="media-gfx/graphviz"
+
+inherit cmake docs llvm prefix
+
+LLVM_MAX_SLOT=15
+
+DESCRIPTION="C++ Heterogeneous-Compute Interface for Portability"
+HOMEPAGE="https://github.com/ROCm-Developer-Tools/hipamd"
+SRC_URI="https://github.com/ROCm-Developer-Tools/hipamd/archive/rocm-${PV}.tar.gz -> rocm-hipamd-${PV}.tar.gz
+ https://github.com/ROCm-Developer-Tools/HIP/archive/rocm-${PV}.tar.gz -> rocm-hip-${PV}.tar.gz
+ https://github.com/ROCm-Developer-Tools/ROCclr/archive/rocm-${PV}.tar.gz -> rocclr-${PV}.tar.gz
+ https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/rocm-${PV}.tar.gz -> rocm-opencl-runtime-${PV}.tar.gz"
+
+KEYWORDS="~amd64"
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+
+IUSE="debug"
+
+DEPEND="
+ >=dev-util/rocminfo-5
+ sys-devel/clang:${LLVM_MAX_SLOT}
+ dev-libs/rocm-comgr:${SLOT}
+ virtual/opengl
+"
+RDEPEND="${DEPEND}
+ dev-perl/URI-Encode
+ sys-devel/clang-runtime:=
+ >=dev-libs/roct-thunk-interface-5"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-5.0.1-DisableTest.patch"
+ "${FILESDIR}/${PN}-5.0.1-hip_vector_types.patch"
+ "${FILESDIR}/${PN}-5.0.2-set-build-id.patch"
+ "${FILESDIR}/${PN}-5.3.3-remove-cmake-doxygen-commands.patch"
+ "${FILESDIR}/${PN}-5.3.3-disable-Werror.patch"
+ "${FILESDIR}/0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch"
+)
+
+S="${WORKDIR}/hipamd-rocm-${PV}"
+HIP_S="${WORKDIR}"/HIP-rocm-${PV}
+OCL_S="${WORKDIR}"/ROCm-OpenCL-Runtime-rocm-${PV}
+CLR_S="${WORKDIR}"/ROCclr-rocm-${PV}
+RTC_S="${WORKDIR}"/roctracer-rocm-${PV}
+DOCS_DIR="${HIP_S}"/docs/doxygen-input
+DOCS_CONFIG_NAME=doxy.cfg
+
+pkg_setup() {
+ # Ignore QA FLAGS check for library compiled from assembly sources
+ QA_FLAGS_IGNORED="/usr/$(get_libdir)/libhiprtc-builtins.so.$(ver_cut 1-2)"
+}
+
+src_prepare() {
+ cmake_src_prepare
+
+ eapply_user
+
+ # Use Gentoo slot number, otherwise git hash is attempted in vain.
+ sed -e "/set (HIP_LIB_VERSION_STRING/cset (HIP_LIB_VERSION_STRING ${SLOT#*/})" -i CMakeLists.txt || die
+
+ # correctly find HIP_CLANG_INCLUDE_PATH using cmake
+ local LLVM_PREFIX="$(get_llvm_prefix "${LLVM_MAX_SLOT}")"
+ sed -e "/set(HIP_CLANG_ROOT/s:\"\${ROCM_PATH}/llvm\":${LLVM_PREFIX}:" -i hip-config.cmake.in || die
+
+ # correct libs and cmake install dir
+ sed -e "/\${HIP_COMMON_DIR}/s:cmake DESTINATION .):cmake/ DESTINATION share/cmake/Modules):" -i CMakeLists.txt || die
+
+ sed -e "/\.hip/d" \
+ -e "/CPACK_RESOURCE_FILE_LICENSE/d" -i packaging/CMakeLists.txt || die
+
+ pushd ${HIP_S} || die
+ eapply "${FILESDIR}/${PN}-5.1.3-rocm-path.patch"
+ eapply "${FILESDIR}/${PN}-5.1.3-fno-stack-protector.patch"
+ eapply "${FILESDIR}/${PN}-5.4.3-correct-ldflag.patch"
+ eapply "${FILESDIR}/${PN}-5.4.3-clang-version.patch"
+ eapply "${FILESDIR}/${PN}-5.4.3-clang-include.patch"
+ eapply "${FILESDIR}/0003-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch"
+
+ # Setting HSA_PATH to "/usr" results in setting "-isystem /usr/include"
+ # which makes "stdlib.h" not found when using "#include_next" in header files;
+ sed -e "/FLAGS .= \" -isystem \$HSA_PATH/d" \
+ -e "/HIP.*FLAGS.*isystem.*HIP_INCLUDE_PATH/d" \
+ -e "s:\$ENV{'DEVICE_LIB_PATH'}:'${EPREFIX}/usr/lib/amdgcn/bitcode':" \
+ -e "s:\$ENV{'HIP_LIB_PATH'}:'${EPREFIX}/usr/$(get_libdir)':" \
+ -e "/rpath/s,--rpath=[^ ]*,," -i bin/hipcc.pl || die
+
+ # change --hip-device-lib-path to "/usr/lib/amdgcn/bitcode", must align with "dev-libs/rocm-device-libs"
+ sed -e "s:\${AMD_DEVICE_LIBS_PREFIX}/lib:${EPREFIX}/usr/lib/amdgcn/bitcode:" \
+ -i "${S}/hip-config.cmake.in" || die
+
+ einfo "prefixing hipcc and its utils..."
+ hprefixify $(grep -rl --exclude-dir=build/ --exclude="hip-config.cmake.in" "/usr" "${S}")
+ hprefixify $(grep -rl --exclude-dir=build/ --exclude="hipcc.pl" "/usr" "${HIP_S}")
+
+ cp "$(prefixify_ro "${FILESDIR}"/hipvars-5.3.3.pm)" bin/hipvars.pm || die "failed to replace hipvars.pm"
+ sed -e "s,@HIP_BASE_VERSION_MAJOR@,$(ver_cut 1)," -e "s,@HIP_BASE_VERSION_MINOR@,$(ver_cut 2)," \
+ -e "s,@HIP_VERSION_PATCH@,$(ver_cut 3)," \
+ -e "s,@CLANG_PATH@,${LLVM_PREFIX}/bin," -i bin/hipvars.pm || die
+ popd || die
+
+ pushd ${CLR_S} || die
+ eapply "${FILESDIR}/rocclr-5.3.3-gcc13.patch"
+}
+
+src_configure() {
+ use debug && CMAKE_BUILD_TYPE="Debug"
+
+ # TODO: Currently a GENTOO configuration is build,
+ # this is also used in the cmake configuration files
+ # which will be installed to find HIP;
+ # Other ROCm packages expect a "RELEASE" configuration,
+ # see "hipBLAS"
+ local mycmakeargs=(
+ -DCMAKE_PREFIX_PATH="$(get_llvm_prefix "${LLVM_MAX_SLOT}")"
+ -DCMAKE_BUILD_TYPE=${buildtype}
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
+ -DCMAKE_SKIP_RPATH=ON
+ -DBUILD_HIPIFY_CLANG=OFF
+ -DHIP_PLATFORM=amd
+ -DHIP_COMPILER=clang
+ -DROCM_PATH="${EPREFIX}/usr"
+ -DUSE_PROF_API=0
+ -DFILE_REORG_BACKWARD_COMPATIBILITY=OFF
+ -DROCCLR_PATH=${CLR_S}
+ -DHIP_COMMON_DIR=${HIP_S}
+ -DAMD_OPENCL_PATH=${OCL_S}
+ )
+
+ cmake_src_configure
+}
+
+src_compile() {
+ HIP_PATH=${HIP_S} docs_compile
+ cmake_src_compile
+}
+
+src_install() {
+
+ cmake_src_install
+
+ rm "${ED}/usr/include/hip/hcc_detail" || die
+
+ # Don't install .hipInfo and .hipVersion to bin/lib
+ rm "${ED}/usr/bin/.hipVersion" || die
+}