tbb, bump to latest release not introducing tcm (#10631)

This commit is contained in:
Schrijvers Luc
2024-06-26 12:53:23 +02:00
committed by GitHub
parent 53867c05a5
commit 2c6c677058
2 changed files with 107 additions and 98 deletions

View File

@@ -1,51 +1,51 @@
From 3b411c5c672892b0e4bc0d461bb7fce52dc9416f Mon Sep 17 00:00:00 2001
From 2d93c4810d95aae37dbf105475e824ef45d8e95a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Wed, 6 Jan 2021 11:20:09 +0100
Subject: Haiku patches
diff --git a/cmake/compilers/Clang.cmake b/cmake/compilers/Clang.cmake
index 7894312..ffb994a 100644
index a128e13..c56a1b2 100644
--- a/cmake/compilers/Clang.cmake
+++ b/cmake/compilers/Clang.cmake
@@ -23,7 +23,9 @@ if (CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64)
set(TBB_COMMON_COMPILE_FLAGS -mrtm)
endif()
@@ -54,7 +54,9 @@ set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -Wformat -Wformat-secur
-fstack-protector-strong -fPIC)
set(TBB_LIB_LINK_FLAGS ${TBB_LIB_LINK_FLAGS} -Wl,-z,relro,-z,now)
-set(TBB_COMMON_LINK_LIBS ${CMAKE_DL_LIBS})
+if (NOT HAIKU)
set(TBB_COMMON_LINK_LIBS dl)
+ set(TBB_COMMON_LINK_LIBS ${CMAKE_DL_LIBS})
+endif()
set(TBB_WARNING_SUPPRESS -Wno-non-virtual-dtor -Wno-dangling-else)
if (ANDROID_PLATFORM)
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} $<$<NOT:$<CONFIG:Debug>>:-D_FORTIFY_SOURCE=2>)
diff --git a/cmake/compilers/GNU.cmake b/cmake/compilers/GNU.cmake
index 9bff049..36e7913 100644
index b60172c..1be47fe 100644
--- a/cmake/compilers/GNU.cmake
+++ b/cmake/compilers/GNU.cmake
@@ -22,7 +22,9 @@ if (CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64)
set(TBB_COMMON_COMPILE_FLAGS -mrtm)
@@ -40,7 +40,7 @@ if (CMAKE_SYSTEM_PROCESSOR MATCHES "(AMD64|amd64|i.86|x86)")
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -mrtm $<$<AND:$<NOT:$<CXX_COMPILER_ID:Intel>>,$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},11.0>>>:-mwaitpkg>)
endif()
+if (NOT HAIKU)
set(TBB_COMMON_LINK_LIBS dl)
+endif()
-if (NOT MINGW)
+if (NOT MINGW AND NOT HAIKU)
set(TBB_COMMON_LINK_LIBS dl)
endif()
if (NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL Intel)
# gcc 6.0 and later have -flifetime-dse option that controls elimination of stores done outside the object lifetime
diff --git a/include/oneapi/tbb/detail/_config.h b/include/oneapi/tbb/detail/_config.h
index 767a258..e459c2d 100644
index ad9f0f3..49e3d67 100644
--- a/include/oneapi/tbb/detail/_config.h
+++ b/include/oneapi/tbb/detail/_config.h
@@ -247,7 +247,7 @@
#define __TBB_CPP17_ALLOCATOR_IS_ALWAYS_EQUAL_PRESENT (__TBB_LANG >= 201703L)
#define __TBB_CPP17_IS_SWAPPABLE_PRESENT (__TBB_LANG >= 201703L)
@@ -274,7 +274,7 @@
#define __TBB_CPP20_COMPARISONS_PRESENT 0
#endif
-#define __TBB_RESUMABLE_TASKS (!__TBB_WIN8UI_SUPPORT && !__ANDROID__)
+#define __TBB_RESUMABLE_TASKS (!__TBB_WIN8UI_SUPPORT && !__ANDROID__ && !__HAIKU__)
-#define __TBB_RESUMABLE_TASKS (!__TBB_WIN8UI_SUPPORT && !__ANDROID__ && !__QNXNTO__ && (!__linux__ || __GLIBC__))
+#define __TBB_RESUMABLE_TASKS (!__TBB_WIN8UI_SUPPORT && !__ANDROID__ && !__HAIKU__ && !__QNXNTO__ && (!__linux__ || __GLIBC__))
/* This macro marks incomplete code or comments describing ideas which are considered for the future.
* See also for plain comment with TODO and FIXME marks for small improvement opportunities.
@@ -424,6 +424,11 @@
@@ -490,6 +490,11 @@
#define TBB_ALLOCATOR_TRAITS_BROKEN 1
#endif
@@ -58,103 +58,110 @@ index 767a258..e459c2d 100644
#if __TBB_GLIBCXX_VERSION >= 40800 && __TBB_GLIBCXX_VERSION < 40900
#define __TBB_GLIBCXX_THIS_THREAD_YIELD_BROKEN 1
diff --git a/src/tbb/allocator.cpp b/src/tbb/allocator.cpp
index 84cf929..edfa88f 100644
index 5453aea..99b567b 100644
--- a/src/tbb/allocator.cpp
+++ b/src/tbb/allocator.cpp
@@ -95,7 +95,7 @@ static const dynamic_link_descriptor MallocLinkTable[] = {
@@ -40,7 +40,7 @@
// memalign() and it offers nothing but overhead due to inconvenient interface. This is likely the case with other
// standard libraries as well, and more libraries can be added to the preprocessor check below. Unfortunately, we
// can't detect musl, so we simply enable memalign() on Linux and Android in general.
-#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__ANDROID__)
+#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__ANDROID__) || defined(__HAIKU__)
#include <malloc.h> // memalign
#define __TBB_USE_MEMALIGN
#else
@@ -119,7 +119,7 @@ static const dynamic_link_descriptor MallocLinkTable[] = {
#define MALLOCLIB_NAME "tbbmalloc" DEBUG_SUFFIX ".dll"
#elif __APPLE__
#define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX ".dylib"
-#elif __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __sun || _AIX || __ANDROID__
+#elif __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __sun || _AIX || __ANDROID__ || __HAIKU__
#define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX ".so"
#elif __linux__ // Note that order of these #elif's is important!
#elif __unix__ // Note that order of these #elif's is important!
#define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX ".so.2"
diff --git a/src/tbb/dynamic_link.cpp b/src/tbb/dynamic_link.cpp
index 0b30546..5f97e16 100644
index 2d88f8b..1c6ba41 100644
--- a/src/tbb/dynamic_link.cpp
+++ b/src/tbb/dynamic_link.cpp
@@ -387,7 +387,11 @@ namespace r1 {
@@ -388,7 +388,11 @@ namespace r1 {
#endif /* !__TBB_DYNAMIC_LOAD_ENABLED */
// RTLD_GLOBAL - to guarantee that old TBB will find the loaded library
// RTLD_NOLOAD - not to load the library without the full path
- library_handle = dlopen(library, RTLD_LAZY | RTLD_GLOBAL | RTLD_NOLOAD);
+ #ifndef __HAIKU__
+ library_handle = dlopen(library, RTLD_LAZY | RTLD_GLOBAL | RTLD_NOLOAD);
+ #else
+ library_handle = dlopen(library, RTLD_LAZY | RTLD_GLOBAL);
+ #endif
+ library_handle = dlopen(library, RTLD_LAZY | RTLD_GLOBAL | RTLD_NOLOAD);
+ #else
+ library_handle = dlopen(library, RTLD_LAZY | RTLD_GLOBAL);
+ #endif
#endif /* _WIN32 */
if (library_handle) {
if (!resolve_symbols(library_handle, descriptors, required)) {
diff --git a/src/tbb/rml_tbb.cpp b/src/tbb/rml_tbb.cpp
index bcb9929..f5c282c 100644
index 4c772ea..97f05f2 100644
--- a/src/tbb/rml_tbb.cpp
+++ b/src/tbb/rml_tbb.cpp
@@ -52,7 +52,7 @@ namespace rml {
@@ -50,7 +50,7 @@ namespace rml {
#define RML_SERVER_NAME "irml" DEBUG_SUFFIX ".dll"
#elif __APPLE__
#define RML_SERVER_NAME "libirml" DEBUG_SUFFIX ".dylib"
#elif __linux__
#define RML_SERVER_NAME "libirml" DEBUG_SUFFIX ".so.1"
-#elif __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __sun || _AIX
+#elif __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __sun || _AIX || __HAIKU__
#define RML_SERVER_NAME "libirml" DEBUG_SUFFIX ".so"
#else
#error Unknown OS
#elif __unix__
#define RML_SERVER_NAME "libirml" DEBUG_SUFFIX ".so.1"
diff --git a/src/tbbmalloc/frontend.cpp b/src/tbbmalloc/frontend.cpp
index 8f97213..4f331ec 100644
index aa35831..c6ac548 100644
--- a/src/tbbmalloc/frontend.cpp
+++ b/src/tbbmalloc/frontend.cpp
@@ -757,7 +757,7 @@ static inline unsigned int highestBitPos(unsigned int n)
@@ -774,7 +774,7 @@ static inline unsigned int highestBitPos(unsigned int n)
unsigned int pos;
#if __ARCH_x86_32||__ARCH_x86_64
-# if __linux__||__APPLE__||__FreeBSD__||__NetBSD__||__OpenBSD__||__sun||__MINGW32__
+# if __linux__||__APPLE__||__FreeBSD__||__NetBSD__||__OpenBSD__||__sun||__MINGW32__||__HAIKU__
-# if __unix__||__APPLE__||__MINGW32__
+# if __unix__||__APPLE__||__MINGW32__||__HAIKU__
__asm__ ("bsr %1,%0" : "=r"(pos) : "r"(n));
# elif (_WIN32 && (!_WIN64 || __INTEL_COMPILER))
__asm
diff --git a/src/tbbmalloc/tbbmalloc.cpp b/src/tbbmalloc/tbbmalloc.cpp
index d6345ea..df59736 100644
index 675726e..f161798 100644
--- a/src/tbbmalloc/tbbmalloc.cpp
+++ b/src/tbbmalloc/tbbmalloc.cpp
@@ -42,7 +42,7 @@ namespace internal {
@@ -43,7 +43,7 @@ namespace internal {
#define MALLOCLIB_NAME "tbbmalloc" DEBUG_SUFFIX ".dll"
#elif __APPLE__
#define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX ".dylib"
-#elif __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __sun || _AIX || __ANDROID__
+#elif __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __sun || _AIX || __ANDROID__ || __HAIKU__
#define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX ".so"
#elif __linux__
#elif __unix__
#define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX __TBB_STRING(.so.2)
diff --git a/test/common/memory_usage.h b/test/common/memory_usage.h
index 88b5f2d..463845c 100644
index cf8b418..1153f81 100644
--- a/test/common/memory_usage.h
+++ b/test/common/memory_usage.h
@@ -119,7 +119,8 @@ namespace utils {
ASSERT(status == KERN_SUCCESS, NULL);
@@ -122,6 +122,7 @@ namespace utils {
ASSERT(status == KERN_SUCCESS, nullptr);
return info.virtual_size - shared_size;
#else
- return 0;
+ utils::suppress_unused_warning(stat);
+ return 0;
return 0;
#endif
}
diff --git a/test/common/utils_dynamic_libs.h b/test/common/utils_dynamic_libs.h
index acac809..95e7519 100644
index c84beac..57f0e85 100644
--- a/test/common/utils_dynamic_libs.h
+++ b/test/common/utils_dynamic_libs.h
@@ -43,7 +43,7 @@ namespace utils {
@@ -50,7 +50,7 @@ namespace utils {
#if __APPLE__
#define EXT ".dylib"
// Android SDK build system does not support .so file name versioning
-#elif __FreeBSD__ || __NetBSD__ || __sun || _AIX || __ANDROID__
+#elif __FreeBSD__ || __NetBSD__ || __sun || _AIX || __ANDROID__ || __HAIKU__
#define EXT ".so"
#elif __linux__ // Order of these elif's matters!
#elif __unix__ // Order of these elif's matters!
#define EXT __TBB_STRING(.so.2)
diff --git a/test/conformance/conformance_resumable_tasks.cpp b/test/conformance/conformance_resumable_tasks.cpp
index 637c413..7fb704c 100644
index 70fd878..4b8bfbe 100644
--- a/test/conformance/conformance_resumable_tasks.cpp
+++ b/test/conformance/conformance_resumable_tasks.cpp
@@ -16,7 +16,7 @@
@@ -170,48 +177,48 @@ index 637c413..7fb704c 100644
2.45.1
From 9a452f3f5a9c55851b2ea1cbc38a0e67150155fa Mon Sep 17 00:00:00 2001
From 9e820e4e741a599cde921cc78271547833e65292 Mon Sep 17 00:00:00 2001
From: Schrijvers Luc <begasus@gmail.com>
Date: Mon, 24 Jun 2024 07:27:44 +0200
Subject: Fix for undeclared abort()
diff --git a/test/common/utils_assert.h b/test/common/utils_assert.h
index 958a267..c5523b1 100644
--- a/test/common/utils_assert.h
+++ b/test/common/utils_assert.h
@@ -17,6 +17,8 @@
#ifndef __TBB_test_common_utils_assert_H
#define __TBB_test_common_utils_assert_H
+#include <cstdlib>
+
#include "utils_report.h"
#define REPORT_FATAL_ERROR REPORT
--
2.45.1
From f7b9ac14046e14ec648a518439c2c221c2f01530 Mon Sep 17 00:00:00 2001
From: Schrijvers Luc <begasus@gmail.com>
Date: Mon, 24 Jun 2024 08:11:54 +0200
Subject: Disable some warnings turning into errors for the test cases
Date: Tue, 25 Jun 2024 09:06:51 +0200
Subject: Disable warning turning into errors
diff --git a/cmake/compilers/GNU.cmake b/cmake/compilers/GNU.cmake
index 36e7913..66dc9eb 100644
index 1be47fe..9d42934 100644
--- a/cmake/compilers/GNU.cmake
+++ b/cmake/compilers/GNU.cmake
@@ -14,7 +14,7 @@
@@ -26,7 +26,7 @@ else()
set(TBB_DEF_FILE_PREFIX lin${TBB_ARCH})
endif()
set(TBB_LINK_DEF_FILE_FLAG -Wl,--version-script=)
set(TBB_DEF_FILE_PREFIX lin${TBB_ARCH})
-set(TBB_WARNING_LEVEL -Wall -Wextra $<$<BOOL:${TBB_STRICT}>:-Werror> -Wfatal-errors)
+set(TBB_WARNING_LEVEL -Wall -Wextra $<$<BOOL:${TBB_STRICT}>:-Werror> -Wfatal-errors -Wno-error=uninitialized -Wno-error=array-bounds -Wno-error=use-after-free -Wno-error=address -Wno-error=sizeof-array-div)
set(TBB_TEST_WARNING_FLAGS -Wshadow -Wcast-qual -Woverloaded-virtual -Wnon-virtual-dtor)
set(TBB_MMD_FLAG -MMD)
# Depfile options (e.g. -MD) are inserted automatically in some cases.
--
2.45.1
From 4695814ea37df44d34e25ac7ee22ddc5a721e9d2 Mon Sep 17 00:00:00 2001
From: Schrijvers Luc <begasus@gmail.com>
Date: Tue, 25 Jun 2024 08:54:51 +0200
Subject: Build fix?
diff --git a/include/oneapi/tbb/detail/_export.h b/include/oneapi/tbb/detail/_export.h
index 4c01522..cc4c9f5 100644
--- a/include/oneapi/tbb/detail/_export.h
+++ b/include/oneapi/tbb/detail/_export.h
@@ -17,7 +17,7 @@
#ifndef __TBB_detail__export_H
#define __TBB_detail__export_H
-#if defined(__MINGW32__)
+#if defined(__MINGW32__) || defined(__HAIKU__)
#define _EXPORT __declspec(dllexport)
#elif defined(_WIN32) || defined(__unix__) || defined(__APPLE__) // Use .def files for these
#define _EXPORT
--
2.45.1

View File

@@ -8,26 +8,26 @@ COPYRIGHT="2005-2021 Intel Corporation"
LICENSE="Apache v2"
REVISION="1"
SOURCE_URI="https://github.com/oneapi-src/oneTBB/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="b182c73caaaabc44ddc5ad13113aca7e453af73c1690e4061f71dfe4935d74e8"
CHECKSUM_SHA256="487023a955e5a3cc6d3a0d5f89179f9b6c0ae7222613a7185b0227ba0c83700b"
SOURCE_DIR="oneTBB-$portVersion"
PATCHES="tbb-$portVersion.patchset"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
libtbbVersion="12.1"
libtbbVersion="12.10"
libtbbVersionCompat="$libtbbVersion compat >= ${libtbbVersion%%.*}"
libtbbbindVersion="3.1"
libtbbbindVersion="3.10"
libtbbbindVersionCompat="$libtbbbindVersion compat >= ${libtbbbindVersion%%.*}"
libtbbmallocVersion="2.1"
libtbbmallocVersion="2.10"
libtbbmallocVersionCompat="$libtbbmallocVersion compat >= ${libtbbmallocVersion%%.*}"
libtbbmalloc_proxyVersion="2.1"
libtbbmalloc_proxyVersion="2.10"
libtbbmalloc_proxyVersionCompat="$libtbbmalloc_proxyVersion compat >= ${libtbbmalloc_proxyVersion%%.*}"
PROVIDES="
tbb$secondaryArchSuffix = $portVersion
lib:libtbb$secondaryArchSuffix = $libtbbVersionCompat
lib:libtbbbind_2_0$secondaryArchSuffix = $libtbbbindVersionCompat
lib:libtbbbind_2_5$secondaryArchSuffix = $libtbbbindVersionCompat
lib:libtbbmalloc$secondaryArchSuffix = $libtbbmallocVersionCompat
lib:libtbbmalloc_proxy$secondaryArchSuffix = $libtbbmalloc_proxyVersionCompat
"
@@ -39,7 +39,7 @@ REQUIRES="
PROVIDES_devel="
tbb${secondaryArchSuffix}_devel = $portVersion
devel:libtbb$secondaryArchSuffix = $libtbbVersionCompat
devel:libtbbbind_2_0$secondaryArchSuffix = $libtbbbindVersionCompat
devel:libtbbbind_2_5$secondaryArchSuffix = $libtbbbindVersionCompat
devel:libtbbmalloc$secondaryArchSuffix = $libtbbmallocVersionCompat
devel:libtbbmalloc_proxy$secondaryArchSuffix = $libtbbmalloc_proxyVersionCompat
"
@@ -49,18 +49,19 @@ REQUIRES_devel="
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
hwloc2${secondaryArchSuffix}_tools >= 2.9
devel:libhwloc$secondaryArchSuffix >= 15.6.4
hwloc2${secondaryArchSuffix}_tools >= 2.10
devel:libhwloc$secondaryArchSuffix >= 15.7.0
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
defineDebugInfoPackage tbb$secondaryArchSuffix \
$libDir/libtbb.so.$libtbbVersion \
$libDir/libtbbbind_2_0.so.$libtbbbindVersion \
$libDir/libtbbbind_2_5.so.$libtbbbindVersion \
$libDir/libtbbmalloc.so.$libtbbmallocVersion \
$libDir/libtbbmalloc_proxy.so.$libtbbmalloc_proxyVersion
@@ -71,7 +72,7 @@ BUILD()
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
$cmakeDirArgs \
-DTBB_STRICT=OFF \
-DTBB_TEST=ON
-DTBB_TEST=OFF
make $jobArgs
}
@@ -82,9 +83,10 @@ INSTALL()
make install
prepareInstalledDevelLibs libtbb \
libtbbbind_2_0 \
libtbbbind_2_5 \
libtbbmalloc \
libtbbmalloc_proxy
fixPkgconfig
# devel package
packageEntries devel \