aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorSimon South <simon@simonsouth.net>2022-02-02 09:47:05 -0500
committerLudovic Courtès <ludo@gnu.org>2022-02-05 00:59:30 +0100
commit2d4c22b0aa497f8a5e57a453b1dbf3ea98747c5f (patch)
treede4f8a895d2c9cb9832be11c6a4d5198af50d063 /gnu/packages/patches
parent41efa45508b292d947371dd6b9df943c33727c3d (diff)
downloadguix-2d4c22b0aa497f8a5e57a453b1dbf3ea98747c5f.tar
guix-2d4c22b0aa497f8a5e57a453b1dbf3ea98747c5f.tar.gz
gnu: tbb: Fix test on AArch64.
* gnu/packages/patches/tbb-fix-test-on-aarch64.patch: New file. * gnu/local.mk: Add it. * gnu/packages/tbb.scm (tbb)[source]: Apply it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/tbb-fix-test-on-aarch64.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/gnu/packages/patches/tbb-fix-test-on-aarch64.patch b/gnu/packages/patches/tbb-fix-test-on-aarch64.patch
new file mode 100644
index 0000000000..3a6003591e
--- /dev/null
+++ b/gnu/packages/patches/tbb-fix-test-on-aarch64.patch
@@ -0,0 +1,35 @@
+From 013035b4e9af39f506e87ae6b755c3363e768d4d Mon Sep 17 00:00:00 2001
+From: Vladislav Shchapov <phprus@gmail.com>
+Date: Thu, 23 Dec 2021 19:17:24 +0500
+Subject: [PATCH] Fix issue #687 (test_eh_thread) (#697)
+
+Signed-off-by: Vladislav Shchapov <phprus@gmail.com>
+---
+ test/tbb/test_eh_thread.cpp | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/test/tbb/test_eh_thread.cpp b/test/tbb/test_eh_thread.cpp
+index aa6d764d..af291f48 100644
+--- a/test/tbb/test_eh_thread.cpp
++++ b/test/tbb/test_eh_thread.cpp
+@@ -36,6 +36,7 @@
+ // TODO: enable limitThreads with sanitizer under docker
+ #if TBB_USE_EXCEPTIONS && !_WIN32 && !__ANDROID__
+
++#include <limits.h>
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <sys/resource.h>
+@@ -73,7 +74,8 @@ public:
+ mValid = false;
+ pthread_attr_t attr;
+ // Limit the stack size not to consume all virtual memory on 32 bit platforms.
+- if (pthread_attr_init(&attr) == 0 && pthread_attr_setstacksize(&attr, 100*1024) == 0) {
++ std::size_t stacksize = utils::max(128*1024, PTHREAD_STACK_MIN);
++ if (pthread_attr_init(&attr) == 0 && pthread_attr_setstacksize(&attr, stacksize) == 0) {
+ mValid = pthread_create(&mHandle, &attr, thread_routine, /* arg = */ nullptr) == 0;
+ }
+ }
+--
+2.34.0
+