mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-08 06:32:59 -04:00
dev-libs/xrt-xdna: fix compilation with gcc-16 and clang
* 2.21.75 - backport patch from upstream * 999999 - remove -Werror (causes failures with clang) Closes: https://bugs.gentoo.org/974727 Signed-off-by: Sv. Lockal <lockalsash@gmail.com>
This commit is contained in:
35
dev-libs/xrt-xdna/files/xrt-xdna-2.21.75-gcc-16.patch
Normal file
35
dev-libs/xrt-xdna/files/xrt-xdna-2.21.75-gcc-16.patch
Normal file
@@ -0,0 +1,35 @@
|
||||
From 72ac6dab9f283d9000ae140fc41908fa3393bc21 Mon Sep 17 00:00:00 2001
|
||||
From: Max Zhen <max.zhen@amd.com>
|
||||
Date: Mon, 13 Apr 2026 16:24:04 -0700
|
||||
Subject: [PATCH] fix compilation errors with gcc 16
|
||||
|
||||
Signed-off-by: Max Zhen <max.zhen@amd.com>
|
||||
--- a/src/shim/umq/dbg_hwq.cpp
|
||||
+++ b/src/shim/umq/dbg_hwq.cpp
|
||||
@@ -95,8 +95,8 @@ submit()
|
||||
*m_dbg_umq_comp_ptr = 0;
|
||||
|
||||
/* Issue mfence instruction to make sure all writes to the slot before is done */
|
||||
- std::atomic_thread_fence(std::memory_order::memory_order_seq_cst);
|
||||
- m_dbg_umq_hdr->write_index++;
|
||||
+ std::atomic_thread_fence(std::memory_order_seq_cst);
|
||||
+ m_dbg_umq_hdr->write_index = m_dbg_umq_hdr->write_index + 1;
|
||||
|
||||
shim_debug("dbg umq: submit cmd widx: %lu ridx: %lu",
|
||||
m_dbg_umq_hdr->write_index,
|
||||
--- a/src/shim/umq/hwq.cpp
|
||||
+++ b/src/shim/umq/hwq.cpp
|
||||
@@ -226,10 +226,11 @@ issue_single_exec_buf(const cmd_buffer *cmd_bo, bool last_of_chain)
|
||||
// TODO: remove once uC stops looking at and updating this field.
|
||||
hdr->common_header.type = HOST_QUEUE_PACKET_TYPE_VENDOR_SPECIFIC;
|
||||
// Issue mfence instruction to make sure all writes to the slot before is done.
|
||||
- std::atomic_thread_fence(std::memory_order::memory_order_seq_cst);
|
||||
+ std::atomic_thread_fence(std::memory_order_seq_cst);
|
||||
// Indicates the slot is ready for processing by uC.
|
||||
// Must be the last step after pkt is filled up.
|
||||
- uint64_t wi = m_umq_hdr->write_index++;
|
||||
+ uint64_t wi = m_umq_hdr->write_index;
|
||||
+ m_umq_hdr->write_index = wi + 1;
|
||||
|
||||
// Wake up uC in case it is sleeping and waiting.
|
||||
*m_mapped_doorbell = 0;
|
||||
@@ -77,6 +77,7 @@ BDEPEND+="
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-0_p20251025-fix-clang.patch
|
||||
"${FILESDIR}"/${PN}-2.21.75-gcc-16.patch
|
||||
)
|
||||
|
||||
CONFIG_CHECK="~AMD_IOMMU ~DRM_ACCEL"
|
||||
|
||||
@@ -75,10 +75,6 @@ BDEPEND+="
|
||||
")
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-0_p20251025-fix-clang.patch
|
||||
)
|
||||
|
||||
CONFIG_CHECK="~AMD_IOMMU ~DRM_ACCEL"
|
||||
|
||||
python_check_deps() {
|
||||
@@ -139,6 +135,8 @@ src_prepare() {
|
||||
|
||||
sed -e "s/set (XRT_UPSTREAM 0)/set (XRT_UPSTREAM 1)/" -i xrt/src/CMake/settings.cmake || die
|
||||
|
||||
sed -e 's/"-Werror"//' -i src/shim/CMakeLists.txt || die
|
||||
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user