All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: "Khem Raj" <raj.khem@gmail.com>
To: openembedded-devel@lists.openembedded.org
Cc: Khem Raj <raj.khem@gmail.com>
Subject: [meta-oe][PATCH 2/3] tbb: Fix build with GCC 11
Date: Tue, 11 May 2021 17:07:03 -0700	[thread overview]
Message-ID: <20210512000704.2889545-2-raj.khem@gmail.com> (raw)
In-Reply-To: <20210512000704.2889545-1-raj.khem@gmail.com>

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...f_input-Use-an-arbitrary-but-valid-p.patch | 37 +++++++++++++++++++
 meta-oe/recipes-support/tbb/tbb_2021.2.0.bb   |  1 +
 2 files changed, 38 insertions(+)
 create mode 100644 meta-oe/recipes-support/tbb/tbb/0001-set_my_tls_end_of_input-Use-an-arbitrary-but-valid-p.patch

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 @@
+From a996fd451bbd7be93cff5f466bff7282ae972fe1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 11 May 2021 10:52:51 -0700
+Subject: [PATCH] set_my_tls_end_of_input: Use an arbitrary but valid pointer
+ as value
+
+Pass a valid pointer to pthread_setspecific to avoid GCC 11 warning.
+Fixes
+
+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]
+|    44 |     void set( T value ) { pthread_setspecific(my_key, (void*)value); }
+|       |                           ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
+| compilation terminated due to -Wfatal-errors.
+
+Upstream-Status: Submitted [https://github.com/oneapi-src/oneTBB/pull/394]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/tbb/parallel_pipeline.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/tbb/parallel_pipeline.cpp b/src/tbb/parallel_pipeline.cpp
+index b7655c6b..ca518b5b 100644
+--- a/src/tbb/parallel_pipeline.cpp
++++ b/src/tbb/parallel_pipeline.cpp
+@@ -243,7 +243,8 @@ public:
+         return end_of_input_tls.get() != 0;
+     }
+     void set_my_tls_end_of_input() {
+-        end_of_input_tls.set(1);
++	// Use an arbitrary but valid pointer as value.
++        end_of_input_tls.set(array_size);
+     }
+ };
+ 
+-- 
+2.31.1
+
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
             file://GLIBC-PREREQ-is-not-defined-on-musl.patch \
             file://0001-CMakeLists.txt-exclude-riscv64-riscv32.patch \
             file://0001-Disable-use-of-_tpause-instruction.patch \
+            file://0001-set_my_tls_end_of_input-Use-an-arbitrary-but-valid-p.patch \
 "
 
 S = "${WORKDIR}/git"
-- 
2.31.1


  reply	other threads:[~2021-05-12  0:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-12  0:07 [meta-oe][PATCH 1/3] mongodb: Do not use MINSIGSTKSZ Khem Raj
2021-05-12  0:07 ` Khem Raj [this message]
2021-05-12  0:07 ` [meta-oe][PATCH 3/3] breakpad: Fix type mismatch for SIGSTKSZ Khem Raj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210512000704.2889545-2-raj.khem@gmail.com \
    --to=raj.khem@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.