From c8fb42216b10862e8178f91831e4c51fb2c55ac4 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 6 Feb 2023 09:19:42 +0000 Subject: gentoo auto-resync : 06:02:2023 - 09:19:42 --- dev-util/hip/Manifest | 3 +- dev-util/hip/files/hip-5.3.3-correct-ldflag.patch | 20 +++ dev-util/hip/hip-5.3.3-r2.ebuild | 145 --------------------- dev-util/hip/hip-5.3.3-r3.ebuild | 146 ++++++++++++++++++++++ 4 files changed, 168 insertions(+), 146 deletions(-) create mode 100644 dev-util/hip/files/hip-5.3.3-correct-ldflag.patch delete mode 100644 dev-util/hip/hip-5.3.3-r2.ebuild create mode 100644 dev-util/hip/hip-5.3.3-r3.ebuild (limited to 'dev-util/hip') diff --git a/dev-util/hip/Manifest b/dev-util/hip/Manifest index ab30077b413f..ee440f7bf3ff 100644 --- a/dev-util/hip/Manifest +++ b/dev-util/hip/Manifest @@ -16,6 +16,7 @@ AUX hip-5.1.3-fno-stack-protector.patch 788 BLAKE2B 8f9d01ceeec2098df4d49e116c14 AUX hip-5.1.3-llvm-15-noinline-keyword.patch 829 BLAKE2B 39b859e90acacd2eccdd60b690e1d882b63cfa66ff1b12effe447b18de72ffd61dd32983552f9ae39b384c3bbfbbcfd59ff2bb47943c1340bf6c1df5cb7d4075 SHA512 1933e883f84451e8512669572ea03dd25c916c6baeafac27b07e3d4a5e89165952a64afaceade4546e7e2d4473aba9811ac21131f283f9680d35e777ad9659a7 AUX hip-5.1.3-remove-cmake-doxygen-commands.patch 896 BLAKE2B 35640516bf416760db69b736d72c1e78efdbad8a930d621fdaffd13c5c250f5d80a6975c1e4c368389ce8059aee964c36645f420d0844141d09463637ba0bccb SHA512 b1288e1f4b7553c5bf0fe38a46fbdf269ca5c01fd8e0e225b9454d4916092601d565c57eaf9f716e06fee816e41cb3a948884060551b5a9d71da9b1a050765f9 AUX hip-5.1.3-rocm-path.patch 564 BLAKE2B ad554063a11d58ce5acfa8c8980bac2668d199b059bc2555d4cea40fbc53b6334daaea448d99cc391cee246d8318a450efdef669db2ee164a4db3a55d7d8e193 SHA512 eaa03f4d2394f61dcedde376de6c398625d284a7ac0c94ff2484929efdf298f455c796b96f16bf3989de6593a9a026a7681620b5ca13ce403aba4a32e5a38226 +AUX hip-5.3.3-correct-ldflag.patch 1196 BLAKE2B 93c0e7e92c898cfa5d39d008f8c18d82b9032d3f865725b59fb4c0fef263c9a7c4108ecca9f406c21411d72781b88fcacbd7b1e50cc6dd5483cbe89a37b9a2fc SHA512 7a81444c6f2b1a70a451b13440235ba14e058f9023abfd56502ad2ba12a00e31970873b92313a7888c3794083d0c011ce8a314b43e835e9fe872ad97de4e758f AUX hip-5.3.3-disable-Werror.patch 621 BLAKE2B 9bcdec821484ac20343e1352e3c3d5a9297f8e7ab81ed135c5b27f11dd0667c68939fe04157ae8b7dacc5cdcbb6631e0a1b66d6cc2cd796f6322b6ded75055c7 SHA512 799c40b5a2524e166aa674c432c7bfb93c03fe00832680a99cd701b2498cd33c52e5582f9754161173f17048b6ae346a7a5b6d59eddce8696670b1f229858fef AUX hip-5.3.3-remove-cmake-doxygen-commands.patch 976 BLAKE2B edff02ed7b2371739f1659a93ecad9485045091ec48c6aa018d8fde3a9f4a9a48bdcf0cca660e03b4f3ff0e6c4f019068019407f429913f8c3231cdb252b0464 SHA512 f6835f74fb34cd4a9ea0db693eff6e57c742f6912b29046f7b01b87037c014cdeb38f17dd0a6b90dd823656e2957b2d0bc981eb0c71221994ae455cefc03805b AUX hipvars-5.1.3.pm 629 BLAKE2B 6149f230aa0756603ac0b455d802db9c698be8e4a22367e98915db974ea16176f85f9b5a22e2572183641734cedbbe2ba2c826aa0223ea3e12c5550983db0480 SHA512 26ba459b13df1ad6dc50411ac6589dd3d17eff727fee0e938275912e36459c7a43b35233a7f78bbed282a992e969d8b8f95007964c810a5954b0abeccc67082d @@ -32,5 +33,5 @@ DIST rocm-opencl-runtime-5.1.3.tar.gz 1004765 BLAKE2B 64d9b42026d2be1d0e4aa66678 DIST rocm-opencl-runtime-5.3.3.tar.gz 1007773 BLAKE2B a3f600a68183337f92b152a123241cb7025889cca2ef6814d9d5b5a2146a78703b171d20bcb432bc7a2cdd1f24ad349408c17816b25a66702e9f0f5345af9082 SHA512 391f0f244b7f02972df8cada821e69ee8d81d96b9cff3c14f1d0838da583d8fb136ec4bd5ee820f6dd261968e9eef5e9a5b10b7bb76b1b64625c399d79bcb03f DIST rocm-tracer-5.1.3.tar.gz 511617 BLAKE2B 4142979b3b7d649798a7ac0b2a04b42aa7fbcbf82f2cf51b0e5363ec0da538046d6e59283d0ce1bfd341317bf24ac2f694d5c8a7d1f132f9b21caea5caf7eda3 SHA512 e73b0c921ffbdcac571d8b0825de39bd8a4fd5f2720ecdd0c189951db85efb607a0b1cd7a9bb02b3dbf329b277cb5e197525216a8e8927eea4e6ce290b7e7c7b EBUILD hip-5.1.3-r4.ebuild 6561 BLAKE2B eb04725deb7efa065bb83a127a298fbf24c768e2251226c1e1c246e09dc4107486bc2bd9a4e6ec7cb3abdb37a58638fe41456eda5e96ee3d5d6529e4b87ff20b SHA512 d3e3559331ed80e7e880af4b95bc27359dc8afb0fbde6e9beefe511b1ac96e086230e55468533d7882f6fe3ad26d734b2ec0c4d53e300bc2d13b551e608dc217 -EBUILD hip-5.3.3-r2.ebuild 5085 BLAKE2B 664fc12c3a17c33aa01a5b54f6054217c84e9dd68fa949d465663d6b486ac74550fb6da0e8a847756b65460f0d91d3f24dd50de8b3ffe5921e4c6742e856f31b SHA512 75a9d6e6c59ab7947cc6ea6e3a0ee697e9b2d445426482db8cdde031896899e78fe074a453cbaf5bf075c5d6ae71bd42dddbb8f850e558c7853e0c8ed7b4b1c2 +EBUILD hip-5.3.3-r3.ebuild 5140 BLAKE2B ca842dcb356db6820082b19eef1603fb206f3d5f96973f86443660c7de601da757643f9ced1b702574b63febbc770942d5a32ef90f55957ba7ddb8c94ec33d82 SHA512 3027a98f2f1e135ca22b5dee40905f11e4299589093b6d4b345893dbff90a7d6b6ce28a88339ba4159d2a4f843099f83e2bf5a95b26242882d6700462355b7ac MISC metadata.xml 729 BLAKE2B 92e36c42f6d8335e5a8e3a86b591ff9e6306e0d187644620fab7f8f7ddd00156ee91ff49184ffbe379e509f2096c51c421575a69de7abea3c0b372fdcec52ccb SHA512 84fc8234a5fdf54bf43228c2144d809a461862fb45fea24bf366ee5937df3882c3332429938792981e37dbb4cda6e5d7e05ac5deaded34d8bcce1eb53df8d0fd diff --git a/dev-util/hip/files/hip-5.3.3-correct-ldflag.patch b/dev-util/hip/files/hip-5.3.3-correct-ldflag.patch new file mode 100644 index 000000000000..20d117841c2b --- /dev/null +++ b/dev-util/hip/files/hip-5.3.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,--enable-new-dtags -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.3.3-r2.ebuild b/dev-util/hip/hip-5.3.3-r2.ebuild deleted file mode 100644 index 072b8d319e97..000000000000 --- a/dev-util/hip/hip-5.3.3-r2.ebuild +++ /dev/null @@ -1,145 +0,0 @@ -# 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}/0001-SWDEV-344620-hipcc-fails-to-parse-version-of-clang-i.patch" - eapply "${FILESDIR}/0002-SWDEV-355608-Remove-clang-include-path-2996.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 -} - -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 -} diff --git a/dev-util/hip/hip-5.3.3-r3.ebuild b/dev-util/hip/hip-5.3.3-r3.ebuild new file mode 100644 index 000000000000..c11b85e3f2ec --- /dev/null +++ b/dev-util/hip/hip-5.3.3-r3.ebuild @@ -0,0 +1,146 @@ +# 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.3.3-correct-ldflag.patch" + eapply "${FILESDIR}/0001-SWDEV-344620-hipcc-fails-to-parse-version-of-clang-i.patch" + eapply "${FILESDIR}/0002-SWDEV-355608-Remove-clang-include-path-2996.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 +} + +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 +} -- cgit v1.2.3