summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-cpp/tbb')
-rw-r--r--dev-cpp/tbb/files/tbb-2020.3-gcc13.patch35
-rw-r--r--dev-cpp/tbb/tbb-2020.3.ebuild7
2 files changed, 40 insertions, 2 deletions
diff --git a/dev-cpp/tbb/files/tbb-2020.3-gcc13.patch b/dev-cpp/tbb/files/tbb-2020.3-gcc13.patch
new file mode 100644
index 000000000000..1c0803048ca7
--- /dev/null
+++ b/dev-cpp/tbb/files/tbb-2020.3-gcc13.patch
@@ -0,0 +1,35 @@
+https://bugs.gentoo.org/899746
+https://github.com/oneapi-src/oneTBB/pull/833
+
+From c18342ba667d1f33f5e9a773aa86b091a9694b97 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyich@gmail.com>
+Date: Fri, 20 May 2022 07:50:00 +0100
+Subject: [PATCH] tbb_2020: fix build on gcc-13
+
+On gcc-13 build started failing due to 'task' identifier collision as:
+
+ ../../include/tbb/task.h:300:20: error: declaration of 'tbb::task& tbb::internal::task_prefix::task()' changes meaning of 'task' [-fpermissive]
+ 300 | tbb::task& task() {return *reinterpret_cast<tbb::task*>(this+1);}
+ | ^~~~
+ ../../include/tbb/task.h:252:9: note: used here to mean 'class tbb::task'
+ 252 | task* next_offloaded;
+ | ^~~~
+ ../../include/tbb/task.h:43:7: note: declared here
+ 43 | class task;
+ | ^~~~
+
+The change adds explicit qualifier to class name to avoid ambiguity with method name.
+
+Signed-off-by: Sergei Trofimovich <slyich@gmail.com>
+--- a/include/tbb/task.h
++++ b/include/tbb/task.h
+@@ -249,7 +249,7 @@ namespace internal {
+ #if __TBB_TASK_PRIORITY
+ //! Pointer to the next offloaded lower priority task.
+ /** Used to maintain a list of offloaded tasks inside the scheduler. **/
+- task* next_offloaded;
++ tbb::task* next_offloaded;
+ #endif
+
+ #if __TBB_PREVIEW_RESUMABLE_TASKS
+
diff --git a/dev-cpp/tbb/tbb-2020.3.ebuild b/dev-cpp/tbb/tbb-2020.3.ebuild
index f784dbdaec54..9e6f7e2e6797 100644
--- a/dev-cpp/tbb/tbb-2020.3.ebuild
+++ b/dev-cpp/tbb/tbb-2020.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=7
@@ -23,7 +23,10 @@ S="${WORKDIR}/oneTBB-${MY_PV}"
DOCS=( CHANGES README README.md doc/Release_Notes.txt )
-PATCHES=( "${FILESDIR}"/${PN}-2020.1-makefile-debug.patch )
+PATCHES=(
+ "${FILESDIR}"/${PN}-2020.1-makefile-debug.patch
+ "${FILESDIR}"/${PN}-2020.3-gcc13.patch
+)
src_prepare() {
default