summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Lauer <patrick@gentoo.org>2023-09-03 06:16:46 +0000
committerPatrick Lauer <patrick@gentoo.org>2023-09-03 06:31:23 +0000
commitd7990695d7b7abe9d36542ba3408326eed66a6a3 (patch)
tree3a26da5880349129444f1e0a4ea908ff84b69dad /dev-libs/rocm-device-libs
parentdev-libs/rocm-comgr: add 5.5.1 (diff)
downloadgentoo-d7990695d7b7abe9d36542ba3408326eed66a6a3.tar.gz
gentoo-d7990695d7b7abe9d36542ba3408326eed66a6a3.tar.bz2
gentoo-d7990695d7b7abe9d36542ba3408326eed66a6a3.zip
dev-libs/rocm-device-libs: add 5.5.1
Signed-off-by: Patrick Lauer <patrick@gentoo.org>
Diffstat (limited to 'dev-libs/rocm-device-libs')
-rw-r--r--dev-libs/rocm-device-libs/Manifest2
-rw-r--r--dev-libs/rocm-device-libs/files/rocm-device-libs-5.5.0-test-bitcode-dir.patch20
-rw-r--r--dev-libs/rocm-device-libs/files/rocm-device-libs-5.5.1-fix-llvm-link.patch13
-rw-r--r--dev-libs/rocm-device-libs/rocm-device-libs-5.5.1.ebuild49
4 files changed, 84 insertions, 0 deletions
diff --git a/dev-libs/rocm-device-libs/Manifest b/dev-libs/rocm-device-libs/Manifest
index 2b7764830070..1662b990ec35 100644
--- a/dev-libs/rocm-device-libs/Manifest
+++ b/dev-libs/rocm-device-libs/Manifest
@@ -1,3 +1,5 @@
DIST rocm-device-libs-5.1.3.tar.gz 242862 BLAKE2B 68d66de897f461e9f876de5fe2214803d4c00665651dea6af0952f0ce579c6704a5ec41b08971fa613ade309a0a85cb611b56b592dc2a25e247183e634ea3378 SHA512 cc3dfb8d4b4841ba777355c537175259d0019159ff462358320674b85082cccd99f6462f60fee66228ddfb88fade043445c1bac62504aa1462ba61b7e2751de7
DIST rocm-device-libs-5.3.3.tar.gz 245690 BLAKE2B 475c0d818b8b0f090a8daeca2910cd4002e4cdf505d020327f46eb5f864a26937a6a3dfe4ff7b188ebda0f936b1c396f2163bb27b9e2a62c5976e60fa60856ac SHA512 8f6f2fc1534e348e02ba30a25cfc6017f8eab768968b5d0344a5ea7d65c4f0a874072f9e53919c74545814330602ef7c190753c7ff019137230e02f58a5d3a5d
DIST rocm-device-libs-5.4.3.tar.gz 246095 BLAKE2B eb749346c96d465a5f22831968ccbd71f02749e6aa0d9c2becc0f378641ca0f65c1a131bfd3ed226f838b4208091fcc920b1e31b427adbd69a42881898668e6a SHA512 67b904363a3cff6c15bbd032cbc72cb5cd5f82acaa68c74391dbcf415266e8f35486a496b69b69e1fc0721e0e4e21fb6a6b9c180a46cb59cdcf53916be846ca4
+DIST rocm-device-libs-5.5.0.tar.gz 245903 BLAKE2B 3f9f2e7ed4055a02b10fde9cb2310daefae33cab90f262c60e20734e1cef3e1b4b7def19bafcdb4642e7936615ea88037d230905302c64aecf4fafe44d63a66f SHA512 817a3fe680a2e25115330d94bec9a667c1acbbdff7775c7edc4cf4a9f97ac63d9a5d2684394812572cd505c55215485f477712968fc96bb3748b1c1020e93cfe
+DIST rocm-device-libs-5.5.1.tar.gz 245900 BLAKE2B f713b1f12c7be33a4854d79791f592b8e89e2bc463769ec8cdd807483f0e5ca93d7fc852b6cf41d5ad0401d07adc97de9fb1fa54b77af83f665e282d6c0a43e7 SHA512 0138ddc94ce4a81202bdafccbbecef8145c6ddf82c3a14d92bb80b2bed3d3b73898f84279cef89110c50a9cc51e32de1323cc11a1f97c5da4f7f843b393425d0
diff --git a/dev-libs/rocm-device-libs/files/rocm-device-libs-5.5.0-test-bitcode-dir.patch b/dev-libs/rocm-device-libs/files/rocm-device-libs-5.5.0-test-bitcode-dir.patch
new file mode 100644
index 000000000000..79b61d1517e0
--- /dev/null
+++ b/dev-libs/rocm-device-libs/files/rocm-device-libs-5.5.0-test-bitcode-dir.patch
@@ -0,0 +1,20 @@
+--- rocm-device-libs.orig/test/compile/CMakeLists.txt 2023-05-02 15:23:15.413157017 -0000
++++ rocm-device-libs/test/compile/CMakeLists.txt 2023-05-02 15:32:10.411515448 -0000
+@@ -30,6 +30,7 @@
+ -DFILECHECK_BIN=${FILECHECK_BIN}
+ -DOUTPUT_FILE=output.${name}.${test_cpu}.s
+ -DINPUT_FILE=${CMAKE_CURRENT_SOURCE_DIR}/${func_name}.cl
++ -DAMDGCN_BITCODES=${PROJECT_BINARY_DIR}/lib/amdgcn/bitcode
+ -DTEST_CPU=${test_cpu}
+ -DEXTRA_CHECK_PREFIX=${extra_check_prefixes}
+ -P ${script})
+--- rocm-device-libs.orig/test/compile/RunConstantFoldTest.cmake 2023-02-01 15:17:33.000000000 -0000
++++ rocm-device-libs/test/compile/RunConstantFoldTest.cmake 2023-05-02 15:33:44.634752384 -0000
+@@ -16,6 +16,7 @@
+ -target amdgcn-amd-amdhsa -mcpu=${TEST_CPU}
+ -Xclang -finclude-default-header
+ --rocm-path=${BINARY_DIR}
++ --rocm-device-lib-path=${AMDGCN_BITCODES}
+ -mllvm -amdgpu-simplify-libcall=0
+ -o ${OUTPUT_FILE} ${INPUT_FILE}
+ RESULT_VARIABLE CLANG_RESULT
diff --git a/dev-libs/rocm-device-libs/files/rocm-device-libs-5.5.1-fix-llvm-link.patch b/dev-libs/rocm-device-libs/files/rocm-device-libs-5.5.1-fix-llvm-link.patch
new file mode 100644
index 000000000000..f965045b7e7b
--- /dev/null
+++ b/dev-libs/rocm-device-libs/files/rocm-device-libs-5.5.1-fix-llvm-link.patch
@@ -0,0 +1,13 @@
+https://bugs.gentoo.org/851702#c4
+Adapt to libLLVM.so instead of the seperated libs
+===================================================================
+--- ROCm-Device-Libs-rocm-5.0.2.orig/utils/prepare-builtins/CMakeLists.txt
++++ ROCm-Device-Libs-rocm-5.0.2/utils/prepare-builtins/CMakeLists.txt
+@@ -26,5 +26,5 @@ set_target_properties(prepare-builtins P
+ CXX_STANDARD_REQUIRED Yes
+ CXX_EXTENSIONS No)
+ llvm_update_compile_flags(prepare-builtins)
+-llvm_map_components_to_libnames(llvm_libs support core bitreader bitwriter)
+-target_link_libraries(prepare-builtins ${llvm_libs})
++llvm_map_components_to_libnames(llvm_libs support)
++target_link_libraries(prepare-builtins LLVM)
diff --git a/dev-libs/rocm-device-libs/rocm-device-libs-5.5.1.ebuild b/dev-libs/rocm-device-libs/rocm-device-libs-5.5.1.ebuild
new file mode 100644
index 000000000000..6d104bcdde4e
--- /dev/null
+++ b/dev-libs/rocm-device-libs/rocm-device-libs-5.5.1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake llvm
+
+LLVM_MAX_SLOT=16
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCm-Device-Libs/"
+ inherit git-r3
+ S="${WORKDIR}/${P}/src"
+else
+ SRC_URI="https://github.com/RadeonOpenCompute/ROCm-Device-Libs/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}/ROCm-Device-Libs-rocm-${PV}"
+ KEYWORDS="~amd64"
+fi
+
+DESCRIPTION="Radeon Open Compute Device Libraries"
+HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm-Device-Libs"
+
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="sys-devel/clang:${LLVM_MAX_SLOT}"
+DEPEND="${RDEPEND}"
+
+CMAKE_BUILD_TYPE=Release
+
+PATCHES=(
+ "${FILESDIR}/${PN}-5.4.3-Revert-Update-counters-for-gfx11.patch"
+ "${FILESDIR}/${PN}-5.5.1-fix-llvm-link.patch"
+ )
+
+src_prepare() {
+ sed -e "s:amdgcn/bitcode:lib/amdgcn/bitcode:" -i "${S}/cmake/OCL.cmake" || die
+ sed -e "s:amdgcn/bitcode:lib/amdgcn/bitcode:" -i "${S}/cmake/Packages.cmake" || die
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLLVM_DIR="$(get_llvm_prefix "${LLVM_MAX_SLOT}")"
+ )
+ cmake_src_configure
+}