public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocr-runtime/files/, dev-libs/rocr-runtime/
@ 2019-10-03 15:54 Craig Andrews
  0 siblings, 0 replies; 8+ messages in thread
From: Craig Andrews @ 2019-10-03 15:54 UTC (permalink / raw
  To: gentoo-commits

commit:     ca51ee6c39978cc45987c2d096e588b17f0a5792
Author:     Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Thu Oct  3 15:54:04 2019 +0000
Commit:     Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Thu Oct  3 15:54:18 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca51ee6c

dev-libs/rocr-runtime: Fix SIGSEGV

Bug: https://github.com/RadeonOpenCompute/ROCR-Runtime/issues/68
Closes: https://bugs.gentoo.org/696108
Package-Manager: Portage-2.3.76, Repoman-2.3.17
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>

 .../rocr-runtime-2.8.0-fix_doorbell_map.patch      | 57 ++++++++++++++++++++++
 dev-libs/rocr-runtime/rocr-runtime-2.8.0-r1.ebuild | 38 +++++++++++++++
 2 files changed, 95 insertions(+)

diff --git a/dev-libs/rocr-runtime/files/rocr-runtime-2.8.0-fix_doorbell_map.patch b/dev-libs/rocr-runtime/files/rocr-runtime-2.8.0-fix_doorbell_map.patch
new file mode 100644
index 00000000000..aef3d297034
--- /dev/null
+++ b/dev-libs/rocr-runtime/files/rocr-runtime-2.8.0-fix_doorbell_map.patch
@@ -0,0 +1,57 @@
+https://github.com/RadeonOpenCompute/ROCR-Runtime/pull/71
+
+From d2a6ad97eb96a28d8f8b658b26ab94e911886cf2 Mon Sep 17 00:00:00 2001
+From: Sean Keely <Sean.Keely@amd.com>
+Date: Thu, 5 Sep 2019 20:58:57 -0500
+Subject: [PATCH] Correct doorbell_queue_map allocation.
+
+doorbell_queue_map should be allocated unconditionally.
+---
+ core/runtime/amd_gpu_agent.cpp | 22 +++++++++++-----------
+ 1 file changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/core/runtime/amd_gpu_agent.cpp b/core/runtime/amd_gpu_agent.cpp
+index 9b79a6b..76df913 100644
+--- a/core/runtime/amd_gpu_agent.cpp
++++ b/core/runtime/amd_gpu_agent.cpp
+@@ -1182,12 +1182,22 @@ void GpuAgent::SyncClocks() {
+ }
+ 
+ void GpuAgent::BindTrapHandler() {
++  // Make an empty map from doorbell index to queue.
++  // The trap handler uses this to retrieve a wave's amd_queue_t*.
++  auto doorbell_queue_map_size = MAX_NUM_DOORBELLS * sizeof(amd_queue_t*);
++
++  doorbell_queue_map_ = (amd_queue_t**)core::Runtime::runtime_singleton_->system_allocator()(
++      doorbell_queue_map_size, 0x1000, 0);
++  assert(doorbell_queue_map_ != NULL && "Doorbell queue map allocation failed");
++
++  memset(doorbell_queue_map_, 0, doorbell_queue_map_size);
++
+   if (isa_->GetMajorVersion() == 7) {
+     // No trap handler support on Gfx7, soft error.
+     return;
+   }
+ 
+-  // Disable trap handler on Carrizo until KFD is fixed.
++  // Disable trap handler on APUs until KFD is fixed.
+   if (profile_ == HSA_PROFILE_FULL) {
+     return;
+   }
+@@ -1195,16 +1205,6 @@ void GpuAgent::BindTrapHandler() {
+   // Assemble the trap handler source code.
+   AssembleShader("TrapHandler", AssembleTarget::ISA, trap_code_buf_, trap_code_buf_size_);
+ 
+-  // Make an empty map from doorbell index to queue.
+-  // The trap handler uses this to retrieve a wave's amd_queue_t*.
+-  auto doorbell_queue_map_size = MAX_NUM_DOORBELLS * sizeof(amd_queue_t*);
+-
+-  doorbell_queue_map_ = (amd_queue_t**)core::Runtime::runtime_singleton_->system_allocator()(
+-      doorbell_queue_map_size, 0x1000, 0);
+-  assert(doorbell_queue_map_ != NULL && "Doorbell queue map allocation failed");
+-
+-  memset(doorbell_queue_map_, 0, doorbell_queue_map_size);
+-
+   // Bind the trap handler to this node.
+   HSAKMT_STATUS err = hsaKmtSetTrapHandler(node_id(), trap_code_buf_, trap_code_buf_size_,
+                                            doorbell_queue_map_, doorbell_queue_map_size);

diff --git a/dev-libs/rocr-runtime/rocr-runtime-2.8.0-r1.ebuild b/dev-libs/rocr-runtime/rocr-runtime-2.8.0-r1.ebuild
new file mode 100644
index 00000000000..9a38ed33238
--- /dev/null
+++ b/dev-libs/rocr-runtime/rocr-runtime-2.8.0-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-utils
+
+if [[ ${PV} == *9999 ]] ; then
+	EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCR-Runtime/"
+	inherit git-r3
+	S="${WORKDIR}/${P}/src"
+else
+	SRC_URI="https://github.com/RadeonOpenCompute/ROCR-Runtime/archive/roc-${PV}.tar.gz -> ${P}.tar.gz"
+	S="${WORKDIR}/ROCR-Runtime-roc-${PV}/src"
+	KEYWORDS="~amd64"
+fi
+
+DESCRIPTION="Radeon Open Compute Runtime"
+HOMEPAGE="https://github.com/RadeonOpenCompute/ROCR-Runtime"
+PATCHES=(
+	"${FILESDIR}/${PN}-2.0.0-cmake-install-paths.patch"
+	"${FILESDIR}/${P}-fix_doorbell_map.patch"
+)
+
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+IUSE="nonfree"
+
+COMMON_DEPEND="sys-process/numactl"
+RDEPEND="${COMMON_DEPEND}
+	nonfree? ( dev-libs/hsa-ext-rocr )"
+DEPEND="${COMMON_DEPEND}
+	>=dev-libs/roct-thunk-interface-${PV}"
+
+src_prepare() {
+	sed -e "s:get_version ( \"1.0.0\" ):get_version ( \"${PV}\" ):" -i CMakeLists.txt || die
+	cmake-utils_src_prepare
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocr-runtime/files/, dev-libs/rocr-runtime/
@ 2020-08-22 17:49 Craig Andrews
  0 siblings, 0 replies; 8+ messages in thread
From: Craig Andrews @ 2020-08-22 17:49 UTC (permalink / raw
  To: gentoo-commits

commit:     ae21020147699ac175dcbdd89b271b5cb762c540
Author:     Wilfried Holzke <gentoo <AT> holzke <DOT> net>
AuthorDate: Sat Aug 22 17:55:33 2020 +0000
Commit:     Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Sat Aug 22 17:49:08 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae210201

dev-libs/rocr-runtime: Version bump to 3.7.0

Signed-off-by: Wilfried Holzke <gentoo <AT> holzke.net>
Package-Manager: Portage-2.3.103, Repoman-2.3.23
Closes: https://github.com/gentoo/gentoo/pull/17213
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>

 dev-libs/rocr-runtime/Manifest                     |  1 +
 .../rocr-runtime-3.7.0-cmake-install-paths.patch   | 53 ++++++++++++++++++++++
 dev-libs/rocr-runtime/rocr-runtime-3.7.0.ebuild    | 47 +++++++++++++++++++
 3 files changed, 101 insertions(+)

diff --git a/dev-libs/rocr-runtime/Manifest b/dev-libs/rocr-runtime/Manifest
index 443bde5eed8..d0f1a066964 100644
--- a/dev-libs/rocr-runtime/Manifest
+++ b/dev-libs/rocr-runtime/Manifest
@@ -2,3 +2,4 @@ DIST rocr-runtime-3.0.0.tar.gz 327908 BLAKE2B 0d95ecc22d27e470dd46f02aca012c59e8
 DIST rocr-runtime-3.1.0.tar.gz 329176 BLAKE2B 845dcfc5a00e6d571bfef6330b370f588496de95ee7e04caf9c29f81e389f3e82dcdace11d48c86b01119cc0e73bf0a50949da9c4f5383044360f59176670d95 SHA512 a9b540341c649786aa0b53755fc51f540425d67c5a567834abbef9bb55c9b0120b1f14c082bfbc97f3c2a586aa846853f293093116aa8625dc34cae6fe50683a
 DIST rocr-runtime-3.3.0.tar.gz 329386 BLAKE2B 59eb0838d377bb8b10887d7fb432e634190196516fff30a9401b591f2bb7846938c5486bac921fb4fce905a3acfbf4dd064ed9b53122da847fd5fb3d3d2f701c SHA512 ec7950aacd84c318978b9abbad0aafcae1e2d7d7c77806432bde0ce861372e6db92d74ba6445d3ac92c835aa0137b1929d27ddee77b9dae92ca2465a70c4878d
 DIST rocr-runtime-3.5.0.tar.gz 336269 BLAKE2B afde0f9fcfad389a56f31352036174b8b2a5e9960f5bbcff8a7ca9dc54e4b68d92b70afa70af5aa43d040749bccd2df957df89fea1036890abdaf7e6a5c3b620 SHA512 20d95b13dccf2fe5b8da5859661a21279f18d1c45899782c55477265500057708360ce2049a8e9b3aadbcb33f8e4274459edb17a8455dc3db69ccf31b86a581e
+DIST rocr-runtime-3.7.0.tar.gz 691234 BLAKE2B b0f3b1ff6c13c132d00bbf30d405746e793aae377aca2279117c7b9dd6fdc1d466ef2076947061c848913378a20ee0dc7e32847c62a7416e4088ab0705d17dfd SHA512 f7fa77524d7f63980194e93a8e3124f1471dcdfec6ede5eb993699083e5d8fba28737fcc63dbd61949e3ce60e9fbd1455ec055a0aa5c7eee724ae6bb61d3b24f

diff --git a/dev-libs/rocr-runtime/files/rocr-runtime-3.7.0-cmake-install-paths.patch b/dev-libs/rocr-runtime/files/rocr-runtime-3.7.0-cmake-install-paths.patch
new file mode 100644
index 00000000000..ccf397d8092
--- /dev/null
+++ b/dev-libs/rocr-runtime/files/rocr-runtime-3.7.0-cmake-install-paths.patch
@@ -0,0 +1,53 @@
+--- a/CMakeLists.txt	2020-08-22 18:24:27.991014917 +0200
++++ b/CMakeLists.txt	2020-08-22 18:48:03.209009518 +0200
+@@ -296,34 +296,36 @@
+ endif()
+ 
+ ## Create symlinks for legacy packaging and install
+-add_custom_target ( hsa_include_link ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../../include/hsa hsa_include_link )
+-if ( ${BUILD_SHARED_LIBS} )
+-    add_custom_target ( hsa_lib_link ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../../lib/${CORE_RUNTIME_LIBRARY}.so ${CORE_RUNTIME_LIBRARY}-link.so )
+-    add_custom_target ( hsa_lib_link2 ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../../lib/${CORE_RUNTIME_LIBRARY}.so.${VERSION_MAJOR} ${CORE_RUNTIME_LIBRARY}-link.so.${VERSION_MAJOR} )
+-endif()
++#add_custom_target ( hsa_include_link ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../../include/hsa hsa_include_link )
++#if ( ${BUILD_SHARED_LIBS} )
++#    add_custom_target ( hsa_lib_link ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../../lib/${CORE_RUNTIME_LIBRARY}.so ${CORE_RUNTIME_LIBRARY}-link.so )
++#    add_custom_target ( hsa_lib_link2 ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../../lib/${CORE_RUNTIME_LIBRARY}.so.${VERSION_MAJOR} ${CORE_RUNTIME_LIBRARY}-link.so.${VERSION_MAJOR} )
++#endif()
+ 
+ ## Set install information
+ # Installs binaries and exports the library usage data to ${HSAKMT_TARGET}Targets
+ # TODO: Fix me for flat directory layout.  Should be ${CMAKE_INSTALL_LIBDIR}
+-install ( TARGETS ${CORE_RUNTIME_TARGET} EXPORT ${CORE_RUNTIME_NAME}Targets 
+-  ARCHIVE DESTINATION lib COMPONENT binary
+-  LIBRARY DESTINATION lib COMPONENT binary )
++#install ( TARGETS ${CORE_RUNTIME_TARGET} EXPORT ${CORE_RUNTIME_NAME}Targets
++#  ARCHIVE DESTINATION lib COMPONENT binary
++#  LIBRARY DESTINATION lib COMPONENT binary )
++install ( TARGETS ${CORE_RUNTIME_TARGET} EXPORT ${CORE_RUNTIME_NAME}Targets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} )
+ 
+ # Install license
+ #install ( FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.md DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT binary )
+ 
+ # Install public headers
+ # TODO: Fix me for flat directory layout.  Should be ${CMAKE_INSTALL_INCLUDEDIR}
+-install ( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/inc/ DESTINATION include/hsa COMPONENT dev )
++#install ( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/inc/ DESTINATION include/hsa COMPONENT dev )
++install ( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/inc/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hsa )
+ 
+ # Legacy symlink.
+-install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/hsa_include_link DESTINATION hsa/include PERMISSIONS OWNER_WRITE OWNER_READ RENAME hsa COMPONENT dirlink)
++#install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/hsa_include_link DESTINATION hsa/include PERMISSIONS OWNER_WRITE OWNER_READ RENAME hsa COMPONENT dirlink)
+ 
+ # Legacy symlinks.
+-if ( ${BUILD_SHARED_LIBS} )
+-    install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/${CORE_RUNTIME_LIBRARY}-link.so DESTINATION hsa/lib PERMISSIONS OWNER_WRITE OWNER_READ RENAME ${CORE_RUNTIME_LIBRARY}.so COMPONENT binary)
+-    install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/${CORE_RUNTIME_LIBRARY}-link.so.${VERSION_MAJOR} DESTINATION hsa/lib PERMISSIONS OWNER_WRITE OWNER_READ RENAME ${CORE_RUNTIME_LIBRARY}.so.${VERSION_MAJOR} COMPONENT binary)
+-endif ()
++#if ( ${BUILD_SHARED_LIBS} )
++#    install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/${CORE_RUNTIME_LIBRARY}-link.so DESTINATION hsa/lib PERMISSIONS OWNER_WRITE OWNER_READ RENAME ${CORE_RUNTIME_LIBRARY}.so COMPONENT binary)
++#    install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/${CORE_RUNTIME_LIBRARY}-link.so.${VERSION_MAJOR} DESTINATION hsa/lib PERMISSIONS OWNER_WRITE OWNER_READ RENAME ${CORE_RUNTIME_LIBRARY}.so.${VERSION_MAJOR} COMPONENT binary)
++#endif ()
+ 
+ ## Configure and install package config file
+ # Record our usage data for clients find_package calls.

diff --git a/dev-libs/rocr-runtime/rocr-runtime-3.7.0.ebuild b/dev-libs/rocr-runtime/rocr-runtime-3.7.0.ebuild
new file mode 100644
index 00000000000..19f5c3ad9ae
--- /dev/null
+++ b/dev-libs/rocr-runtime/rocr-runtime-3.7.0.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+if [[ ${PV} == *9999 ]] ; then
+	EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCR-Runtime/"
+	inherit git-r3
+	S="${WORKDIR}/${P}/src"
+else
+	SRC_URI="https://github.com/RadeonOpenCompute/ROCR-Runtime/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz"
+	S="${WORKDIR}/ROCR-Runtime-rocm-${PV}/src"
+	KEYWORDS="~amd64"
+fi
+
+DESCRIPTION="Radeon Open Compute Runtime"
+HOMEPAGE="https://github.com/RadeonOpenCompute/ROCR-Runtime"
+PATCHES=(
+	"${FILESDIR}/${PN}-3.7.0-cmake-install-paths.patch"
+)
+
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+IUSE="non-free"
+
+COMMON_DEPEND="sys-process/numactl"
+RDEPEND="${COMMON_DEPEND}
+	non-free? ( dev-libs/hsa-ext-rocr )"
+DEPEND="${COMMON_DEPEND}
+	>=dev-libs/roct-thunk-interface-${PV}
+	>=dev-libs/rocm-device-libs-${PV}
+	app-editors/vim-core"
+	# vim-core is needed for "xxd"
+
+src_prepare() {
+	sed -e "s:get_version ( \"1.0.0\" ):get_version ( \"${PV}\" ):" -i CMakeLists.txt || die
+
+	# ... otherwise system llvm/clang is used ...
+	sed -e "s:find_package(Clang REQUIRED HINTS \${CMAKE_INSTALL_PREFIX}/llvm \${CMAKE_PREFIX_PATH}/llvm PATHS /opt/rocm/llvm ):find_package(Clang REQUIRED HINTS /usr/lib/llvm/roc ):" -i image/blit_src/CMakeLists.txt || die
+
+	# Gentoo install "*.bc" to "/usr/lib" instead of a "[path]/bitcode" directory ...
+	sed -e "s:/opt/rocm/amdgcn/bitcode:/usr/lib:" -i image/blit_src/CMakeLists.txt || die
+
+	cmake_src_prepare
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocr-runtime/files/, dev-libs/rocr-runtime/
@ 2021-03-28 21:20 Craig Andrews
  0 siblings, 0 replies; 8+ messages in thread
From: Craig Andrews @ 2021-03-28 21:20 UTC (permalink / raw
  To: gentoo-commits

commit:     9902edfda9e502869d6a69450be53995c133ab88
Author:     Wilfried Holzke <gentoo <AT> holzke <DOT> net>
AuthorDate: Sun Mar 28 15:37:50 2021 +0000
Commit:     Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Sun Mar 28 21:20:27 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9902edfd

dev-libs/rocr-runtime: Version bump to 4.1.0

Signed-off-by: Wilfried Holzke <gentoo <AT> holzke.net>
Package-Manager: Portage-3.0.13, Repoman-3.0.2
Closes: https://github.com/gentoo/gentoo/pull/20168
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>

 dev-libs/rocr-runtime/Manifest                     |  1 +
 .../rocr-runtime-4.1.0-cmake-install-paths.patch   | 53 ++++++++++++++++++++++
 dev-libs/rocr-runtime/rocr-runtime-4.1.0.ebuild    | 46 +++++++++++++++++++
 3 files changed, 100 insertions(+)

diff --git a/dev-libs/rocr-runtime/Manifest b/dev-libs/rocr-runtime/Manifest
index 06eb36c68e8..18bacae77eb 100644
--- a/dev-libs/rocr-runtime/Manifest
+++ b/dev-libs/rocr-runtime/Manifest
@@ -2,3 +2,4 @@ DIST rocr-runtime-3.10.0.tar.gz 691857 BLAKE2B 68403081180fe1aead570f8055f91d130
 DIST rocr-runtime-3.8.0.tar.gz 691209 BLAKE2B 0664b099a7ea4105e37cf42ee208c31dc58a1900aa35bbc0295df0cabba25e5352b3def0dbc1a8ea889ad4876321f99a73c4c6c9ec042186efda9b3308583825 SHA512 d968e96cabc98951890435a2b9bfc9943df9435848f0c6026a59953c78ad4c1048e7c532a8093e5f633fdc5d32622fb88ba0212f32f317d5473fd7e957e4dc4c
 DIST rocr-runtime-3.9.0.tar.gz 691645 BLAKE2B c90cdba93be510532a65ebfd69322972c61603b23932b95982d9a2bea742979b14acd83728a37ecacd7ec540268311bd313801acece89ec02a234dee66155dbe SHA512 e117536300ad05db27ccd92d2f9fadbdb9711fc724953ef65609c7af1ef369b8cf132c8b0f72d33e7ffd43acc3e59dc5525bacaa1507fd01fab79685f6b8d86e
 DIST rocr-runtime-4.0.0.tar.gz 691835 BLAKE2B 328f7ea54767294036f435894d63354694447d964753de8b58b70ba5ae5f83561e5cda506890b43c80bdc480b1781d246ee77d5a0b08f74c5eb52d1ac5e8ddda SHA512 c95316cd8f221caee84f644e00b2b08d447b75ae4e5fe1871fa2ac6a879da57def497babfcabcaeb988d92421c165070e47d9fe846640b871249d66c82f82bea
+DIST rocr-runtime-4.1.0.tar.gz 698452 BLAKE2B fb1ca1219d2c59db4d8bff414f40eaf6e7cec899a70ed930ce3dc6e2906a173db4823ac4c445fc57cc297a932f83b140747e35ee3d77fa0ed11cec97718fdc47 SHA512 d2162f431adf0b8f8ae5bbfe43ed389d4d94db5897fc8d1b4eb9b152a74f605fa2cf5d80175e6f9cda45e39803ededef6151aa9bdea99f38a16ca2dea29588d9

diff --git a/dev-libs/rocr-runtime/files/rocr-runtime-4.1.0-cmake-install-paths.patch b/dev-libs/rocr-runtime/files/rocr-runtime-4.1.0-cmake-install-paths.patch
new file mode 100644
index 00000000000..18ce75d8b46
--- /dev/null
+++ b/dev-libs/rocr-runtime/files/rocr-runtime-4.1.0-cmake-install-paths.patch
@@ -0,0 +1,53 @@
+--- a/CMakeLists.txt	2021-03-25 22:16:45.466833618 +0100
++++ b/CMakeLists.txt	2021-03-25 22:19:55.025828841 +0100
+@@ -296,34 +296,36 @@
+ endif()
+ 
+ ## Create symlinks for legacy packaging and install
+-add_custom_target ( hsa_include_link ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../../include/hsa hsa_include_link )
+-if ( ${BUILD_SHARED_LIBS} )
+-    add_custom_target ( hsa_lib_link ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../../lib/${CORE_RUNTIME_LIBRARY}.so ${CORE_RUNTIME_LIBRARY}-link.so )
+-    add_custom_target ( hsa_lib_link2 ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../../lib/${CORE_RUNTIME_LIBRARY}.so.${VERSION_MAJOR} ${CORE_RUNTIME_LIBRARY}-link.so.${VERSION_MAJOR} )
+-endif()
++#add_custom_target ( hsa_include_link ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../../include/hsa hsa_include_link )
++#if ( ${BUILD_SHARED_LIBS} )
++#    add_custom_target ( hsa_lib_link ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../../lib/${CORE_RUNTIME_LIBRARY}.so ${CORE_RUNTIME_LIBRARY}-link.so )
++#    add_custom_target ( hsa_lib_link2 ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../../lib/${CORE_RUNTIME_LIBRARY}.so.${VERSION_MAJOR} ${CORE_RUNTIME_LIBRARY}-link.so.${VERSION_MAJOR} )
++#endif()
+ 
+ ## Set install information
+ # Installs binaries and exports the library usage data to ${HSAKMT_TARGET}Targets
+ # TODO: Fix me for flat directory layout.  Should be ${CMAKE_INSTALL_LIBDIR}
+-install ( TARGETS ${CORE_RUNTIME_TARGET} EXPORT ${CORE_RUNTIME_NAME}Targets
+-  ARCHIVE DESTINATION lib COMPONENT binary
+-  LIBRARY DESTINATION lib COMPONENT binary )
++#install ( TARGETS ${CORE_RUNTIME_TARGET} EXPORT ${CORE_RUNTIME_NAME}Targets
++#  ARCHIVE DESTINATION lib COMPONENT binary
++#  LIBRARY DESTINATION lib COMPONENT binary )
++install ( TARGETS ${CORE_RUNTIME_TARGET} EXPORT ${CORE_RUNTIME_NAME}Targets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} )
+ 
+ # Install license
+ #install ( FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.md DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT binary )
+ 
+ # Install public headers
+ # TODO: Fix me for flat directory layout.  Should be ${CMAKE_INSTALL_INCLUDEDIR}
+-install ( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/inc/ DESTINATION include/hsa COMPONENT dev )
++#install ( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/inc/ DESTINATION include/hsa COMPONENT dev )
++install ( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/inc/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hsa )
+ 
+ # Legacy symlink.
+-install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/hsa_include_link DESTINATION hsa/include PERMISSIONS OWNER_WRITE OWNER_READ RENAME hsa COMPONENT dirlink)
++#install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/hsa_include_link DESTINATION hsa/include PERMISSIONS OWNER_WRITE OWNER_READ RENAME hsa COMPONENT dirlink)
+ 
+ # Legacy symlinks.
+-if ( ${BUILD_SHARED_LIBS} )
+-    install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/${CORE_RUNTIME_LIBRARY}-link.so DESTINATION hsa/lib PERMISSIONS OWNER_WRITE OWNER_READ RENAME ${CORE_RUNTIME_LIBRARY}.so COMPONENT binary)
+-    install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/${CORE_RUNTIME_LIBRARY}-link.so.${VERSION_MAJOR} DESTINATION hsa/lib PERMISSIONS OWNER_WRITE OWNER_READ RENAME ${CORE_RUNTIME_LIBRARY}.so.${VERSION_MAJOR} COMPONENT binary)
+-endif ()
++#if ( ${BUILD_SHARED_LIBS} )
++#    install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/${CORE_RUNTIME_LIBRARY}-link.so DESTINATION hsa/lib PERMISSIONS OWNER_WRITE OWNER_READ RENAME ${CORE_RUNTIME_LIBRARY}.so COMPONENT binary)
++#    install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/${CORE_RUNTIME_LIBRARY}-link.so.${VERSION_MAJOR} DESTINATION hsa/lib PERMISSIONS OWNER_WRITE OWNER_READ RENAME ${CORE_RUNTIME_LIBRARY}.so.${VERSION_MAJOR} COMPONENT binary)
++#endif ()
+ 
+ ## Configure and install package config file
+ # Record our usage data for clients find_package calls.

