diff options
author | Patrick Lauer <patrick@gentoo.org> | 2023-09-03 06:35:45 +0000 |
---|---|---|
committer | Patrick Lauer <patrick@gentoo.org> | 2023-09-03 06:37:36 +0000 |
commit | b82c9c796475c8d55d310405190c97a38f6d1c7e (patch) | |
tree | 2d2569ecf061b89795f4ef6446ac958f80b927b1 /dev-util/hip | |
parent | profiles/features/wd40: mask selenium-manager/webdriver (diff) | |
download | gentoo-b82c9c796475c8d55d310405190c97a38f6d1c7e.tar.gz gentoo-b82c9c796475c8d55d310405190c97a38f6d1c7e.tar.bz2 gentoo-b82c9c796475c8d55d310405190c97a38f6d1c7e.zip |
dev-util/hip: add 5.5.1
Closes: https://bugs.gentoo.org/908501
Signed-off-by: Patrick Lauer <patrick@gentoo.org>
Diffstat (limited to 'dev-util/hip')
-rw-r--r-- | dev-util/hip/Manifest | 4 | ||||
-rw-r--r-- | dev-util/hip/files/hip-5.5.1-disable-Werror.patch | 18 | ||||
-rw-r--r-- | dev-util/hip/hip-5.5.1.ebuild | 152 |
3 files changed, 174 insertions, 0 deletions
diff --git a/dev-util/hip/Manifest b/dev-util/hip/Manifest index 8cb4cece793c..61341cfb54ec 100644 --- a/dev-util/hip/Manifest +++ b/dev-util/hip/Manifest @@ -2,13 +2,17 @@ DIST hip-5.1.3-update-header.patch.gz 3406 BLAKE2B 805539c3396a9cdcc4b807afd96ea 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 rocclr-5.5.1.tar.gz 634330 BLAKE2B e6383a6b6b09f274a944d66effd345e38a191ec73ee5c5240f8ec8bb62a4df97b80835ce57f8f78c3834602b9da425b49289b5c7cd7e4c7071147ff409c6a6c9 SHA512 4c12011d22a4f14d9e93250b2a38716eb973139afa1adbbbd51c0e0ed13c0b7c1f45a37c71ef937c5fdabf09e928d7913ca3332fc61b7a2c10d21421306a228f 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-hip-5.5.1.tar.gz 1235158 BLAKE2B 2bd675c065fbe054a220f65b30834333d9db91fbd864c408f8ee915f3a511a2f607820562e4d6eacc8e5aa5dc3f8f37fe2b5675c9e89784e61c4a46a9357eef3 SHA512 9d57e96ff1d3eb14300d0809049a32dd8403851c70cd6d94cab8d17206a1210fef8b6f713063b041d35de37ef0ae10319e9d9803c65493a54fb59e66d29c9c4d 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-hipamd-5.5.1.tar.gz 401791 BLAKE2B f6d0ce1ae684b51177a2c7b3d7f885cce48314ed7c76d075983e8ab6f1a15421feb11d0a718ea592c9c015c015d99ff92f892d69bee58a543a7fe0f0d476150f SHA512 c979edf358a87abfeddaee0fe809d65c106b188c5684a1f229af962e5c4505f4108b1d14db160485048806d69cf5811ad330711b84a6c995386adb21916851c5 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-opencl-runtime-5.5.1.tar.gz 991802 BLAKE2B 07d955b4a76b11296259287f5878cadc2438350a3abcdb5bd693c02790ff4c330b1d0a2a87f8de5334b3e3459c26b3fdf695886502ec5d2c373d807c242c8f93 SHA512 06786e818002dc43f64e4b0aaae0a0a2bcdad7acdb4662e1215d43277b107d65fb9a7f7441c31e3378c380cac860b1cd2eaefb5753246beffa4d9c10efced85e DIST rocm-tracer-5.1.3.tar.gz 511617 BLAKE2B 4142979b3b7d649798a7ac0b2a04b42aa7fbcbf82f2cf51b0e5363ec0da538046d6e59283d0ce1bfd341317bf24ac2f694d5c8a7d1f132f9b21caea5caf7eda3 SHA512 e73b0c921ffbdcac571d8b0825de39bd8a4fd5f2720ecdd0c189951db85efb607a0b1cd7a9bb02b3dbf329b277cb5e197525216a8e8927eea4e6ce290b7e7c7b diff --git a/dev-util/hip/files/hip-5.5.1-disable-Werror.patch b/dev-util/hip/files/hip-5.5.1-disable-Werror.patch new file mode 100644 index 000000000000..ee104644fbda --- /dev/null +++ b/dev-util/hip/files/hip-5.5.1-disable-Werror.patch @@ -0,0 +1,18 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 619d6a0..c520db0 100644 +--- hipamd-rocm-5.5.1.orig/src/CMakeLists.txt ++++ hipamd-rocm-5.5.1/src/CMakeLists.txt +@@ -44,13 +44,6 @@ if(ADDRESS_SANITIZER) + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${ASAN_LINKER_FLAGS} -Wl,--build-id=sha1") + endif() + +-if(CMAKE_COMPILER_IS_GNUCC) +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=deprecated-declarations") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=deprecated-declarations") +-endif() +- + option(DISABLE_DIRECT_DISPATCH "Disable Direct Dispatch" OFF) + + option(BUILD_SHARED_LIBS "Build the shared library" ON) diff --git a/dev-util/hip/hip-5.5.1.ebuild b/dev-util/hip/hip-5.5.1.ebuild new file mode 100644 index 000000000000..276e8628ad9c --- /dev/null +++ b/dev-util/hip/hip-5.5.1.ebuild @@ -0,0 +1,152 @@ +# 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=16 + +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.5.1-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" + eapply "${FILESDIR}/${PN}-5.4.3-fix-HIP_CLANG_PATH-detection.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 +} |