summaryrefslogtreecommitdiff
path: root/dev-libs/roct-thunk-interface
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/roct-thunk-interface')
-rw-r--r--dev-libs/roct-thunk-interface/Manifest5
-rw-r--r--dev-libs/roct-thunk-interface/files/roct-thunk-interface-5.7.1-musl.patch61
-rw-r--r--dev-libs/roct-thunk-interface/roct-thunk-interface-5.7.1-r1.ebuild (renamed from dev-libs/roct-thunk-interface/roct-thunk-interface-5.7.1.ebuild)7
-rw-r--r--dev-libs/roct-thunk-interface/roct-thunk-interface-6.0.0-r1.ebuild (renamed from dev-libs/roct-thunk-interface/roct-thunk-interface-6.0.0.ebuild)7
4 files changed, 74 insertions, 6 deletions
diff --git a/dev-libs/roct-thunk-interface/Manifest b/dev-libs/roct-thunk-interface/Manifest
index f2268c47f4de..644cf92014b1 100644
--- a/dev-libs/roct-thunk-interface/Manifest
+++ b/dev-libs/roct-thunk-interface/Manifest
@@ -1,4 +1,5 @@
AUX roct-thunk-interface-5.7.0-functions.patch 335 BLAKE2B 590ee1b8f412836c9fae0e10d7acd91842f6dd9aa87dd40a7a8ea48596dc2a1aabf2dea69cc2924fa0b4467d8238bde42c58ac95415fc0324133ea4389f413a8 SHA512 a1961fb2d0636bdb1720abdf433ef4d0f5f69f48784efc45ed77dc8cdd7bc2433dc9aaec0ef9105db12e4d6a8a57d50ee1ffa7b0d42990be1d88ff668f7b15ba
+AUX roct-thunk-interface-5.7.1-musl.patch 1878 BLAKE2B c2103b5b8d76e3a637b79bb701308d7c1b2f6def76206e5a1e3841c12e92bec19a6e9a596238709ee4413072530dd984f7910be6bfc394622b34a93ad5cf1c9e SHA512 b5da199e15eb01a087bbc3600a7df5971029594a778ebfc71185320a662f0681a65fd55ad71ba3089e6a72745dfa1de5f637cb96fe8ab3510869e9fb272f5819
AUX roct-thunk-interface-6.0.0-functions.patch 309 BLAKE2B 98644ddc99416d99da0c671e4b70607cb360831fd0f2a64f38e6f2f2c008d9c6b2fa24a1ac525cbbbdffabf918eaf84ce0c10db7a383e05ac30f6e999c6913f4 SHA512 136b42cac9dfb209594b6b88c4abd501e98d48dca1bd573443e414ab7098cfcac3789cecb3b625e8ed91d0d15fe1ef13668bf4da9f89d808838de9d348eba99f
DIST roct-thunk-interface-5.1.3.tar.gz 3178689 BLAKE2B c46af7bc60772beaa9a214a86a634290cfd7952589f70736c0c2544c0459eb4fdcc65030d897dbb67bfbaae545f529ac647397df3fcfeddeb5d5e05a283cfd6b SHA512 746a04e667ce242160d6e2519594fc93b205520dae28678859fbd40c3c641082aa6219c04c8e2b58289763a5244dd6336b56c2e2016ba671c5e5a6fb9ca5caea
DIST roct-thunk-interface-5.3.3.tar.gz 646773 BLAKE2B 48632cad576ceccede0ee62663f226cbedba8374d8962028fd729a7b8e7eb75bebcb2f8ce06a838de15a388caea3d6dcb150db80f8d45a91675997b4f80625e6 SHA512 4a8730d16a0d240a43d5e22092325b0731d133733af0aac6c6893763d1ffb1a04a0c045d988835079581e097fc7c9e383f41ba84daa105c032d3a653b6b2c6b0
@@ -10,6 +11,6 @@ EBUILD roct-thunk-interface-5.1.3.ebuild 1107 BLAKE2B c8d1aad9be55420235043628ca
EBUILD roct-thunk-interface-5.3.3.ebuild 1107 BLAKE2B c8d1aad9be55420235043628caa570cfa5f9164c6a3d20c7d90a6cac385ad2c886c44a89f2d9181742f9c284067b0d0b078fb2ea04e44ac9f1a145505f4b9971 SHA512 08bce5619f4e5e163b23928c0088e7f022d0f9f95bfba4b4e237a74ade30a327bf3cf954590f9d788ab7a16dd4f90ff53bd3e87011866af1d68a200bbeeceb7f
EBUILD roct-thunk-interface-5.4.3.ebuild 1107 BLAKE2B c5523fd9ba5475faf5b8bb4ea35a100f4049a8b008c3dec048e03b8e14b394f28b8b5515f7b93c94774c75304e2df7ef745e9538eae5309c6faa569748d32551 SHA512 dfc0e032b61667c9171900f36bc7f18df0e67635e8988d91a8041c298053d9c977adf123af2326e7986bbe00f45ea3ec3e3630ff0993279cfd7becbb5492fc36
EBUILD roct-thunk-interface-5.5.1.ebuild 1107 BLAKE2B c5523fd9ba5475faf5b8bb4ea35a100f4049a8b008c3dec048e03b8e14b394f28b8b5515f7b93c94774c75304e2df7ef745e9538eae5309c6faa569748d32551 SHA512 dfc0e032b61667c9171900f36bc7f18df0e67635e8988d91a8041c298053d9c977adf123af2326e7986bbe00f45ea3ec3e3630ff0993279cfd7becbb5492fc36
-EBUILD roct-thunk-interface-5.7.1.ebuild 1162 BLAKE2B 005cd43b3e27666b19ccddc5269f0e31c79a41d476a0271ce8ee8d4f56931b2e29575781dcae35f7a3bdc277e802352ef23e08f0a173bf25947239c180e9d393 SHA512 6185e2552807d4ac4241f3b6a150e8d2167df395bc56516347e1c6ea4d7244d89b5fef7e6f34ae9bee3017fd8cd899133c0d96f4d413c6d9173bf329eadffdee
-EBUILD roct-thunk-interface-6.0.0.ebuild 1162 BLAKE2B 0cf0fd4fc62e7f261c8a8c4670ca4772bae1266d5d54f03df793ee590759d017cf545911ad926e7a4bf54756bcee6248e53a5c0d2dab88e0639fae1c92734bcb SHA512 487d51b986181ef04d1e007546afb936b6dea78acf3a46a3fb77f001b9d12982941bf74935c5cad4f2db7a344db64cdafebf40ae77dbc5bdf3c2037052a14fb8
+EBUILD roct-thunk-interface-5.7.1-r1.ebuild 1201 BLAKE2B 6170ec14b2be3b309b7a95a0103341d55de32c2ef634a3cf84b31370b6675438978adb87eb71ca6e0e886b4ae7f87c5c8898509fdcd4a1d374ef9f91d258af08 SHA512 babbe1248eba4206f81db3a99e983eae1d540691e36a0f1595a9ce17398aea7fa9c15ec564dbb0abf48e2e58ec47155f62ca77af80afd07ce16ede394c489097
+EBUILD roct-thunk-interface-6.0.0-r1.ebuild 1201 BLAKE2B 97007918218c6b07e9cf7b077250e32694c068618cabf8f5dc672a66e35b6e1480ee6ebda1c67c5576a5f0005be52d828d8c6ab02116be98997606bc47b6878a SHA512 676cdd9fadff9c74568d1b841c2819d483089d4ed82aa9ce0cde55b61ca7ab8ea164b6ef6ac27655e38697ae5361357b18d430dbf53687c3ffecf0484db61867
MISC metadata.xml 674 BLAKE2B ceb6cc04ddd9f957a765c89bfe83de382412c5d04bce87e3fa9c0fdfe72fa2d24e597aa47287488463fa34d85a91556d2b7ea073b19c341a48045c9e7f51f9f3 SHA512 8cb0feb4d6ea9d3de4a45a9be0de498b5ebb36a779af03e58f5c04593082e5bd618614c1daf2707f3bb1de019bf88292605669e2be48d9bede6e708c39aae7e2
diff --git a/dev-libs/roct-thunk-interface/files/roct-thunk-interface-5.7.1-musl.patch b/dev-libs/roct-thunk-interface/files/roct-thunk-interface-5.7.1-musl.patch
new file mode 100644
index 000000000000..8cd8a5ff2ee1
--- /dev/null
+++ b/dev-libs/roct-thunk-interface/files/roct-thunk-interface-5.7.1-musl.patch
@@ -0,0 +1,61 @@
+Upstream PR: https://github.com/ROCm/ROCT-Thunk-Interface/pull/96
+Bug: https://github.com/ROCm/ROCT-Thunk-Interface/issues/65
+--- a/src/globals.c
++++ b/src/globals.c
+@@ -32,5 +32,9 @@ unsigned long kfd_open_count;
+ unsigned long system_properties_count;
+ pthread_mutex_t hsakmt_mutex = PTHREAD_MUTEX_INITIALIZER;
+ bool is_dgpu;
++
++#ifndef PAGE_SIZE
+ int PAGE_SIZE;
++#endif
++
+ int PAGE_SHIFT;
+--- a/src/libhsakmt.h
++++ b/src/libhsakmt.h
+@@ -62,7 +62,11 @@ extern HsaVersionInfo kfd_version_info;
+ do { if ((minor) > kfd_version_info.KernelInterfaceMinorVersion)\
+ return HSAKMT_STATUS_NOT_SUPPORTED; } while (0)
+
++/* Might be defined in limits.h on platforms where it is constant (used by musl) */
++/* See also: https://pubs.opengroup.org/onlinepubs/7908799/xsh/limits.h.html */
++#ifndef PAGE_SIZE
+ extern int PAGE_SIZE;
++#endif
+ extern int PAGE_SHIFT;
+
+ /* VI HW bug requires this virtual address alignment */
+--- a/src/openclose.c
++++ b/src/openclose.c
+@@ -116,7 +116,9 @@ static void clear_after_fork(void)
+
+ static inline void init_page_size(void)
+ {
++#ifndef PAGE_SIZE
+ PAGE_SIZE = sysconf(_SC_PAGESIZE);
++#endif
+ PAGE_SHIFT = ffs(PAGE_SIZE) - 1;
+ }
+
+--- a/src/topology.c
++++ b/src/topology.c
+@@ -32,6 +32,7 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <ctype.h>
++#include <limits.h>
+
+ #include <errno.h>
+ #include <sys/sysinfo.h>
+@@ -1369,6 +1370,10 @@ static int topology_create_temp_cpu_cache_list(int node,
+ * which can be present twice in the string above. 29 is for the prefix
+ * and the +6 is for the cache suffix
+ */
++#ifndef MAXNAMLEN
++/* MAXNAMLEN is the BSD name for NAME_MAX. glibc aliases this as NAME_MAX, but not musl */
++#define MAXNAMLEN NAME_MAX
++#endif
+ const uint32_t MAXPATHSIZE = 29 + MAXNAMLEN + (MAXNAMLEN + 6);
+ cpu_cacheinfo_t *p_temp_cpu_ci_list; /* a list of cpu_ci */
+ char path[MAXPATHSIZE], node_dir[MAXPATHSIZE];
diff --git a/dev-libs/roct-thunk-interface/roct-thunk-interface-5.7.1.ebuild b/dev-libs/roct-thunk-interface/roct-thunk-interface-5.7.1-r1.ebuild
index 2b6233891f0f..86cd350d7e3d 100644
--- a/dev-libs/roct-thunk-interface/roct-thunk-interface-5.7.1.ebuild
+++ b/dev-libs/roct-thunk-interface/roct-thunk-interface-5.7.1-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
@@ -26,7 +26,10 @@ BDEPEND="x11-libs/libdrm[video_cards_amdgpu]"
CMAKE_BUILD_TYPE=Release
-PATCHES=( "${FILESDIR}/${PN}-5.7.0-functions.patch" )
+PATCHES=(
+ "${FILESDIR}/${PN}-5.7.0-functions.patch"
+ "${FILESDIR}/${PN}-5.7.1-musl.patch"
+)
src_prepare() {
sed -e "s:get_version ( \"1.0.0\" ):get_version ( \"${PV}\" ):" -i CMakeLists.txt || die
diff --git a/dev-libs/roct-thunk-interface/roct-thunk-interface-6.0.0.ebuild b/dev-libs/roct-thunk-interface/roct-thunk-interface-6.0.0-r1.ebuild
index 353f0030f362..83c87c70b2d3 100644
--- a/dev-libs/roct-thunk-interface/roct-thunk-interface-6.0.0.ebuild
+++ b/dev-libs/roct-thunk-interface/roct-thunk-interface-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
@@ -26,7 +26,10 @@ BDEPEND="x11-libs/libdrm[video_cards_amdgpu]"
CMAKE_BUILD_TYPE=Release
-PATCHES=( "${FILESDIR}/${PN}-6.0.0-functions.patch" )
+PATCHES=(
+ "${FILESDIR}/${PN}-6.0.0-functions.patch"
+ "${FILESDIR}/${PN}-5.7.1-musl.patch"
+)
src_prepare() {
sed -e "s:get_version ( \"1.0.0\" ):get_version ( \"${PV}\" ):" -i CMakeLists.txt || die