diff --git a/dev-libs/rocr-runtime/rocr-runtime-4.1.0.ebuild b/dev-libs/rocr-runtime/rocr-runtime-4.1.0.ebuild
new file mode 100644
index 00000000000..75444f1b60d
--- /dev/null
+++ b/dev-libs/rocr-runtime/rocr-runtime-4.1.0.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+if [[ ${PV} == *9999 ]] ; then
+	EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCR-Runtime/"
+	inherit git-r3
+	S="${WORKDIR}/${P}/src"
+else
+	SRC_URI="https://github.com/RadeonOpenCompute/ROCR-Runtime/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz"
+	S="${WORKDIR}/ROCR-Runtime-rocm-${PV}/src"
+	KEYWORDS="~amd64"
+fi
+
+DESCRIPTION="Radeon Open Compute Runtime"
+HOMEPAGE="https://github.com/RadeonOpenCompute/ROCR-Runtime"
+PATCHES=(
+	"${FILESDIR}/${PN}-4.1.0-cmake-install-paths.patch"
+)
+
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+
+COMMON_DEPEND="sys-process/numactl
+	dev-libs/elfutils:="
+RDEPEND="${COMMON_DEPEND}"
+DEPEND="${COMMON_DEPEND}
+	>=dev-libs/roct-thunk-interface-${PV}
+	>=dev-libs/rocm-device-libs-${PV}"
+BDEPEND="app-editors/vim-core"
+	# vim-core is needed for "xxd"
+
+src_prepare() {
+	sed -e "s:get_version ( \"1.0.0\" ):get_version ( \"${PV}\" ):" -i CMakeLists.txt || die
+
+	# ... otherwise system llvm/clang is used ...
+	sed -e "s:find_package(Clang REQUIRED HINTS \${CMAKE_INSTALL_PREFIX}/llvm \${CMAKE_PREFIX_PATH}/llvm PATHS /opt/rocm/llvm ):find_package(Clang REQUIRED HINTS /usr/lib/llvm/roc ):" -i image/blit_src/CMakeLists.txt || die
+
+	# Gentoo installs "*.bc" to "/usr/lib" instead of a "[path]/bitcode" directory ...
+	sed -e "s:/opt/rocm/amdgcn/bitcode:/usr/lib/amdgcn/bitcode:" -i image/blit_src/CMakeLists.txt || die
+
+	cmake_src_prepare
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocr-runtime/files/, dev-libs/rocr-runtime/
@ 2022-02-06 14:48 Benda XU
  0 siblings, 0 replies; 8+ messages in thread
From: Benda XU @ 2022-02-06 14:48 UTC (permalink / raw
  To: gentoo-commits

commit:     1d2b6d182c6d7945ec5166803ca071f640ad994b
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Sun Feb  6 14:45:05 2022 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Sun Feb  6 14:48:15 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d2b6d18

dev-libs/rocr-runtime: drop proprietary AQLProfile.

Patch out the error messages.

Closes: https://bugs.gentoo.org/716948
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>

 .../files/rocr-runtime-4.3.0_no-sqlprofiler.patch  | 29 ++++++++++++++++++++++
 dev-libs/rocr-runtime/rocr-runtime-4.3.0.ebuild    |  4 ++-
 2 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/dev-libs/rocr-runtime/files/rocr-runtime-4.3.0_no-sqlprofiler.patch b/dev-libs/rocr-runtime/files/rocr-runtime-4.3.0_no-sqlprofiler.patch
new file mode 100644
index 000000000000..fdb34b75b2d2
--- /dev/null
+++ b/dev-libs/rocr-runtime/files/rocr-runtime-4.3.0_no-sqlprofiler.patch
@@ -0,0 +1,29 @@
+Index: ROCR-Runtime-rocm-4.3.0/src/core/runtime/amd_gpu_agent.cpp
+===================================================================
+--- src/core/runtime/amd_gpu_agent.cpp
++++ src/core/runtime/amd_gpu_agent.cpp
+@@ -861,11 +861,6 @@ hsa_status_t GpuAgent::GetInfo(hsa_agent
+         setFlag(HSA_EXTENSION_IMAGES);
+       }
+ 
+-      if (os::LibHandle lib = os::LoadLib(kAqlProfileLib)) {
+-        os::CloseLib(lib);
+-        setFlag(HSA_EXTENSION_AMD_AQLPROFILE);
+-      }
+-
+       setFlag(HSA_EXTENSION_AMD_PROFILER);
+ 
+       break;
+Index: ROCR-Runtime-rocm-4.3.0/src/core/runtime/hsa.cpp
+===================================================================
+--- src/core/runtime/hsa.cpp
++++ src/core/runtime/hsa.cpp
+@@ -471,7 +471,7 @@ hsa_status_t hsa_system_get_major_extens
+     return HSA_STATUS_SUCCESS;
+   }
+ 
+-  if (extension == HSA_EXTENSION_AMD_AQLPROFILE) {
++  if (0) {
+     if (version_major != hsa_ven_amd_aqlprofile_VERSION_MAJOR) {
+       debug_print("aqlprofile API incompatible ver %d, current ver %d\n",
+         version_major, hsa_ven_amd_aqlprofile_VERSION_MAJOR);

diff --git a/dev-libs/rocr-runtime/rocr-runtime-4.3.0.ebuild b/dev-libs/rocr-runtime/rocr-runtime-4.3.0.ebuild
index c1f5f5a3a07b..2be1fb23feb6 100644
--- a/dev-libs/rocr-runtime/rocr-runtime-4.3.0.ebuild
+++ b/dev-libs/rocr-runtime/rocr-runtime-4.3.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -33,6 +33,8 @@ DEPEND="${COMMON_DEPEND}
 BDEPEND="app-editors/vim-core"
 	# vim-core is needed for "xxd"
 
+PATCHES=( "${FILESDIR}"/${PN}-4.3.0_no-sqlprofiler.patch )
+
 src_prepare() {
 	# ... otherwise system llvm/clang is used ...
 	sed -e "s:find_package(Clang REQUIRED HINTS \${CMAKE_INSTALL_PREFIX}/llvm \${CMAKE_PREFIX_PATH}/llvm PATHS /opt/rocm/llvm ):find_package(Clang REQUIRED HINTS ${EPREFIX}/usr/lib/llvm/roc ):" -i image/blit_src/CMakeLists.txt || die


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocr-runtime/files/, dev-libs/rocr-runtime/
@ 2022-02-11 16:12 Joonas Niilola
  0 siblings, 0 replies; 8+ messages in thread
From: Joonas Niilola @ 2022-02-11 16:12 UTC (permalink / raw
  To: gentoo-commits

commit:     a3823c8227d00da5276ad995a06e4b276f342af6
Author:     Fco Javier Felix <ffelix <AT> inode64 <DOT> com>
AuthorDate: Fri Feb 11 16:03:57 2022 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Feb 11 16:12:44 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3823c82

dev-libs/rocr-runtime: bump to 4.5.2

Package-Manager: Portage-3.0.28-r1, Repoman-3.0.3-r1
Signed-off-by: Fco. Javier Felix <ffelix <AT> inode64.com>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 dev-libs/rocr-runtime/Manifest                     |  1 +
 .../rocr-runtime-4.5.2-cmake-install-paths.patch   | 40 +++++++++++++++++++
 dev-libs/rocr-runtime/rocr-runtime-4.5.2.ebuild    | 45 ++++++++++++++++++++++
 3 files changed, 86 insertions(+)

diff --git a/dev-libs/rocr-runtime/Manifest b/dev-libs/rocr-runtime/Manifest
index 36efcbb03efe..abe87a169710 100644
--- a/dev-libs/rocr-runtime/Manifest
+++ b/dev-libs/rocr-runtime/Manifest
@@ -5,3 +5,4 @@ DIST rocr-runtime-4.0.0.tar.gz 691835 BLAKE2B 328f7ea54767294036f435894d63354694
 DIST rocr-runtime-4.1.0.tar.gz 698452 BLAKE2B fb1ca1219d2c59db4d8bff414f40eaf6e7cec899a70ed930ce3dc6e2906a173db4823ac4c445fc57cc297a932f83b140747e35ee3d77fa0ed11cec97718fdc47 SHA512 d2162f431adf0b8f8ae5bbfe43ed389d4d94db5897fc8d1b4eb9b152a74f605fa2cf5d80175e6f9cda45e39803ededef6151aa9bdea99f38a16ca2dea29588d9
 DIST rocr-runtime-4.2.0.tar.gz 701445 BLAKE2B 901c256bae823861813a7afdbd3e9f80b6f86cf2c7002815e04c762cef241a9f32274093067c97578e05fdf5c4e699287b7835d00917cb4997302c455e5d593a SHA512 44a798efd0121c7107f3f5df868eb83d0ff9aad1e11c01105d5852bef159c019db6d2aeebe02e8e187dc45a2542d72f145fb5390b27abf64e0b427e192772d6c
 DIST rocr-runtime-4.3.0.tar.gz 709075 BLAKE2B 6856681bd3d56827e517f76838886f793f4d709562c2c7c4f480ef5786c5a5fac25654032b80d565ab5da241f76329d39ab3189daa4806b8cf1564d9f08a837d SHA512 749a8f84a302f7ed518f87688f68cc2a094eea2d104cddc25b3e5d98ddf6e534285750828ca654976054bbf986a61735e17ad211505557671627e44f6831dc0c
+DIST rocr-runtime-4.5.2.tar.gz 717648 BLAKE2B f3acf32943b73b65f1272317bbd8928d1a05e9985ec6242f0480cfdb988052caef198900643fc42288af6acd5fbe2052f063b022219b2ef0d3fb843032de6c92 SHA512 69d7a3f7960ffca339d706a9356e0994851761a135e1b7e7b9b451bcff5782c119b99756432546e7f066f8b60b8717557340cf382f8a9beae6336d23d90ecae4

diff --git a/dev-libs/rocr-runtime/files/rocr-runtime-4.5.2-cmake-install-paths.patch b/dev-libs/rocr-runtime/files/rocr-runtime-4.5.2-cmake-install-paths.patch
new file mode 100644
index 000000000000..063fafe336f7
--- /dev/null
+++ b/dev-libs/rocr-runtime/files/rocr-runtime-4.5.2-cmake-install-paths.patch
@@ -0,0 +1,40 @@
+--- a/CMakeLists.txt	2021-12-10 22:55:24.000000000 +0100
++++ b/CMakeLists.txt	2021-12-15 15:33:43.545084656 +0100
+@@ -286,35 +286,17 @@
+   install ( TARGETS ${CORE_RUNTIME_NAME} EXPORT ${CORE_RUNTIME_NAME}Targets )
+ endif()
+ 
+-## Create symlinks for legacy packaging and install
+-add_custom_target ( hsa_include_link ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../../include/hsa hsa_include_link )
+-if ( ${BUILD_SHARED_LIBS} )
+-    add_custom_target ( hsa_lib_link ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../../lib/${CORE_RUNTIME_LIBRARY}.so ${CORE_RUNTIME_LIBRARY}-link.so )
+-    add_custom_target ( hsa_lib_link2 ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../../lib/${CORE_RUNTIME_LIBRARY}.so.${VERSION_MAJOR} ${CORE_RUNTIME_LIBRARY}-link.so.${VERSION_MAJOR} )
+-endif()
+-
+ ## Set install information
+ # Installs binaries and exports the library usage data to ${HSAKMT_TARGET}Targets
+ # TODO: Fix me for flat directory layout.  Should be ${CMAKE_INSTALL_LIBDIR}
+-install ( TARGETS ${CORE_RUNTIME_TARGET} EXPORT ${CORE_RUNTIME_NAME}Targets
+-  ARCHIVE DESTINATION lib COMPONENT binary
+-  LIBRARY DESTINATION lib COMPONENT binary )
++install ( TARGETS ${CORE_RUNTIME_TARGET} EXPORT ${CORE_RUNTIME_NAME}Targets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} )
+ 
+ # Install license
+ #install ( FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.md DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT binary )
+ 
+ # Install public headers
+ # TODO: Fix me for flat directory layout.  Should be ${CMAKE_INSTALL_INCLUDEDIR}
+-install ( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/inc/ DESTINATION include/hsa COMPONENT dev )
+-
+-# Legacy symlink - not packaged (CPack is bugged until ~3.18, see https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4637)
+-install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/hsa_include_link DESTINATION hsa/include PERMISSIONS OWNER_WRITE OWNER_READ RENAME hsa )
+-
+-# Legacy symlinks.
+-if ( ${BUILD_SHARED_LIBS} )
+-    install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/${CORE_RUNTIME_LIBRARY}-link.so DESTINATION hsa/lib PERMISSIONS OWNER_WRITE OWNER_READ RENAME ${CORE_RUNTIME_LIBRARY}.so COMPONENT binary)
+-    install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/${CORE_RUNTIME_LIBRARY}-link.so.${VERSION_MAJOR} DESTINATION hsa/lib PERMISSIONS OWNER_WRITE OWNER_READ RENAME ${CORE_RUNTIME_LIBRARY}.so.${VERSION_MAJOR} COMPONENT binary)
+-endif ()
++install ( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/inc/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hsa )
+ 
+ ## Configure and install package config file
+ # Record our usage data for clients find_package calls.

diff --git a/dev-libs/rocr-runtime/rocr-runtime-4.5.2.ebuild b/dev-libs/rocr-runtime/rocr-runtime-4.5.2.ebuild
new file mode 100644
index 000000000000..d5c28fbc1b76
--- /dev/null
+++ b/dev-libs/rocr-runtime/rocr-runtime-4.5.2.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+if [[ ${PV} == *9999 ]] ; then
+	EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCR-Runtime/"
+	inherit git-r3
+	S="${WORKDIR}/${P}/src"
+else
+	SRC_URI="https://github.com/RadeonOpenCompute/ROCR-Runtime/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz"
+	S="${WORKDIR}/ROCR-Runtime-rocm-${PV}/src"
+	KEYWORDS="~amd64"
+fi
+
+DESCRIPTION="Radeon Open Compute Runtime"
+HOMEPAGE="https://github.com/RadeonOpenCompute/ROCR-Runtime"
+PATCHES=(
+	"${FILESDIR}/${PN}-4.5.2-cmake-install-paths.patch"
+)
+
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+
+COMMON_DEPEND="dev-libs/elfutils"
+RDEPEND="${COMMON_DEPEND}"
+DEPEND="${COMMON_DEPEND}
+	>=dev-libs/roct-thunk-interface-${PV}
+	>=dev-libs/rocm-device-libs-${PV}"
+BDEPEND="app-editors/vim-core"
+	# vim-core is needed for "xxd"
+
+CMAKE_BUILD_TYPE=Release
+
+src_prepare() {
+	# ... otherwise system llvm/clang is used ...
+	sed -e "s:find_package(Clang REQUIRED HINTS \${CMAKE_INSTALL_PREFIX}/llvm \${CMAKE_PREFIX_PATH}/llvm PATHS /opt/rocm/llvm ):find_package(Clang REQUIRED HINTS ${EPREFIX}/usr/lib/llvm/roc ):" -i image/blit_src/CMakeLists.txt || die
+
+	# Gentoo installs "*.bc" to "/usr/lib" instead of a "[path]/bitcode" directory ...
+	sed -e "s:/opt/rocm/amdgcn/bitcode:${EPREFIX}/usr/lib/amdgcn/bitcode:" -i image/blit_src/CMakeLists.txt || die
+
+	cmake_src_prepare
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocr-runtime/files/, dev-libs/rocr-runtime/
@ 2022-12-19 14:00 Andreas Sturmlechner
  0 siblings, 0 replies; 8+ messages in thread
From: Andreas Sturmlechner @ 2022-12-19 14:00 UTC (permalink / raw
  To: gentoo-commits

commit:     e59d3dedf0149693d186ea22a2003fd7abef10c2
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 19 08:01:56 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Dec 19 14:00:00 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e59d3ded

dev-libs/rocr-runtime: drop versions 3* and 4*

Closes: https://bugs.gentoo.org/874513
Closes: https://bugs.gentoo.org/744928
Closes: https://bugs.gentoo.org/832810
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 dev-libs/rocr-runtime/Manifest                     |  8 ----
 .../rocr-runtime-3.7.0-cmake-install-paths.patch   | 53 ----------------------
 .../rocr-runtime-4.1.0-cmake-install-paths.patch   | 53 ----------------------
 dev-libs/rocr-runtime/rocr-runtime-3.10.0.ebuild   | 47 -------------------
 dev-libs/rocr-runtime/rocr-runtime-3.8.0.ebuild    | 47 -------------------
 dev-libs/rocr-runtime/rocr-runtime-3.9.0.ebuild    | 47 -------------------
 dev-libs/rocr-runtime/rocr-runtime-4.0.0.ebuild    | 47 -------------------
 dev-libs/rocr-runtime/rocr-runtime-4.1.0.ebuild    | 53 ----------------------
 dev-libs/rocr-runtime/rocr-runtime-4.2.0.ebuild    | 46 -------------------
 dev-libs/rocr-runtime/rocr-runtime-4.3.0.ebuild    | 45 ------------------
 dev-libs/rocr-runtime/rocr-runtime-4.5.2.ebuild    | 45 ------------------
 11 files changed, 491 deletions(-)

diff --git a/dev-libs/rocr-runtime/Manifest b/dev-libs/rocr-runtime/Manifest
index 28ac4595e447..403e4dfc6b2a 100644
--- a/dev-libs/rocr-runtime/Manifest
+++ b/dev-libs/rocr-runtime/Manifest
@@ -1,10 +1,2 @@
-DIST rocr-runtime-3.10.0.tar.gz 691857 BLAKE2B 68403081180fe1aead570f8055f91d13083516766afe6c9fd18d7619162cc12fa6dd0ec824ffdc44832d1ab7e823ac2cc399b7cbb4e603f95db54e492de152c5 SHA512 9ca7c7a22ea2a35437aa1a23a331c36684ada1af0f389f697bd6c1e35c4f9493b851d7e7176a0892be36d3d7de93000f7db37e3d2c109fa6c1932851c3bd703b
-DIST rocr-runtime-3.8.0.tar.gz 691209 BLAKE2B 0664b099a7ea4105e37cf42ee208c31dc58a1900aa35bbc0295df0cabba25e5352b3def0dbc1a8ea889ad4876321f99a73c4c6c9ec042186efda9b3308583825 SHA512 d968e96cabc98951890435a2b9bfc9943df9435848f0c6026a59953c78ad4c1048e7c532a8093e5f633fdc5d32622fb88ba0212f32f317d5473fd7e957e4dc4c
-DIST rocr-runtime-3.9.0.tar.gz 691645 BLAKE2B c90cdba93be510532a65ebfd69322972c61603b23932b95982d9a2bea742979b14acd83728a37ecacd7ec540268311bd313801acece89ec02a234dee66155dbe SHA512 e117536300ad05db27ccd92d2f9fadbdb9711fc724953ef65609c7af1ef369b8cf132c8b0f72d33e7ffd43acc3e59dc5525bacaa1507fd01fab79685f6b8d86e
-DIST rocr-runtime-4.0.0.tar.gz 691835 BLAKE2B 328f7ea54767294036f435894d63354694447d964753de8b58b70ba5ae5f83561e5cda506890b43c80bdc480b1781d246ee77d5a0b08f74c5eb52d1ac5e8ddda SHA512 c95316cd8f221caee84f644e00b2b08d447b75ae4e5fe1871fa2ac6a879da57def497babfcabcaeb988d92421c165070e47d9fe846640b871249d66c82f82bea
-DIST rocr-runtime-4.1.0.tar.gz 698452 BLAKE2B fb1ca1219d2c59db4d8bff414f40eaf6e7cec899a70ed930ce3dc6e2906a173db4823ac4c445fc57cc297a932f83b140747e35ee3d77fa0ed11cec97718fdc47 SHA512 d2162f431adf0b8f8ae5bbfe43ed389d4d94db5897fc8d1b4eb9b152a74f605fa2cf5d80175e6f9cda45e39803ededef6151aa9bdea99f38a16ca2dea29588d9
-DIST rocr-runtime-4.2.0.tar.gz 701445 BLAKE2B 901c256bae823861813a7afdbd3e9f80b6f86cf2c7002815e04c762cef241a9f32274093067c97578e05fdf5c4e699287b7835d00917cb4997302c455e5d593a SHA512 44a798efd0121c7107f3f5df868eb83d0ff9aad1e11c01105d5852bef159c019db6d2aeebe02e8e187dc45a2542d72f145fb5390b27abf64e0b427e192772d6c
-DIST rocr-runtime-4.3.0.tar.gz 709075 BLAKE2B 6856681bd3d56827e517f76838886f793f4d709562c2c7c4f480ef5786c5a5fac25654032b80d565ab5da241f76329d39ab3189daa4806b8cf1564d9f08a837d SHA512 749a8f84a302f7ed518f87688f68cc2a094eea2d104cddc25b3e5d98ddf6e534285750828ca654976054bbf986a61735e17ad211505557671627e44f6831dc0c
-DIST rocr-runtime-4.5.2.tar.gz 717648 BLAKE2B f3acf32943b73b65f1272317bbd8928d1a05e9985ec6242f0480cfdb988052caef198900643fc42288af6acd5fbe2052f063b022219b2ef0d3fb843032de6c92 SHA512 69d7a3f7960ffca339d706a9356e0994851761a135e1b7e7b9b451bcff5782c119b99756432546e7f066f8b60b8717557340cf382f8a9beae6336d23d90ecae4
 DIST rocr-runtime-5.0.2.tar.gz 719840 BLAKE2B 3d0fd6df0a0ab1e180b4a6e61fdf6d796cf71ab7b259057a1942f70dfcbcf8cb5ee6ac563a4baefe3c608139eaf3d8433b5b58e871b45f43cb4d98d1889f6718 SHA512 0590975cab6463a39d78bad933f8e0d30cf23d100b58f5b1968f6d6bc4b88e3c6bca5c46783e321d4bfc9a685837385f90feb8e922523c002c1f4ea0c70bdf72
 DIST rocr-runtime-5.1.3.tar.gz 720567 BLAKE2B bdf2d258ec607ffc69264d48ce82c36787757b7809397d643a24abaa852f3cc217a57210fba760d4d11ef8ce2922dc1ef275d3b47a4bebc5c7b204bbbb5b7c66 SHA512 d47523ea2fe32fee832ca19b56a091f52e16b366db1c571f87e5599514b826376d49281e79ff0936dcaf7349f9becbc8ae9b3e9472a9c3e14b62a3f98d541b35

diff --git a/dev-libs/rocr-runtime/files/rocr-runtime-3.7.0-cmake-install-paths.patch b/dev-libs/rocr-runtime/files/rocr-runtime-3.7.0-cmake-install-paths.patch
deleted file mode 100644
index ccf397d8092a..000000000000
--- a/dev-libs/rocr-runtime/files/rocr-runtime-3.7.0-cmake-install-paths.patch
+++ /dev/null
@@ -1,53 +0,0 @@
---- a/CMakeLists.txt	2020-08-22 18:24:27.991014917 +0200
-+++ b/CMakeLists.txt	2020-08-22 18:48:03.209009518 +0200
-@@ -296,34 +296,36 @@
- endif()
- 
- ## Create symlinks for legacy packaging and install
--add_custom_target ( hsa_include_link ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../../include/hsa hsa_include_link )
--if ( ${BUILD_SHARED_LIBS} )
--    add_custom_target ( hsa_lib_link ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../../lib/${CORE_RUNTIME_LIBRARY}.so ${CORE_RUNTIME_LIBRARY}-link.so )
--    add_custom_target ( hsa_lib_link2 ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../../lib/${CORE_RUNTIME_LIBRARY}.so.${VERSION_MAJOR} ${CORE_RUNTIME_LIBRARY}-link.so.${VERSION_MAJOR} )
--endif()
-+#add_custom_target ( hsa_include_link ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../../include/hsa hsa_include_link )
-+#if ( ${BUILD_SHARED_LIBS} )
-+#    add_custom_target ( hsa_lib_link ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../../lib/${CORE_RUNTIME_LIBRARY}.so ${CORE_RUNTIME_LIBRARY}-link.so )
-+#    add_custom_target ( hsa_lib_link2 ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../../lib/${CORE_RUNTIME_LIBRARY}.so.${VERSION_MAJOR} ${CORE_RUNTIME_LIBRARY}-link.so.${VERSION_MAJOR} )
-+#endif()
- 
- ## Set install information
- # Installs binaries and exports the library usage data to ${HSAKMT_TARGET}Targets
- # TODO: Fix me for flat directory layout.  Should be ${CMAKE_INSTALL_LIBDIR}
--install ( TARGETS ${CORE_RUNTIME_TARGET} EXPORT ${CORE_RUNTIME_NAME}Targets 
--  ARCHIVE DESTINATION lib COMPONENT binary
--  LIBRARY DESTINATION lib COMPONENT binary )
-+#install ( TARGETS ${CORE_RUNTIME_TARGET} EXPORT ${CORE_RUNTIME_NAME}Targets
-+#  ARCHIVE DESTINATION lib COMPONENT binary
-+#  LIBRARY DESTINATION lib COMPONENT binary )
-+install ( TARGETS ${CORE_RUNTIME_TARGET} EXPORT ${CORE_RUNTIME_NAME}Targets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} )
- 
- # Install license
- #install ( FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.md DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT binary )
- 
- # Install public headers
- # TODO: Fix me for flat directory layout.  Should be ${CMAKE_INSTALL_INCLUDEDIR}
--install ( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/inc/ DESTINATION include/hsa COMPONENT dev )
-+#install ( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/inc/ DESTINATION include/hsa COMPONENT dev )
-+install ( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/inc/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hsa )
- 
- # Legacy symlink.
--install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/hsa_include_link DESTINATION hsa/include PERMISSIONS OWNER_WRITE OWNER_READ RENAME hsa COMPONENT dirlink)
-+#install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/hsa_include_link DESTINATION hsa/include PERMISSIONS OWNER_WRITE OWNER_READ RENAME hsa COMPONENT dirlink)
- 
- # Legacy symlinks.
--if ( ${BUILD_SHARED_LIBS} )
--    install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/${CORE_RUNTIME_LIBRARY}-link.so DESTINATION hsa/lib PERMISSIONS OWNER_WRITE OWNER_READ RENAME ${CORE_RUNTIME_LIBRARY}.so COMPONENT binary)
--    install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/${CORE_RUNTIME_LIBRARY}-link.so.${VERSION_MAJOR} DESTINATION hsa/lib PERMISSIONS OWNER_WRITE OWNER_READ RENAME ${CORE_RUNTIME_LIBRARY}.so.${VERSION_MAJOR} COMPONENT binary)
--endif ()
-+#if ( ${BUILD_SHARED_LIBS} )
-+#    install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/${CORE_RUNTIME_LIBRARY}-link.so DESTINATION hsa/lib PERMISSIONS OWNER_WRITE OWNER_READ RENAME ${CORE_RUNTIME_LIBRARY}.so COMPONENT binary)
-+#    install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/${CORE_RUNTIME_LIBRARY}-link.so.${VERSION_MAJOR} DESTINATION hsa/lib PERMISSIONS OWNER_WRITE OWNER_READ RENAME ${CORE_RUNTIME_LIBRARY}.so.${VERSION_MAJOR} COMPONENT binary)
-+#endif ()
- 
- ## Configure and install package config file
- # Record our usage data for clients find_package calls.

