diff options
| -rw-r--r-- | meta-oe/recipes-support/tbb/tbb/0001-set_my_tls_end_of_input-Use-an-arbitrary-but-valid-p.patch | 37 | ||||
| -rw-r--r-- | meta-oe/recipes-support/tbb/tbb_2021.2.0.bb | 1 | 
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 0000000000..caa68e64c5 --- /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 @@ | |||
| 1 | From a996fd451bbd7be93cff5f466bff7282ae972fe1 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Tue, 11 May 2021 10:52:51 -0700 | ||
| 4 | Subject: [PATCH] set_my_tls_end_of_input: Use an arbitrary but valid pointer | ||
| 5 | as value | ||
| 6 | |||
| 7 | Pass a valid pointer to pthread_setspecific to avoid GCC 11 warning. | ||
| 8 | Fixes | ||
| 9 | |||
| 10 | src/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 | |||
| 15 | Upstream-Status: Submitted [https://github.com/oneapi-src/oneTBB/pull/394] | ||
| 16 | Signed-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 | |||
| 21 | diff --git a/src/tbb/parallel_pipeline.cpp b/src/tbb/parallel_pipeline.cpp | ||
| 22 | index 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 | -- | ||
| 36 | 2.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 771ddd49b8..f4c52daf41 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 | ||
| 23 | S = "${WORKDIR}/git" | 24 | S = "${WORKDIR}/git" | 
