Skip to content

Commit 1a783b4

Browse files
committed
tbb: Use version 2021.12.0
Also add a patch to allow building tbb-native on hosts with GCC 14. Signed-off-by: Zoltán Böszörményi <[email protected]>
1 parent 0b98e77 commit 1a783b4

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
From 7e8de483c7c7c7e9589bacdebb0c5308f833c287 Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?=
3+
4+
Date: Wed, 19 Jun 2024 14:54:50 +0200
5+
Subject: [PATCH] Don't use upper limit for GCC version in concurrent_monitor.h
6+
MIME-Version: 1.0
7+
Content-Type: text/plain; charset=UTF-8
8+
Content-Transfer-Encoding: 8bit
9+
10+
This fixes a compiler error in GCC 14:
11+
12+
| In file included from /usr/include/c++/14/atomic:50,
13+
| from tmp-sicom-glibc/work/x86_64-linux/tbb-native/2021.12.0/git/src/tbb/../../include/oneapi/tbb/detail/_utils.h:22,
14+
| from tmp-sicom-glibc/work/x86_64-linux/tbb-native/2021.12.0/git/src/tbb/task_dispatcher.h:20,
15+
| from tmp-sicom-glibc/work/x86_64-linux/tbb-native/2021.12.0/git/src/tbb/arena.cpp:17:
16+
| In member function ‘void std::__atomic_base<_IntTp>::store(__int_type, std::memory_order) [with _ITp = bool]’,
17+
| inlined from ‘void std::atomic<bool>::store(bool, std::memory_order)’ at /usr/include/c++/14/atomic:109:20,
18+
| inlined from ‘void tbb::detail::r1::concurrent_monitor_base<Context>::notify_one_relaxed() [with Context = long unsigned int]’ at tmp-sicom-glibc/work/x86_64-linux/tbb-native/2021.12.0/git/src/tbb/concurrent_monitor.h:300:53:
19+
| /usr/include/c++/14/bits/atomic_base.h:477:25: error: ‘void __atomic_store_1(volatile void*, unsigned char, int)’ writing 1 byte into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
20+
| 477 | __atomic_store_n(&_M_i, __i, int(__m));
21+
| | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
22+
| compilation terminated due to -Wfatal-errors.
23+
| cc1plus: all warnings being treated as errors
24+
25+
Signed-off-by: Zoltán Böszörményi <[email protected]>
26+
---
27+
src/tbb/concurrent_monitor.h | 4 ++--
28+
1 file changed, 2 insertions(+), 2 deletions(-)
29+
30+
diff --git a/src/tbb/concurrent_monitor.h b/src/tbb/concurrent_monitor.h
31+
index 3e5c4beb..c84552f6 100644
32+
--- a/src/tbb/concurrent_monitor.h
33+
+++ b/src/tbb/concurrent_monitor.h
34+
@@ -293,12 +293,12 @@ public:
35+
36+
// GCC 12.x-13.x issues a warning here that to_wait_node(n)->my_is_in_list might have size 0, since n is
37+
// a base_node pointer. (This cannot happen, because only wait_node pointers are added to my_waitset.)
38+
-#if (__TBB_GCC_VERSION >= 120100 && __TBB_GCC_VERSION < 140000 ) && !__clang__ && !__INTEL_COMPILER
39+
+#if (__TBB_GCC_VERSION >= 120100 ) && !__clang__ && !__INTEL_COMPILER
40+
#pragma GCC diagnostic push
41+
#pragma GCC diagnostic ignored "-Wstringop-overflow"
42+
#endif
43+
to_wait_node(n)->my_is_in_list.store(false, std::memory_order_relaxed);
44+
-#if (__TBB_GCC_VERSION >= 120100 && __TBB_GCC_VERSION < 140000 ) && !__clang__ && !__INTEL_COMPILER
45+
+#if (__TBB_GCC_VERSION >= 120100 ) && !__clang__ && !__INTEL_COMPILER
46+
#pragma GCC diagnostic pop
47+
#endif
48+
}
49+
--
50+
2.45.2
51+

recipes-support/tbb/tbb_%.bbappend

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
PV = "2021.12.0"
2+
SRCREV = "9afd759b72c0c233cd5ea3c3c06b0894c9da9c54"
3+
4+
SRC_URI:remove = "file://0001-CMakeLists.txt-exclude-riscv64-riscv32.patch"
5+
6+
FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"
7+
SRC_URI:append = " file://0001-Don-t-use-upper-limit-for-GCC-version-in-concurrent_.patch"

0 commit comments

Comments
 (0)