diff --git a/dev-libs/rocr-runtime/files/rocr-runtime-4.1.0-cmake-install-paths.patch b/dev-libs/rocr-runtime/files/rocr-runtime-4.1.0-cmake-install-paths.patch
deleted file mode 100644
index 18ce75d8b462..000000000000
--- a/dev-libs/rocr-runtime/files/rocr-runtime-4.1.0-cmake-install-paths.patch
+++ /dev/null
@@ -1,53 +0,0 @@
---- a/CMakeLists.txt	2021-03-25 22:16:45.466833618 +0100
-+++ b/CMakeLists.txt	2021-03-25 22:19:55.025828841 +0100
-@@ -296,34 +296,36 @@
- endif()
- 
- ## Create symlinks for legacy packaging and install
--add_custom_target ( hsa_include_link ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../../include/hsa hsa_include_link )
--if ( ${BUILD_SHARED_LIBS} )
--    add_custom_target ( hsa_lib_link ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../../lib/${CORE_RUNTIME_LIBRARY}.so ${CORE_RUNTIME_LIBRARY}-link.so )
--    add_custom_target ( hsa_lib_link2 ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../../lib/${CORE_RUNTIME_LIBRARY}.so.${VERSION_MAJOR} ${CORE_RUNTIME_LIBRARY}-link.so.${VERSION_MAJOR} )
--endif()
-+#add_custom_target ( hsa_include_link ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../../include/hsa hsa_include_link )
-+#if ( ${BUILD_SHARED_LIBS} )
-+#    add_custom_target ( hsa_lib_link ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../../lib/${CORE_RUNTIME_LIBRARY}.so ${CORE_RUNTIME_LIBRARY}-link.so )
-+#    add_custom_target ( hsa_lib_link2 ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../../lib/${CORE_RUNTIME_LIBRARY}.so.${VERSION_MAJOR} ${CORE_RUNTIME_LIBRARY}-link.so.${VERSION_MAJOR} )
-+#endif()
- 
- ## Set install information
- # Installs binaries and exports the library usage data to ${HSAKMT_TARGET}Targets
- # TODO: Fix me for flat directory layout.  Should be ${CMAKE_INSTALL_LIBDIR}
--install ( TARGETS ${CORE_RUNTIME_TARGET} EXPORT ${CORE_RUNTIME_NAME}Targets
--  ARCHIVE DESTINATION lib COMPONENT binary
--  LIBRARY DESTINATION lib COMPONENT binary )
-+#install ( TARGETS ${CORE_RUNTIME_TARGET} EXPORT ${CORE_RUNTIME_NAME}Targets
-+#  ARCHIVE DESTINATION lib COMPONENT binary
-+#  LIBRARY DESTINATION lib COMPONENT binary )
-+install ( TARGETS ${CORE_RUNTIME_TARGET} EXPORT ${CORE_RUNTIME_NAME}Targets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} )
- 
- # Install license
- #install ( FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.md DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT binary )
- 
- # Install public headers
- # TODO: Fix me for flat directory layout.  Should be ${CMAKE_INSTALL_INCLUDEDIR}
--install ( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/inc/ DESTINATION include/hsa COMPONENT dev )
-+#install ( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/inc/ DESTINATION include/hsa COMPONENT dev )
-+install ( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/inc/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hsa )
- 
- # Legacy symlink.
--install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/hsa_include_link DESTINATION hsa/include PERMISSIONS OWNER_WRITE OWNER_READ RENAME hsa COMPONENT dirlink)
-+#install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/hsa_include_link DESTINATION hsa/include PERMISSIONS OWNER_WRITE OWNER_READ RENAME hsa COMPONENT dirlink)
- 
- # Legacy symlinks.
--if ( ${BUILD_SHARED_LIBS} )
--    install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/${CORE_RUNTIME_LIBRARY}-link.so DESTINATION hsa/lib PERMISSIONS OWNER_WRITE OWNER_READ RENAME ${CORE_RUNTIME_LIBRARY}.so COMPONENT binary)
--    install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/${CORE_RUNTIME_LIBRARY}-link.so.${VERSION_MAJOR} DESTINATION hsa/lib PERMISSIONS OWNER_WRITE OWNER_READ RENAME ${CORE_RUNTIME_LIBRARY}.so.${VERSION_MAJOR} COMPONENT binary)
--endif ()
-+#if ( ${BUILD_SHARED_LIBS} )
-+#    install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/${CORE_RUNTIME_LIBRARY}-link.so DESTINATION hsa/lib PERMISSIONS OWNER_WRITE OWNER_READ RENAME ${CORE_RUNTIME_LIBRARY}.so COMPONENT binary)
-+#    install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/${CORE_RUNTIME_LIBRARY}-link.so.${VERSION_MAJOR} DESTINATION hsa/lib PERMISSIONS OWNER_WRITE OWNER_READ RENAME ${CORE_RUNTIME_LIBRARY}.so.${VERSION_MAJOR} COMPONENT binary)
-+#endif ()
- 
- ## Configure and install package config file
- # Record our usage data for clients find_package calls.

