From: "James Le Cuirot" <chewi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-cpp/tbb/, dev-cpp/tbb/files/
Date: Sun, 14 Jul 2024 22:39:11 +0000 (UTC) [thread overview]
Message-ID: <1720996682.52cd9426fc2dc5bd354e77b75bd29ad82c5b77d3.chewi@gentoo> (raw)
commit: 52cd9426fc2dc5bd354e77b75bd29ad82c5b77d3
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 14 22:38:02 2024 +0000
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sun Jul 14 22:38:02 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=52cd9426
dev-cpp/tbb: Fix 2021.13.0 tests on non-x86 32-bit arches with patch
Thanks to John Paul Adrian Glaubitz for the patch. It has been submitted but not
yet accepted upstream.
Closes: https://bugs.gentoo.org/911759
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
dev-cpp/tbb/files/tbb-2021.13.0-test-atomics.patch | 38 ++++++++++++++++++++++
dev-cpp/tbb/tbb-2021.13.0.ebuild | 1 +
2 files changed, 39 insertions(+)
diff --git a/dev-cpp/tbb/files/tbb-2021.13.0-test-atomics.patch b/dev-cpp/tbb/files/tbb-2021.13.0-test-atomics.patch
new file mode 100644
index 000000000000..7cc8216153d0
--- /dev/null
+++ b/dev-cpp/tbb/files/tbb-2021.13.0-test-atomics.patch
@@ -0,0 +1,38 @@
+From c828ae47b8f4bea7736d2f9d05460e2b529c9d7d Mon Sep 17 00:00:00 2001
+From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
+Date: Fri, 9 Dec 2022 12:36:11 +0100
+Subject: [PATCH] Add cmake check for libatomic requirement when building with
+ gcc (#980)
+
+Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
+---
+ cmake/compilers/GNU.cmake | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git a/cmake/compilers/GNU.cmake b/cmake/compilers/GNU.cmake
+index cd76acfe1e..59f4e6934f 100644
+--- a/cmake/compilers/GNU.cmake
++++ b/cmake/compilers/GNU.cmake
+@@ -44,6 +44,22 @@ if (NOT MINGW)
+ set(TBB_COMMON_LINK_LIBS dl)
+ endif()
+
++# Check whether code with full atomics can be built without libatomic
++# see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81358
++include(CheckCXXSourceCompiles)
++check_cxx_source_compiles("#include <atomic>
++int main() {
++ std::atomic<uint8_t> w1;
++ std::atomic<uint16_t> w2;
++ std::atomic<uint32_t> w4;
++ std::atomic<uint64_t> w8;
++ return ++w1 + ++w2 + ++w4 + ++w8;
++}" TBB_BUILDS_WITHOUT_LIBATOMIC)
++
++if(NOT TBB_BUILDS_WITHOUT_LIBATOMIC)
++ set(TBB_COMMON_LINK_LIBS ${TBB_COMMON_LINK_LIBS} atomic)
++endif()
++
+ # Ignore -Werror set through add_compile_options() or added to CMAKE_CXX_FLAGS if TBB_STRICT is disabled.
+ if (NOT TBB_STRICT AND COMMAND tbb_remove_compile_flag)
+ tbb_remove_compile_flag(-Werror)
diff --git a/dev-cpp/tbb/tbb-2021.13.0.ebuild b/dev-cpp/tbb/tbb-2021.13.0.ebuild
index 3ac69c080835..ac958e5973a4 100644
--- a/dev-cpp/tbb/tbb-2021.13.0.ebuild
+++ b/dev-cpp/tbb/tbb-2021.13.0.ebuild
@@ -24,6 +24,7 @@ BDEPEND="virtual/pkgconfig"
PATCHES=(
"${FILESDIR}"/${PN}-2021.8.0-gcc-13.patch
+ "${FILESDIR}"/${PN}-2021.13.0-test-atomics.patch
)
src_prepare() {
next reply other threads:[~2024-07-14 22:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-14 22:39 James Le Cuirot [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-04-28 0:47 [gentoo-commits] repo/gentoo:master commit in: dev-cpp/tbb/, dev-cpp/tbb/files/ Sam James
2022-11-19 3:19 Sam James
2022-04-28 1:26 Sam James
2022-02-07 4:01 Sam James
2022-01-20 12:36 Sam James
2022-01-16 6:45 Sam James
2020-03-18 17:04 Guilherme Amadio
2017-02-01 21:38 Matthias Maier
2015-09-20 10:15 Justin Lecher
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=1720996682.52cd9426fc2dc5bd354e77b75bd29ad82c5b77d3.chewi@gentoo \
--to=chewi@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox