From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4A0B8158041 for ; Sun, 10 Mar 2024 02:16:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2D1D4E2A84; Sun, 10 Mar 2024 02:16:52 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EB27CE2A84 for ; Sun, 10 Mar 2024 02:16:51 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D30B23406D1 for ; Sun, 10 Mar 2024 02:16:50 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2C3EA14F7 for ; Sun, 10 Mar 2024 02:16:49 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1710036973.48a7cd1cc7ff9034442c2aa88a66087b6b19360a.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/roct-thunk-interface/, dev-libs/roct-thunk-interface/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/roct-thunk-interface/files/roct-thunk-interface-5.7.1-musl.patch dev-libs/roct-thunk-interface/roct-thunk-interface-5.7.1-r1.ebuild dev-libs/roct-thunk-interface/roct-thunk-interface-5.7.1.ebuild dev-libs/roct-thunk-interface/roct-thunk-interface-6.0.0-r1.ebuild dev-libs/roct-thunk-interface/roct-thunk-interface-6.0.0.ebuild X-VCS-Directories: dev-libs/roct-thunk-interface/ dev-libs/roct-thunk-interface/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 48a7cd1cc7ff9034442c2aa88a66087b6b19360a X-VCS-Branch: master Date: Sun, 10 Mar 2024 02:16:49 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 21b24848-1a8e-4e34-89c7-cde8f2628bda X-Archives-Hash: e7a5b27226e678e2d3b5eed679d2d6d2 commit: 48a7cd1cc7ff9034442c2aa88a66087b6b19360a Author: Sv. Lockal gmail com> AuthorDate: Sat Mar 9 13:57:48 2024 +0000 Commit: Sam James gentoo org> CommitDate: Sun Mar 10 02:16:13 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48a7cd1c dev-libs/roct-thunk-interface: fix compilation with musl for 5.7.1 and 6.0.0 Upstream PR: https://github.com/ROCm/ROCT-Thunk-Interface/pull/96 Upstream bug: https://github.com/ROCm/ROCT-Thunk-Interface/issues/65 Closes: https://bugs.gentoo.org/830944 Closes: https://bugs.gentoo.org/715434 Signed-off-by: Sv. Lockal gmail.com> Signed-off-by: Sam James gentoo.org> .../files/roct-thunk-interface-5.7.1-musl.patch | 61 ++++++++++++++++++++++ ...ebuild => roct-thunk-interface-5.7.1-r1.ebuild} | 7 ++- ...ebuild => roct-thunk-interface-6.0.0-r1.ebuild} | 7 ++- 3 files changed, 71 insertions(+), 4 deletions(-) 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 + #include + #include ++#include + + #include + #include +@@ -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 similarity index 89% rename from dev-libs/roct-thunk-interface/roct-thunk-interface-5.7.1.ebuild rename to 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 similarity index 89% rename from dev-libs/roct-thunk-interface/roct-thunk-interface-6.0.0.ebuild rename to 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