diff --git a/dev-libs/rocr-runtime/rocr-runtime-3.10.0.ebuild b/dev-libs/rocr-runtime/rocr-runtime-3.10.0.ebuild
deleted file mode 100644
index 256f7ffb9e4a..000000000000
--- a/dev-libs/rocr-runtime/rocr-runtime-3.10.0.ebuild
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake
-
-if [[ ${PV} == *9999 ]] ; then
-	EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCR-Runtime/"
-	inherit git-r3
-	S="${WORKDIR}/${P}/src"
-else
-	SRC_URI="https://github.com/RadeonOpenCompute/ROCR-Runtime/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz"
-	S="${WORKDIR}/ROCR-Runtime-rocm-${PV}/src"
-	KEYWORDS="~amd64"
-fi
-
-DESCRIPTION="Radeon Open Compute Runtime"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCR-Runtime"
-PATCHES=(
-	"${FILESDIR}/${PN}-3.7.0-cmake-install-paths.patch"
-)
-
-LICENSE="MIT"
-SLOT="0/$(ver_cut 1-2)"
-
-COMMON_DEPEND="sys-process/numactl
-	dev-libs/elfutils:=
-	>=sys-devel/llvm-roc-${PV}"
-RDEPEND="${COMMON_DEPEND}"
-DEPEND="${COMMON_DEPEND}
-	>=dev-libs/roct-thunk-interface-${PV}
-	>=dev-libs/rocm-device-libs-${PV}"
-BDEPEND="app-editors/vim-core"
-	# vim-core is needed for "xxd"
-
-src_prepare() {
-	sed -e "s:get_version ( \"1.0.0\" ):get_version ( \"${PV}\" ):" -i CMakeLists.txt || die
-
-	# ... otherwise system llvm/clang is used ...
-	sed -e "s:find_package(Clang REQUIRED HINTS \${CMAKE_INSTALL_PREFIX}/llvm \${CMAKE_PREFIX_PATH}/llvm PATHS /opt/rocm/llvm ):find_package(Clang REQUIRED HINTS /usr/lib/llvm/roc ):" -i image/blit_src/CMakeLists.txt || die
-
-	# Gentoo installs "*.bc" to "/usr/lib" instead of a "[path]/bitcode" directory ...
-	sed -e "s:/opt/rocm/amdgcn/bitcode:/usr/lib/amdgcn/bitcode:" -i image/blit_src/CMakeLists.txt || die
-
-	cmake_src_prepare
-}

