summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYiyang Wu <xgreenlandforwyy@gmail.com>2023-02-20 10:15:58 +0800
committerSam James <sam@gentoo.org>2023-02-20 04:26:02 +0000
commit374c8828b3a2bca0b55ebcce9b5b8b5c710647a1 (patch)
tree952f091ae64a98be9a3dff80307ac45774a691b6 /dev-libs
parentdev-util/hip: backport patch to fix gcc-13 compile issue (diff)
downloadgentoo-374c8828b3a2bca0b55ebcce9b5b8b5c710647a1.tar.gz
gentoo-374c8828b3a2bca0b55ebcce9b5b8b5c710647a1.tar.bz2
gentoo-374c8828b3a2bca0b55ebcce9b5b8b5c710647a1.zip
dev-libs/rocm-opencl-runtime: Fix gcc-13 build
Backport two patches for missing includes Also apply patch for file rocm reorg (hsa/hsa.h) to 5.1.3 ebuild, which fix compilation issue Closes: https://bugs.gentoo.org/895382 Bug: https://bugs.gentoo.org/893602 Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/29675 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/rocm-opencl-runtime/files/rocclr-5.3.3-gcc13.patch25
-rw-r--r--dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-5.3.3-gcc13.patch25
-rw-r--r--dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.1.3.ebuild5
-rw-r--r--dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.3.3-r1.ebuild3
4 files changed, 57 insertions, 1 deletions
diff --git a/dev-libs/rocm-opencl-runtime/files/rocclr-5.3.3-gcc13.patch b/dev-libs/rocm-opencl-runtime/files/rocclr-5.3.3-gcc13.patch
new file mode 100644
index 000000000000..17a64d20bf1e
--- /dev/null
+++ b/dev-libs/rocm-opencl-runtime/files/rocclr-5.3.3-gcc13.patch
@@ -0,0 +1,25 @@
+From ca70cd7c3d63b1036e604116f3b269ca123e7904 Mon Sep 17 00:00:00 2001
+From: Jeremy Newton <Jeremy.Newton@amd.com>
+Date: Wed, 8 Feb 2023 14:03:58 -0500
+Subject: [PATCH] SWDEV-1 - device: Add missing include
+
+Newer GCC's seem to require this.
+
+Change-Id: I85926d4fa552b772f2eb9f8ede7863a546c47f54
+Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
+---
+ device/devhcprintf.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/device/devhcprintf.cpp b/device/devhcprintf.cpp
+index b36f7758..a5aba4a4 100644
+--- a/device/devhcprintf.cpp
++++ b/device/devhcprintf.cpp
+@@ -23,6 +23,7 @@
+
+ #include <assert.h>
+ #include <cstdarg>
++#include <cstdint>
+ #include <cstdio>
+ #include <cstring>
+ #include <string>
diff --git a/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-5.3.3-gcc13.patch b/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-5.3.3-gcc13.patch
new file mode 100644
index 000000000000..01b3a68e70be
--- /dev/null
+++ b/dev-libs/rocm-opencl-runtime/files/rocm-opencl-runtime-5.3.3-gcc13.patch
@@ -0,0 +1,25 @@
+From 767241dca886bcd2469d91382afab9d032e1cfa6 Mon Sep 17 00:00:00 2001
+From: Jeremy Newton <Jeremy.Newton@amd.com>
+Date: Wed, 8 Feb 2023 14:16:43 -0500
+Subject: [PATCH] SWDEV-1 - cltrace: Add missing include
+
+Newer GCC's seem to require this.
+
+Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
+Change-Id: I56ef934600729e892f1cd7ab11662760df48aed8
+---
+ tools/cltrace/cltrace.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tools/cltrace/cltrace.cpp b/tools/cltrace/cltrace.cpp
+index be96298..5ac5b62 100644
+--- a/tools/cltrace/cltrace.cpp
++++ b/tools/cltrace/cltrace.cpp
+@@ -17,6 +17,7 @@
+ #include <iostream>
+ #include <cstring>
+ #include <cstdlib>
++#include <cstdint>
+
+ #ifdef _MSC_VER
+ #include <windows.h>
diff --git a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.1.3.ebuild b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.1.3.ebuild
index d3bff871de9b..e0845f49453a 100644
--- a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.1.3.ebuild
+++ b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.1.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -30,6 +30,7 @@ BDEPEND=">=dev-util/rocm-cmake-${PV}
PATCHES=(
"${FILESDIR}/${PN}-5.1.3-remove-clinfo.patch"
"${FILESDIR}/${PN}-3.5.0-do-not-install-libopencl.patch"
+ "${FILESDIR}/${PN}-5.3.3-gcc13.patch"
)
S="${WORKDIR}/ROCm-OpenCL-Runtime-rocm-${PV}"
@@ -51,6 +52,8 @@ src_prepare() {
# Bug #753377
# patch re-enables accidentally disabled gfx800 family
eapply "${FILESDIR}/${PN}-5.0.2-enable-gfx800.patch"
+ eapply "${FILESDIR}/rocclr-5.3.3-fix-include.patch"
+ eapply "${FILESDIR}/rocclr-5.3.3-gcc13.patch"
popd || die
}
diff --git a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.3.3-r1.ebuild b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.3.3-r1.ebuild
index 169deaf37b79..a982c2d36ed0 100644
--- a/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.3.3-r1.ebuild
+++ b/dev-libs/rocm-opencl-runtime/rocm-opencl-runtime-5.3.3-r1.ebuild
@@ -30,6 +30,8 @@ BDEPEND=">=dev-util/rocm-cmake-${PV}
S="${WORKDIR}/ROCm-OpenCL-Runtime-rocm-${PV}"
S1="${WORKDIR}/ROCclr-rocm-${PV}"
+PATCHES=( "${FILESDIR}/${PN}-5.3.3-gcc13.patch" )
+
src_prepare() {
cmake_src_prepare
@@ -38,6 +40,7 @@ src_prepare() {
# patch re-enables accidentally disabled gfx800 family
eapply "${FILESDIR}/${PN}-5.0.2-enable-gfx800.patch"
eapply "${FILESDIR}/rocclr-${PV}-fix-include.patch"
+ eapply "${FILESDIR}/rocclr-5.3.3-gcc13.patch"
popd || die
}