commit:     048a5ce2832f0abd89cefc093cfc7d8b42bdbf30
Author:     Sv. Lockal <lockalsash <AT> gmail <DOT> com>
AuthorDate: Sat Mar  7 12:27:15 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Mar 11 14:55:25 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=048a5ce2

dev-libs/rocr-runtime: fix compilation with llvm-runtimes/libcxx-22

Closes: https://bugs.gentoo.org/970943
Signed-off-by: Sv. Lockal <lockalsash <AT> gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/45899
Closes: https://github.com/gentoo/gentoo/pull/45899
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/rocr-runtime-7.2.0-fix-libcxx.patch       | 21 +++++++++++++++++++++
 dev-libs/rocr-runtime/rocr-runtime-7.2.0.ebuild     |  1 +
 2 files changed, 22 insertions(+)

diff --git a/dev-libs/rocr-runtime/files/rocr-runtime-7.2.0-fix-libcxx.patch 
b/dev-libs/rocr-runtime/files/rocr-runtime-7.2.0-fix-libcxx.patch
new file mode 100644
index 000000000000..e79e6fc7012a
--- /dev/null
+++ b/dev-libs/rocr-runtime/files/rocr-runtime-7.2.0-fix-libcxx.patch
@@ -0,0 +1,21 @@
+Fix libc++ error: no matching function for call to object of type 'const 
std::less<void>'.
+libstdc++ compiles due too loose standard following, allowing to compare some 
structs without a comparator.
+Upstream bug: https://github.com/ROCm/rocm-systems/issues/3307
+--- a/runtime/hsa-runtime/core/inc/amd_gpu_agent.h
++++ b/runtime/hsa-runtime/core/inc/amd_gpu_agent.h
+@@ -575,8 +575,14 @@ class GpuAgent : public GpuAgentInt {
+   // @brief Current short duration scratch memory size.
+   size_t scratch_used_large_;
+ 
++  struct HsaSignalLess {
++    bool operator()(const hsa_signal_t& lhs, const hsa_signal_t& rhs) const {
++      return lhs.handle < rhs.handle;
++    }
++  };
++
+   // @brief Notifications for scratch release.
+-  std::map<hsa_signal_t, hsa_signal_value_t> scratch_notifiers_;
++  std::map<hsa_signal_t, hsa_signal_value_t, HsaSignalLess> 
scratch_notifiers_;
+ 
+   // @brief Default scratch size per queue.
+   size_t queue_scratch_len_;

diff --git a/dev-libs/rocr-runtime/rocr-runtime-7.2.0.ebuild 
b/dev-libs/rocr-runtime/rocr-runtime-7.2.0.ebuild
index 7e4d4ee8de04..3e419728fcef 100644
--- a/dev-libs/rocr-runtime/rocr-runtime-7.2.0.ebuild
+++ b/dev-libs/rocr-runtime/rocr-runtime-7.2.0.ebuild
@@ -40,6 +40,7 @@ BDEPEND="app-editors/vim-core"
 
 PATCHES=(
        "${FILESDIR}/${PN}-7.2.0-use-system-hsakmt.patch"
+       "${FILESDIR}/${PN}-7.2.0-fix-libcxx.patch"
 )
 
 # skip false positive detection in samples, bug #958188

Reply via email to