diff --git a/dev-libs/rocr-runtime/rocr-runtime-3.8.0.ebuild b/dev-libs/rocr-runtime/rocr-runtime-3.8.0.ebuild
deleted file mode 100644
index 4c5db671ec1a..000000000000
--- a/dev-libs/rocr-runtime/rocr-runtime-3.8.0.ebuild
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake
-
-if [[ ${PV} == *9999 ]] ; then
-	EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCR-Runtime/"
-	inherit git-r3
-	S="${WORKDIR}/${P}/src"
-else
-	SRC_URI="https://github.com/RadeonOpenCompute/ROCR-Runtime/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz"
-	S="${WORKDIR}/ROCR-Runtime-rocm-${PV}/src"
-	KEYWORDS="~amd64"
-fi
-
-DESCRIPTION="Radeon Open Compute Runtime"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCR-Runtime"
-PATCHES=(
-	"${FILESDIR}/${PN}-3.7.0-cmake-install-paths.patch"
-)
-
-LICENSE="MIT"
-SLOT="0/$(ver_cut 1-2)"
-
-COMMON_DEPEND="sys-process/numactl
-	dev-libs/elfutils:=
-	>=sys-devel/llvm-roc-${PV}"
-RDEPEND="${COMMON_DEPEND}"
-DEPEND="${COMMON_DEPEND}
-	>=dev-libs/roct-thunk-interface-${PV}
-	~dev-libs/rocm-device-libs-${PV}"
-BDEPEND="app-editors/vim-core"
-	# vim-core is needed for "xxd"
-
-src_prepare() {
-	sed -e "s:get_version ( \"1.0.0\" ):get_version ( \"${PV}\" ):" -i CMakeLists.txt || die
-
-	# ... otherwise system llvm/clang is used ...
-	sed -e "s:find_package(Clang REQUIRED HINTS \${CMAKE_INSTALL_PREFIX}/llvm \${CMAKE_PREFIX_PATH}/llvm PATHS /opt/rocm/llvm ):find_package(Clang REQUIRED HINTS /usr/lib/llvm/roc ):" -i image/blit_src/CMakeLists.txt || die
-
-	# Gentoo installs "*.bc" to "/usr/lib" instead of a "[path]/bitcode" directory ...
-	sed -e "s:/opt/rocm/amdgcn/bitcode:/usr/lib:" -i image/blit_src/CMakeLists.txt || die
-
-	cmake_src_prepare
-}

