summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-05-11 10:57:57 -0700
committerKhem Raj <raj.khem@gmail.com>2021-05-11 11:07:08 -0700
commite9a53d389a12c65839ca72a1a6777fe36dc566bb (patch)
tree8368c9ddb2d269cfb4f555241f14f56a9ceabc13 /meta-oe/recipes-support
parentc04080a70369e1fc9913a467ea99a3f44ee2a836 (diff)
downloadmeta-openembedded-e9a53d389a12c65839ca72a1a6777fe36dc566bb.tar.gz
tbb: Fix build with GCC 11
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support')
-rw-r--r--meta-oe/recipes-support/tbb/tbb/0001-set_my_tls_end_of_input-Use-an-arbitrary-but-valid-p.patch37
-rw-r--r--meta-oe/recipes-support/tbb/tbb_2021.2.0.bb1
2 files changed, 38 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/tbb/tbb/0001-set_my_tls_end_of_input-Use-an-arbitrary-but-valid-p.patch b/meta-oe/recipes-support/tbb/tbb/0001-set_my_tls_end_of_input-Use-an-arbitrary-but-valid-p.patch
new file mode 100644
index 000000000..caa68e64c
--- /dev/null
+++ b/meta-oe/recipes-support/tbb/tbb/0001-set_my_tls_end_of_input-Use-an-arbitrary-but-valid-p.patch
@@ -0,0 +1,37 @@
1From a996fd451bbd7be93cff5f466bff7282ae972fe1 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 11 May 2021 10:52:51 -0700
4Subject: [PATCH] set_my_tls_end_of_input: Use an arbitrary but valid pointer
5 as value
6
7Pass a valid pointer to pthread_setspecific to avoid GCC 11 warning.
8Fixes
9
10src/tbb/tls.h:44:46: error: 'int pthread_setspecific(pthread_key_t, const void*)' expecting 1 byte in a region of size 0 [-Werror=stringop-overread]
11| 44 | void set( T value ) { pthread_setspecific(my_key, (void*)value); }
12| | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
13| compilation terminated due to -Wfatal-errors.
14
15Upstream-Status: Submitted [https://github.com/oneapi-src/oneTBB/pull/394]
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17---
18 src/tbb/parallel_pipeline.cpp | 3 ++-
19 1 file changed, 2 insertions(+), 1 deletion(-)
20
21diff --git a/src/tbb/parallel_pipeline.cpp b/src/tbb/parallel_pipeline.cpp
22index b7655c6b..ca518b5b 100644
23--- a/src/tbb/parallel_pipeline.cpp
24+++ b/src/tbb/parallel_pipeline.cpp
25@@ -243,7 +243,8 @@ public:
26 return end_of_input_tls.get() != 0;
27 }
28 void set_my_tls_end_of_input() {
29- end_of_input_tls.set(1);
30+ // Use an arbitrary but valid pointer as value.
31+ end_of_input_tls.set(array_size);
32 }
33 };
34
35--
362.31.1
37
diff --git a/meta-oe/recipes-support/tbb/tbb_2021.2.0.bb b/meta-oe/recipes-support/tbb/tbb_2021.2.0.bb
index 771ddd49b..f4c52daf4 100644
--- a/meta-oe/recipes-support/tbb/tbb_2021.2.0.bb
+++ b/meta-oe/recipes-support/tbb/tbb_2021.2.0.bb
@@ -18,6 +18,7 @@ SRC_URI = "git://github.com/oneapi-src/oneTBB.git;protocol=https;branch=${BRANCH
18 file://GLIBC-PREREQ-is-not-defined-on-musl.patch \ 18 file://GLIBC-PREREQ-is-not-defined-on-musl.patch \
19 file://0001-CMakeLists.txt-exclude-riscv64-riscv32.patch \ 19 file://0001-CMakeLists.txt-exclude-riscv64-riscv32.patch \
20 file://0001-Disable-use-of-_tpause-instruction.patch \ 20 file://0001-Disable-use-of-_tpause-instruction.patch \
21 file://0001-set_my_tls_end_of_input-Use-an-arbitrary-but-valid-p.patch \
21" 22"
22 23
23S = "${WORKDIR}/git" 24S = "${WORKDIR}/git"