diff --git a/dev-libs/rocr-runtime/rocr-runtime-3.9.0.ebuild b/dev-libs/rocr-runtime/rocr-runtime-3.9.0.ebuild
deleted file mode 100644
index 256f7ffb9e4a..000000000000
--- a/dev-libs/rocr-runtime/rocr-runtime-3.9.0.ebuild
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake
-
-if [[ ${PV} == *9999 ]] ; then
-	EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCR-Runtime/"
-	inherit git-r3
-	S="${WORKDIR}/${P}/src"
-else
-	SRC_URI="https://github.com/RadeonOpenCompute/ROCR-Runtime/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz"
-	S="${WORKDIR}/ROCR-Runtime-rocm-${PV}/src"
-	KEYWORDS="~amd64"
-fi
-
-DESCRIPTION="Radeon Open Compute Runtime"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCR-Runtime"
-PATCHES=(
-	"${FILESDIR}/${PN}-3.7.0-cmake-install-paths.patch"
-)
-
-LICENSE="MIT"
-SLOT="0/$(ver_cut 1-2)"
-
-COMMON_DEPEND="sys-process/numactl
-	dev-libs/elfutils:=
-	>=sys-devel/llvm-roc-${PV}"
-RDEPEND="${COMMON_DEPEND}"
-DEPEND="${COMMON_DEPEND}
-	>=dev-libs/roct-thunk-interface-${PV}
-	>=dev-libs/rocm-device-libs-${PV}"
-BDEPEND="app-editors/vim-core"
-	# vim-core is needed for "xxd"
-
-src_prepare() {
-	sed -e "s:get_version ( \"1.0.0\" ):get_version ( \"${PV}\" ):" -i CMakeLists.txt || die
-
-	# ... otherwise system llvm/clang is used ...
-	sed -e "s:find_package(Clang REQUIRED HINTS \${CMAKE_INSTALL_PREFIX}/llvm \${CMAKE_PREFIX_PATH}/llvm PATHS /opt/rocm/llvm ):find_package(Clang REQUIRED HINTS /usr/lib/llvm/roc ):" -i image/blit_src/CMakeLists.txt || die
-
-	# Gentoo installs "*.bc" to "/usr/lib" instead of a "[path]/bitcode" directory ...
-	sed -e "s:/opt/rocm/amdgcn/bitcode:/usr/lib/amdgcn/bitcode:" -i image/blit_src/CMakeLists.txt || die
-
-	cmake_src_prepare
-}

diff --git a/dev-libs/rocr-runtime/rocr-runtime-4.0.0.ebuild b/dev-libs/rocr-runtime/rocr-runtime-4.0.0.ebuild
deleted file mode 100644
index 6326a7e4b20e..000000000000
--- a/dev-libs/rocr-runtime/rocr-runtime-4.0.0.ebuild
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake
-
-if [[ ${PV} == *9999 ]] ; then
-	EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCR-Runtime/"
-	inherit git-r3
-	S="${WORKDIR}/${P}/src"
-else
-	SRC_URI="https://github.com/RadeonOpenCompute/ROCR-Runtime/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz"
-	S="${WORKDIR}/ROCR-Runtime-rocm-${PV}/src"
-	KEYWORDS="~amd64"
-fi
-
-DESCRIPTION="Radeon Open Compute Runtime"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCR-Runtime"
-PATCHES=(
-	"${FILESDIR}/${PN}-3.7.0-cmake-install-paths.patch"
-)
-
-LICENSE="MIT"
-SLOT="0/$(ver_cut 1-2)"
-
-COMMON_DEPEND="sys-process/numactl
-	dev-libs/elfutils:=
-	>=sys-devel/llvm-roc-${PV}"
-RDEPEND="${COMMON_DEPEND}"
-DEPEND="${COMMON_DEPEND}
-	>=dev-libs/roct-thunk-interface-${PV}
-	>=dev-libs/rocm-device-libs-${PV}"
-BDEPEND="app-editors/vim-core"
-	# vim-core is needed for "xxd"
-
-src_prepare() {
-	sed -e "s:get_version ( \"1.0.0\" ):get_version ( \"${PV}\" ):" -i CMakeLists.txt || die
-
-	# ... otherwise system llvm/clang is used ...
-	sed -e "s:find_package(Clang REQUIRED HINTS \${CMAKE_INSTALL_PREFIX}/llvm \${CMAKE_PREFIX_PATH}/llvm PATHS /opt/rocm/llvm ):find_package(Clang REQUIRED HINTS ${EPREFIX}/usr/lib/llvm/roc ):" -i image/blit_src/CMakeLists.txt || die
-
-	# Gentoo installs "*.bc" to "/usr/lib" instead of a "[path]/bitcode" directory ...
-	sed -e "s:/opt/rocm/amdgcn/bitcode:${EPREFIX}/usr/lib/amdgcn/bitcode:" -i image/blit_src/CMakeLists.txt || die
-
-	cmake_src_prepare
-}

diff --git a/dev-libs/rocr-runtime/rocr-runtime-4.1.0.ebuild b/dev-libs/rocr-runtime/rocr-runtime-4.1.0.ebuild
deleted file mode 100644
index e91c230b519a..000000000000
--- a/dev-libs/rocr-runtime/rocr-runtime-4.1.0.ebuild
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake
-
-if [[ ${PV} == *9999 ]] ; then
-	EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCR-Runtime/"
-	inherit git-r3
-	S="${WORKDIR}/${P}/src"
-else
-	SRC_URI="https://github.com/RadeonOpenCompute/ROCR-Runtime/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz"
-	S="${WORKDIR}/ROCR-Runtime-rocm-${PV}/src"
-	KEYWORDS="~amd64"
-fi
-
-DESCRIPTION="Radeon Open Compute Runtime"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCR-Runtime"
-PATCHES=(
-	"${FILESDIR}/${PN}-4.1.0-cmake-install-paths.patch"
-)
-
-LICENSE="MIT"
-SLOT="0/$(ver_cut 1-2)"
-IUSE="debug"
-
-COMMON_DEPEND="sys-process/numactl
-	dev-libs/elfutils:=
-	>=sys-devel/llvm-roc-${PV}"
-RDEPEND="${COMMON_DEPEND}"
-DEPEND="${COMMON_DEPEND}
-	>=dev-libs/roct-thunk-interface-${PV}
-	>=dev-libs/rocm-device-libs-${PV}"
-BDEPEND="app-editors/vim-core"
-	# vim-core is needed for "xxd"
-
-src_prepare() {
-	sed -e "s:get_version ( \"1.0.0\" ):get_version ( \"${PV}\" ):" -i CMakeLists.txt || die
-
-	# ... otherwise system llvm/clang is used ...
-	sed -e "s:find_package(Clang REQUIRED HINTS \${CMAKE_INSTALL_PREFIX}/llvm \${CMAKE_PREFIX_PATH}/llvm PATHS /opt/rocm/llvm ):find_package(Clang REQUIRED HINTS ${EPREFIX}/usr/lib/llvm/roc ):" -i image/blit_src/CMakeLists.txt || die
-
-	# Gentoo installs "*.bc" to "/usr/lib" instead of a "[path]/bitcode" directory ...
-	sed -e "s:/opt/rocm/amdgcn/bitcode:${EPREFIX}/usr/lib/amdgcn/bitcode:" -i image/blit_src/CMakeLists.txt || die
-
-	cmake_src_prepare
-}
-
-src_configure() {
-	use debug || local mycmakeargs=(-DCMAKE_CXX_FLAGS='-DNDEBUG')
-	cmake_src_configure
-}

diff --git a/dev-libs/rocr-runtime/rocr-runtime-4.2.0.ebuild b/dev-libs/rocr-runtime/rocr-runtime-4.2.0.ebuild
deleted file mode 100644
index c9bc5602a203..000000000000
--- a/dev-libs/rocr-runtime/rocr-runtime-4.2.0.ebuild
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake
-
-if [[ ${PV} == *9999 ]] ; then
-	EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCR-Runtime/"
-	inherit git-r3
-	S="${WORKDIR}/${P}/src"
-else
-	SRC_URI="https://github.com/RadeonOpenCompute/ROCR-Runtime/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz"
-	S="${WORKDIR}/ROCR-Runtime-rocm-${PV}/src"
-	KEYWORDS="~amd64"
-fi
-
-DESCRIPTION="Radeon Open Compute Runtime"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCR-Runtime"
-PATCHES=(
-	"${FILESDIR}/${PN}-4.1.0-cmake-install-paths.patch"
-)
-
-LICENSE="MIT"
-SLOT="0/$(ver_cut 1-2)"
-
-COMMON_DEPEND="sys-process/numactl
-	dev-libs/elfutils:="
-RDEPEND="${COMMON_DEPEND}"
-DEPEND="${COMMON_DEPEND}
-	>=dev-libs/roct-thunk-interface-${PV}
-	>=dev-libs/rocm-device-libs-${PV}"
-BDEPEND="app-editors/vim-core"
-	# vim-core is needed for "xxd"
-
-src_prepare() {
-	sed -e "s:get_version ( \"1.0.0\" ):get_version ( \"${PV}\" ):" -i CMakeLists.txt || die
-
-	# ... otherwise system llvm/clang is used ...
-	sed -e "s:find_package(Clang REQUIRED HINTS \${CMAKE_INSTALL_PREFIX}/llvm \${CMAKE_PREFIX_PATH}/llvm PATHS /opt/rocm/llvm ):find_package(Clang REQUIRED HINTS ${EPREFIX}/usr/lib/llvm/roc ):" -i image/blit_src/CMakeLists.txt || die
-
-	# Gentoo installs "*.bc" to "/usr/lib" instead of a "[path]/bitcode" directory ...
-	sed -e "s:/opt/rocm/amdgcn/bitcode:${EPREFIX}/usr/lib/amdgcn/bitcode:" -i image/blit_src/CMakeLists.txt || die
-
-	cmake_src_prepare
-}

diff --git a/dev-libs/rocr-runtime/rocr-runtime-4.3.0.ebuild b/dev-libs/rocr-runtime/rocr-runtime-4.3.0.ebuild
deleted file mode 100644
index fc1b4b73bd0a..000000000000
--- a/dev-libs/rocr-runtime/rocr-runtime-4.3.0.ebuild
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake
-
-if [[ ${PV} == *9999 ]] ; then
-	EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCR-Runtime/"
-	inherit git-r3
-	S="${WORKDIR}/${P}/src"
-else
-	SRC_URI="https://github.com/RadeonOpenCompute/ROCR-Runtime/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz"
-	S="${WORKDIR}/ROCR-Runtime-rocm-${PV}/src"
-	KEYWORDS="~amd64"
-fi
-
-DESCRIPTION="Radeon Open Compute Runtime"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCR-Runtime"
-PATCHES=(
-	"${FILESDIR}/${PN}-4.1.0-cmake-install-paths.patch"
-	"${FILESDIR}/${PN}-4.3.0_no-aqlprofiler.patch"
-)
-
-LICENSE="MIT"
-SLOT="0/$(ver_cut 1-2)"
-
-COMMON_DEPEND="sys-process/numactl
-	dev-libs/elfutils:="
-RDEPEND="${COMMON_DEPEND}"
-DEPEND="${COMMON_DEPEND}
-	>=dev-libs/roct-thunk-interface-${PV}
-	>=dev-libs/rocm-device-libs-${PV}"
-BDEPEND="app-editors/vim-core"
-	# vim-core is needed for "xxd"
-
-src_prepare() {
-	# ... otherwise system llvm/clang is used ...
-	sed -e "s:find_package(Clang REQUIRED HINTS \${CMAKE_INSTALL_PREFIX}/llvm \${CMAKE_PREFIX_PATH}/llvm PATHS /opt/rocm/llvm ):find_package(Clang REQUIRED HINTS ${EPREFIX}/usr/lib/llvm/roc ):" -i image/blit_src/CMakeLists.txt || die
-
-	# Gentoo installs "*.bc" to "/usr/lib" instead of a "[path]/bitcode" directory ...
-	sed -e "s:/opt/rocm/amdgcn/bitcode:${EPREFIX}/usr/lib/amdgcn/bitcode:" -i image/blit_src/CMakeLists.txt || die
-
-	cmake_src_prepare
-}

diff --git a/dev-libs/rocr-runtime/rocr-runtime-4.5.2.ebuild b/dev-libs/rocr-runtime/rocr-runtime-4.5.2.ebuild
deleted file mode 100644
index d5c28fbc1b76..000000000000
--- a/dev-libs/rocr-runtime/rocr-runtime-4.5.2.ebuild
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake
-
-if [[ ${PV} == *9999 ]] ; then
-	EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCR-Runtime/"
-	inherit git-r3
-	S="${WORKDIR}/${P}/src"
-else
-	SRC_URI="https://github.com/RadeonOpenCompute/ROCR-Runtime/archive/rocm-${PV}.tar.gz -> ${P}.tar.gz"
-	S="${WORKDIR}/ROCR-Runtime-rocm-${PV}/src"
-	KEYWORDS="~amd64"
-fi
-
-DESCRIPTION="Radeon Open Compute Runtime"
-HOMEPAGE="https://github.com/RadeonOpenCompute/ROCR-Runtime"
-PATCHES=(
-	"${FILESDIR}/${PN}-4.5.2-cmake-install-paths.patch"
-)
-
-LICENSE="MIT"
-SLOT="0/$(ver_cut 1-2)"
-
-COMMON_DEPEND="dev-libs/elfutils"
-RDEPEND="${COMMON_DEPEND}"
-DEPEND="${COMMON_DEPEND}
-	>=dev-libs/roct-thunk-interface-${PV}
-	>=dev-libs/rocm-device-libs-${PV}"
-BDEPEND="app-editors/vim-core"
-	# vim-core is needed for "xxd"
-
-CMAKE_BUILD_TYPE=Release
-
-src_prepare() {
-	# ... otherwise system llvm/clang is used ...
-	sed -e "s:find_package(Clang REQUIRED HINTS \${CMAKE_INSTALL_PREFIX}/llvm \${CMAKE_PREFIX_PATH}/llvm PATHS /opt/rocm/llvm ):find_package(Clang REQUIRED HINTS ${EPREFIX}/usr/lib/llvm/roc ):" -i image/blit_src/CMakeLists.txt || die
-
-	# Gentoo installs "*.bc" to "/usr/lib" instead of a "[path]/bitcode" directory ...
-	sed -e "s:/opt/rocm/amdgcn/bitcode:${EPREFIX}/usr/lib/amdgcn/bitcode:" -i image/blit_src/CMakeLists.txt || die
-
-	cmake_src_prepare
-}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocr-runtime/files/, dev-libs/rocr-runtime/
@ 2024-03-08 19:22 Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2024-03-08 19:22 UTC (permalink / raw
  To: gentoo-commits

commit:     3748b8bb7dae574634a74d7144a4d50be62dc4e3
Author:     Sv. Lockal <lockalsash <AT> gmail <DOT> com>
AuthorDate: Fri Oct 20 22:01:19 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Mar  8 19:21:55 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3748b8bb

dev-libs/rocr-runtime: add extend-isa-compatibility-check patch

Signed-off-by: Sv. Lockal <lockalsash <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...time-5.7.1-extend-isa-compatibility-check.patch | 73 ++++++++++++++++++++++
 dev-libs/rocr-runtime/rocr-runtime-5.7.1-r1.ebuild |  1 +
 2 files changed, 74 insertions(+)

diff --git a/dev-libs/rocr-runtime/files/rocr-runtime-5.7.1-extend-isa-compatibility-check.patch b/dev-libs/rocr-runtime/files/rocr-runtime-5.7.1-extend-isa-compatibility-check.patch
new file mode 100644
index 000000000000..b12352e40c92
--- /dev/null
+++ b/dev-libs/rocr-runtime/files/rocr-runtime-5.7.1-extend-isa-compatibility-check.patch
@@ -0,0 +1,73 @@
+Combined with matching changes within hip ebuild, this patch allows
+to load compatible kernels whenever possible.
+For example if AMDGPU_TARGETS is set to gfx1030 and some application
+was started on gfx1036, it loads gfx1030 kernel.
+
+Author: Cordell Bloor <cgmb@slerp.xyz>
+https://salsa.debian.org/rocm-team/rocr-runtime/-/blob/master/debian/patches/0004-extend-isa-compatibility-check.patch
+--- src/core/runtime/isa.cpp
++++ src/core/runtime/isa.cpp
+@@ -43,6 +43,7 @@
+ #include "core/inc/isa.h"
+ 
+ #include <algorithm>
++#include <array>
+ #include <cstring>
+ #include <iostream>
+ #include <sstream>
+@@ -69,13 +70,53 @@ bool Wavefront::GetInfo(
+   }
+ }
+ 
++template <class T, std::size_t N>
++static bool Contains(const std::array<T, N>& arr, const T& value) {
++  return std::find(std::begin(arr), std::end(arr), value) != std::end(arr);
++}
++
++static bool IsVersionCompatible(const Isa &code_object_isa,
++                                const Isa &agent_isa) {
++  if (code_object_isa.GetMajorVersion() == agent_isa.GetMajorVersion() &&
++      code_object_isa.GetMinorVersion() == agent_isa.GetMinorVersion()) {
++
++      if (code_object_isa.GetStepping() == agent_isa.GetStepping()) {
++        return true; // exact match
++      }
++
++      // the processor and code object may sometimes be compatible if
++      // they differ only by stepping version
++      if (code_object_isa.GetMajorVersion() == 9 &&
++          code_object_isa.GetMinorVersion() == 0) {
++        const std::array<int32_t, 4> gfx900_equivalent = { 0, 2, 9, 12 };
++        const std::array<int32_t, 5> gfx900_superset = { 0, 2, 6, 9, 12 };
++        if (Contains(gfx900_equivalent, code_object_isa.GetStepping()) &&
++            Contains(gfx900_superset, agent_isa.GetStepping())) {
++          return true; // gfx900 compatible
++        }
++      } else if (code_object_isa.GetMajorVersion() == 10) {
++        if (code_object_isa.GetMinorVersion() == 1) {
++          const std::array<int32_t, 2> gfx1010_equivalent = { 0, 2 };
++          const std::array<int32_t, 4> gfx1010_superset = { 0, 1, 2, 3 };
++          if (Contains(gfx1010_equivalent, code_object_isa.GetStepping()) &&
++              Contains(gfx1010_superset, agent_isa.GetStepping())) {
++            return true; // gfx1010 compatible
++          }
++        } else if (code_object_isa.GetMinorVersion() == 3) {
++          return true; // gfx1030 compatible
++        }
++      }
++    }
++
++  return false;
++}
++
+ /* static */
+ bool Isa::IsCompatible(const Isa &code_object_isa,
+                        const Isa &agent_isa) {
+-  if (code_object_isa.GetVersion() != agent_isa.GetVersion())
++  if (!IsVersionCompatible(code_object_isa, agent_isa))
+     return false;
+ 
+-  assert(code_object_isa.IsSrameccSupported() == agent_isa.IsSrameccSupported()  && agent_isa.GetSramecc() != IsaFeature::Any);
+   if ((code_object_isa.GetSramecc() == IsaFeature::Enabled ||
+         code_object_isa.GetSramecc() == IsaFeature::Disabled) &&
+       code_object_isa.GetSramecc() != agent_isa.GetSramecc())

diff --git a/dev-libs/rocr-runtime/rocr-runtime-5.7.1-r1.ebuild b/dev-libs/rocr-runtime/rocr-runtime-5.7.1-r1.ebuild
index 840a1949b160..7cac2db83745 100644
--- a/dev-libs/rocr-runtime/rocr-runtime-5.7.1-r1.ebuild
+++ b/dev-libs/rocr-runtime/rocr-runtime-5.7.1-r1.ebuild
@@ -21,6 +21,7 @@ DESCRIPTION="Radeon Open Compute Runtime"
 HOMEPAGE="https://github.com/RadeonOpenCompute/ROCR-Runtime"
 PATCHES=(
 	"${FILESDIR}/${PN}-4.3.0_no-aqlprofiler.patch"
+	"${FILESDIR}/${PN}-5.7.1-extend-isa-compatibility-check.patch"
 )
 
 LICENSE="MIT"


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocr-runtime/files/, dev-libs/rocr-runtime/
@ 2024-03-10  2:16 Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2024-03-10  2:16 UTC (permalink / raw
  To: gentoo-commits

commit:     9e7cda93ca888ceabe7c14bf3ddb961c36fdc049
Author:     Sv. Lockal <lockalsash <AT> gmail <DOT> com>
AuthorDate: Sat Mar  9 14:49:32 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Mar 10 02:16:14 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e7cda93

dev-libs/rocr-runtime: fix compilation with musl for 5.7.1 and 6.0.0

Upstream bug: https://github.com/ROCm/ROCR-Runtime/issues/181
Closes: https://bugs.gentoo.org/921322
Signed-off-by: Sv. Lockal <lockalsash <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/rocr-runtime-5.7.1-musl.patch            | 106 +++++++++++++++++++++
 ....7.1-r1.ebuild => rocr-runtime-5.7.1-r2.ebuild} |   9 +-
 ...e-6.0.0.ebuild => rocr-runtime-6.0.0-r1.ebuild} |   7 +-
 3 files changed, 115 insertions(+), 7 deletions(-)

diff --git a/dev-libs/rocr-runtime/files/rocr-runtime-5.7.1-musl.patch b/dev-libs/rocr-runtime/files/rocr-runtime-5.7.1-musl.patch
new file mode 100644
index 000000000000..0e8e53209738
--- /dev/null
+++ b/dev-libs/rocr-runtime/files/rocr-runtime-5.7.1-musl.patch
@@ -0,0 +1,106 @@
+Fix compilation with musl.
+
+Bug: https://github.com/ROCm/ROCR-Runtime/issues/181
+--- a/core/inc/checked.h
++++ b/core/inc/checked.h
+@@ -58,7 +58,7 @@ template <uint64_t code, bool multiProcess = false> class Check final {
+   Check(const Check&) { object_ = uintptr_t(this) ^ uintptr_t(code); }
+   Check(Check&&) { object_ = uintptr_t(this) ^ uintptr_t(code); }
+ 
+-  ~Check() { object_ = NULL; }
++  ~Check() { object_ = uintptr_t(NULL); }
+ 
+   const Check& operator=(Check&& rhs) { return *this; }
+   const Check& operator=(const Check& rhs) { return *this; }
+--- a/core/runtime/default_signal.cpp
++++ b/core/runtime/default_signal.cpp
+@@ -57,7 +57,7 @@ int BusyWaitSignal::rtti_id_ = 0;
+ BusyWaitSignal::BusyWaitSignal(SharedSignal* abi_block, bool enableIPC)
+     : Signal(abi_block, enableIPC) {
+   signal_.kind = AMD_SIGNAL_KIND_USER;
+-  signal_.event_mailbox_ptr = NULL;
++  signal_.event_mailbox_ptr = uint64_t(NULL);
+ }
+ 
+ hsa_signal_value_t BusyWaitSignal::LoadRelaxed() {
+--- a/core/util/lnx/os_linux.cpp
++++ b/core/util/lnx/os_linux.cpp
+@@ -111,9 +111,12 @@ class os_thread {
+       }
+     }
+ 
++    int cores = 0;
++    cpu_set_t* cpuset = nullptr;
++
+     if (core::Runtime::runtime_singleton_->flag().override_cpu_affinity()) {
+-      int cores = get_nprocs_conf();
+-      cpu_set_t* cpuset = CPU_ALLOC(cores);
++      cores = get_nprocs_conf();
++      cpuset = CPU_ALLOC(cores);
+       if (cpuset == nullptr) {
+         fprintf(stderr, "CPU_ALLOC failed: %s\n", strerror(errno));
+         return;
+@@ -122,12 +125,6 @@ class os_thread {
+       for (int i = 0; i < cores; i++) {
+         CPU_SET(i, cpuset);
+       }
+-      err = pthread_attr_setaffinity_np(&attrib, CPU_ALLOC_SIZE(cores), cpuset);
+-      CPU_FREE(cpuset);
+-      if (err != 0) {
+-        fprintf(stderr, "pthread_attr_setaffinity_np failed: %s\n", strerror(err));
+-        return;
+-      }
+     }
+ 
+     err = pthread_create(&thread, &attrib, ThreadTrampoline, args.get());
+@@ -157,6 +154,14 @@ class os_thread {
+     if (err != 0) {
+       fprintf(stderr, "pthread_attr_destroy failed: %s\n", strerror(err));
+     }
++
++    if (thread && cores && cpuset) {
++      err = pthread_setaffinity_np(thread, CPU_ALLOC_SIZE(cores), cpuset);
++      CPU_FREE(cpuset);
++      if (err != 0) {
++        fprintf(stderr, "pthread_setaffinity_np failed: %s\n", strerror(err));
++      }
++    }
+   }
+ 
+   os_thread(os_thread&& rhs) {
+@@ -617,11 +622,13 @@ SharedMutex CreateSharedMutex() {
+     fprintf(stderr, "rw lock attribute init failed: %s\n", strerror(err));
+     return nullptr;
+   }
++#if defined(__GLIBC__)
+   err = pthread_rwlockattr_setkind_np(&attrib, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP);
+   if (err != 0) {
+     fprintf(stderr, "Set rw lock attribute failure: %s\n", strerror(err));
+     return nullptr;
+   }
++#endif
+ 
+   pthread_rwlock_t* lock = new pthread_rwlock_t;
+   err = pthread_rwlock_init(lock, &attrib);
+--- a/core/util/utils.h
++++ b/core/util/utils.h
+@@ -74,7 +74,7 @@ static __forceinline void* _aligned_malloc(size_t size, size_t alignment) {
+   return aligned_alloc(alignment, size);
+ #else
+   void *mem = NULL;
+-  if (NULL != posix_memalign(&mem, alignment, size))
++  if (0 != posix_memalign(&mem, alignment, size))
+     return NULL;
+   return mem;
+ #endif
+--- a/image/util.h
++++ b/image/util.h
+@@ -95,7 +95,7 @@ static __forceinline void* _aligned_malloc(size_t size, size_t alignment) {
+   return aligned_alloc(alignment, size);
+ #else
+   void* mem = NULL;
+-  if (NULL != posix_memalign(&mem, alignment, size)) return NULL;
++  if (0 != posix_memalign(&mem, alignment, size)) return NULL;
+   return mem;
+ #endif
+ }

diff --git a/dev-libs/rocr-runtime/rocr-runtime-5.7.1-r1.ebuild b/dev-libs/rocr-runtime/rocr-runtime-5.7.1-r2.ebuild
similarity index 94%
rename from dev-libs/rocr-runtime/rocr-runtime-5.7.1-r1.ebuild
rename to dev-libs/rocr-runtime/rocr-runtime-5.7.1-r2.ebuild
index 564da67950fa..00615488c2d2 100644
--- a/dev-libs/rocr-runtime/rocr-runtime-5.7.1-r1.ebuild
+++ b/dev-libs/rocr-runtime/rocr-runtime-5.7.1-r2.ebuild
@@ -3,10 +3,10 @@
 
 EAPI=8
 
-inherit cmake flag-o-matic llvm
-
 LLVM_MAX_SLOT=17
 
+inherit cmake flag-o-matic llvm
+
 if [[ ${PV} == *9999 ]] ; then
 	EGIT_REPO_URI="https://github.com/RadeonOpenCompute/ROCR-Runtime/"
 	inherit git-r3
@@ -22,6 +22,7 @@ HOMEPAGE="https://github.com/RadeonOpenCompute/ROCR-Runtime"
 PATCHES=(
 	"${FILESDIR}/${PN}-4.3.0_no-aqlprofiler.patch"
 	"${FILESDIR}/${PN}-5.7.1-extend-isa-compatibility-check.patch"
+	"${FILESDIR}/${PN}-5.7.1-musl.patch"
 )
 
 LICENSE="MIT"
@@ -33,8 +34,8 @@ COMMON_DEPEND="dev-libs/elfutils
 DEPEND="${COMMON_DEPEND}
 	>=dev-libs/roct-thunk-interface-${PV}
 	>=dev-libs/rocm-device-libs-${PV}
-	sys-devel/clang
-	sys-devel/lld"
+	sys-devel/clang:${LLVM_MAX_SLOT}=
+	sys-devel/lld:${LLVM_MAX_SLOT}="
 RDEPEND="${DEPEND}"
 BDEPEND="app-editors/vim-core"
 	# vim-core is needed for "xxd"

diff --git a/dev-libs/rocr-runtime/rocr-runtime-6.0.0.ebuild b/dev-libs/rocr-runtime/rocr-runtime-6.0.0-r1.ebuild
similarity index 92%
rename from dev-libs/rocr-runtime/rocr-runtime-6.0.0.ebuild
rename to dev-libs/rocr-runtime/rocr-runtime-6.0.0-r1.ebuild
index 840a1949b160..cdd27fbbbefd 100644
--- a/dev-libs/rocr-runtime/rocr-runtime-6.0.0.ebuild
+++ b/dev-libs/rocr-runtime/rocr-runtime-6.0.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -21,6 +21,7 @@ DESCRIPTION="Radeon Open Compute Runtime"
 HOMEPAGE="https://github.com/RadeonOpenCompute/ROCR-Runtime"
 PATCHES=(
 	"${FILESDIR}/${PN}-4.3.0_no-aqlprofiler.patch"
+	"${FILESDIR}/${PN}-5.7.1-musl.patch"
 )
 
 LICENSE="MIT"
@@ -32,8 +33,8 @@ COMMON_DEPEND="dev-libs/elfutils
 DEPEND="${COMMON_DEPEND}
 	>=dev-libs/roct-thunk-interface-${PV}
 	>=dev-libs/rocm-device-libs-${PV}
-	sys-devel/clang
-	sys-devel/lld"
+	sys-devel/clang:${LLVM_MAX_SLOT}=
+	sys-devel/lld:${LLVM_MAX_SLOT}="
 RDEPEND="${DEPEND}"
 BDEPEND="app-editors/vim-core"
 	# vim-core is needed for "xxd"


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-03-10  2:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-22 17:49 [gentoo-commits] repo/gentoo:master commit in: dev-libs/rocr-runtime/files/, dev-libs/rocr-runtime/ Craig Andrews
  -- strict thread matches above, loose matches on Subject: below --
2024-03-10  2:16 Sam James
2024-03-08 19:22 Sam James
2022-12-19 14:00 Andreas Sturmlechner
2022-02-11 16:12 Joonas Niilola
2022-02-06 14:48 Benda XU
2021-03-28 21:20 Craig Andrews
2019-10-03 15:54 Craig Andrews

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox