summaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorNaveen Saini <naveen.kumar.saini@intel.com>2023-01-04 17:39:05 +0800
committerKhem Raj <raj.khem@gmail.com>2023-01-06 11:38:16 -0800
commit211e4988da40f49d46a81017b3047b002b0812b4 (patch)
treeb7206846cb8f398eec71b7c97dc7cd5f8bfc5c54 /meta-oe
parent1c436070697d3340f71fc8b678e0f6241806786b (diff)
downloadmeta-openembedded-211e4988da40f49d46a81017b3047b002b0812b4.tar.gz
tbb: upgrade 2021.5.0 -> 2021.7.0
Drop patches which are already merged. Also drop which are not required anymore. Tested following machines with both gcc and clang: qemuarm qemuarm64 qemuriscv32 qemuriscv64 Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-support/tbb/tbb/0001-Disable-LTO-on-clang-riscv32.patch29
-rw-r--r--meta-oe/recipes-support/tbb/tbb/0001-Disable-use-of-_tpause-instruction.patch29
-rw-r--r--meta-oe/recipes-support/tbb/tbb/0001-Musl-linux-can-not-use-RTLD_DEEPBIND.patch33
-rw-r--r--meta-oe/recipes-support/tbb/tbb/0001-mallinfo-is-glibc-specific-API-mark-it-so.patch33
-rw-r--r--meta-oe/recipes-support/tbb/tbb_2021.7.0.bb (renamed from meta-oe/recipes-support/tbb/tbb_2021.5.0.bb)13
5 files changed, 6 insertions, 131 deletions
diff --git a/meta-oe/recipes-support/tbb/tbb/0001-Disable-LTO-on-clang-riscv32.patch b/meta-oe/recipes-support/tbb/tbb/0001-Disable-LTO-on-clang-riscv32.patch
deleted file mode 100644
index 662065635..000000000
--- a/meta-oe/recipes-support/tbb/tbb/0001-Disable-LTO-on-clang-riscv32.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1From 95a5c97122b7c5bdeba61f2e890bae9a961dd4bf Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 8 Dec 2021 10:01:22 -0800
4Subject: [PATCH] Disable LTO on clang/riscv
5
6With clang in OE LTO does not work as it does not seem to carry right
7target info and mixes ABIs
8
9| Hard-float 'd' ABI can't be used for a target that doesn't support the D instruction set extension (ignoring target-abi)
10| /mnt/b/yoe/master/build/tmp/work/riscv32-yoe-linux/tbb/1_2021.4.0-r0/recipe-sysroot-native/usr/bin/riscv32-yoe-linux/riscv32-yoe-linux-ld: /tmp/lto-llvm-3fb1bf.o: can't link soft-float modules with double-float modules
11| /mnt/b/yoe/master/build/tmp/work/riscv32-yoe-linux/tbb/1_2021.4.0-r0/recipe-sysroot-native/usr/bin/riscv32-yoe-linux/riscv32-yoe-linux-ld: failed to merge target specific data of file /tmp/lto-llvm-3fb1bf.o
12
13Upstream-Status: Inappropriate [ OE-Specific ]
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15---
16 cmake/compilers/Clang.cmake | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19--- a/cmake/compilers/Clang.cmake
20+++ b/cmake/compilers/Clang.cmake
21@@ -60,7 +60,7 @@ endif()
22
23 # Enabling LTO on Android causes the NDK bug.
24 # NDK throws the warning: "argument unused during compilation: '-Wa,--noexecstack'"
25-if (NOT ANDROID_PLATFORM AND BUILD_SHARED_LIBS)
26+if (NOT ANDROID_PLATFORM AND BUILD_SHARED_LIBS AND NOT CMAKE_SYSTEM_PROCESSOR MATCHES "(riscv32|riscv64|arm)")
27 set(TBB_IPO_COMPILE_FLAGS $<$<NOT:$<CONFIG:Debug>>:-flto>)
28 set(TBB_IPO_LINK_FLAGS $<$<NOT:$<CONFIG:Debug>>:-flto>)
29 endif()
diff --git a/meta-oe/recipes-support/tbb/tbb/0001-Disable-use-of-_tpause-instruction.patch b/meta-oe/recipes-support/tbb/tbb/0001-Disable-use-of-_tpause-instruction.patch
deleted file mode 100644
index 78051d7ee..000000000
--- a/meta-oe/recipes-support/tbb/tbb/0001-Disable-use-of-_tpause-instruction.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1From 26bc87fdad9f29c00a5e37d6d9aed7f6dc7ff416 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Mon, 12 Apr 2021 14:15:53 +0800
4Subject: [PATCH] Disable use of _tpause instruction
5
6It is assuming right now that WAITPKG instructions are available when using
7gcc 11 or clang 12. It's possible that we are building for a
8CPU where it's not available - in this case anything older than Alder Lake.
9
10Disable for now until the detection isn't fixed upstream.
11
12Upstream-Status: Inappropriate
13
14Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
15---
16 src/tbb/scheduler_common.h | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19--- a/src/tbb/scheduler_common.h
20+++ b/src/tbb/scheduler_common.h
21@@ -220,7 +220,7 @@ inline void prolonged_pause_impl() {
22 #endif
23
24 inline void prolonged_pause() {
25-#if __TBB_WAITPKG_INTRINSICS_PRESENT && (_WIN32 || _WIN64 || __unix__) && (__TBB_x86_32 || __TBB_x86_64)
26+#if 0
27 if (governor::wait_package_enabled()) {
28 std::uint64_t time_stamp = machine_time_stamp();
29 // _tpause function directs the processor to enter an implementation-dependent optimized state
diff --git a/meta-oe/recipes-support/tbb/tbb/0001-Musl-linux-can-not-use-RTLD_DEEPBIND.patch b/meta-oe/recipes-support/tbb/tbb/0001-Musl-linux-can-not-use-RTLD_DEEPBIND.patch
deleted file mode 100644
index 355cf2e0b..000000000
--- a/meta-oe/recipes-support/tbb/tbb/0001-Musl-linux-can-not-use-RTLD_DEEPBIND.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1From a7289eeff4ac9e3ca2d2289672c923518433124c Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 8 Dec 2021 09:26:58 -0800
4Subject: [PATCH] Musl/linux can not use RTLD_DEEPBIND
5
6Exclude non-glibc linux systems along with android
7Fixes
8src/tbb/dynamic_link.cpp:417:29: error: use
9 of undeclared identifier 'RTLD_DEEPBIND' | flags = flags | RTLD_DEEPBIND;
10| ^
11
12Upstream-Status: Submitted [https://github.com/oneapi-src/oneTBB/pull/684]
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 src/tbb/dynamic_link.cpp | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/src/tbb/dynamic_link.cpp b/src/tbb/dynamic_link.cpp
19index 12f35cfd..942c1c64 100644
20--- a/src/tbb/dynamic_link.cpp
21+++ b/src/tbb/dynamic_link.cpp
22@@ -413,7 +413,7 @@ namespace r1 {
23 int flags = RTLD_NOW;
24 if (local_binding) {
25 flags = flags | RTLD_LOCAL;
26-#if __linux__ && !__ANDROID__ && !__TBB_USE_SANITIZERS
27+#if (__linux__ && __GLIBC__) && !__TBB_USE_SANITIZERS
28 flags = flags | RTLD_DEEPBIND;
29 #endif
30 } else {
31--
322.34.1
33
diff --git a/meta-oe/recipes-support/tbb/tbb/0001-mallinfo-is-glibc-specific-API-mark-it-so.patch b/meta-oe/recipes-support/tbb/tbb/0001-mallinfo-is-glibc-specific-API-mark-it-so.patch
deleted file mode 100644
index 9af37ebc6..000000000
--- a/meta-oe/recipes-support/tbb/tbb/0001-mallinfo-is-glibc-specific-API-mark-it-so.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1From 52c1586bff0ecb418ac21d6678f8963d70959f04 Mon Sep 17 00:00:00 2001
2From: Naveen Saini <naveen.kumar.saini@intel.com>
3Date: Wed, 7 Apr 2021 11:14:13 +0800
4Subject: [PATCH] mallinfo() is glibc specific API mark it so
5
6Helps compiling with musl
7
8Upstream-Status: Pending
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
12---
13 src/tbbmalloc_proxy/proxy.cpp | 2 ++
14 1 file changed, 2 insertions(+)
15
16--- a/src/tbbmalloc_proxy/proxy.cpp
17+++ b/src/tbbmalloc_proxy/proxy.cpp
18@@ -260,6 +260,7 @@ int mallopt(int /*param*/, int /*value*/
19 return 1;
20 }
21
22+#ifdef __GLIBC__
23 struct mallinfo mallinfo() __THROW
24 {
25 struct mallinfo m;
26@@ -267,6 +268,7 @@ struct mallinfo mallinfo() __THROW
27
28 return m;
29 }
30+#endif
31
32 #if __ANDROID__
33 // Android doesn't have malloc_usable_size, provide it to be compatible
diff --git a/meta-oe/recipes-support/tbb/tbb_2021.5.0.bb b/meta-oe/recipes-support/tbb/tbb_2021.7.0.bb
index 0d108f21a..8c72b349d 100644
--- a/meta-oe/recipes-support/tbb/tbb_2021.5.0.bb
+++ b/meta-oe/recipes-support/tbb/tbb_2021.7.0.bb
@@ -12,15 +12,10 @@ DEPENDS:append:libc-musl = " libucontext"
12PE = "1" 12PE = "1"
13 13
14BRANCH = "onetbb_2021" 14BRANCH = "onetbb_2021"
15SRCREV = "3df08fe234f23e732a122809b40eb129ae22733f" 15SRCREV = "7673da272f7e1592876b42cfe98b9f4cadf6ae41"
16SRC_URI = "git://github.com/oneapi-src/oneTBB.git;protocol=https;branch=${BRANCH} \ 16SRC_URI = "git://github.com/oneapi-src/oneTBB.git;protocol=https;branch=${BRANCH} \
17 file://0001-mallinfo-is-glibc-specific-API-mark-it-so.patch \
18 file://0001-CMakeLists.txt-exclude-riscv64-riscv32.patch \ 17 file://0001-CMakeLists.txt-exclude-riscv64-riscv32.patch \
19 file://0001-Disable-use-of-_tpause-instruction.patch \
20 file://0001-Musl-linux-can-not-use-RTLD_DEEPBIND.patch \
21 file://0001-Disable-LTO-on-clang-riscv32.patch \
22" 18"
23
24S = "${WORKDIR}/git" 19S = "${WORKDIR}/git"
25 20
26inherit cmake 21inherit cmake
@@ -30,7 +25,11 @@ EXTRA_OECMAKE += " \
30 -DTBB_TEST=OFF \ 25 -DTBB_TEST=OFF \
31 -DCMAKE_BUILD_TYPE=Release \ 26 -DCMAKE_BUILD_TYPE=Release \
32 " 27 "
33 28# Hard-float 'd' ABI can't be used for a target that doesn't support the D instruction set extension (ignoring target-abi)
29# tmp-glibc/work/riscv64-oe-linux/tbb/1_2021.7.0-r0/recipe-sysroot-native/usr/bin/riscv64-oe-linux/riscv64-oe-linux-ld: /tmp/lto-llvm-264bc2.o: can't link soft-float modules with double-float modules
30# tmp-glibc/work/riscv64-oe-linux/tbb/1_2021.7.0-r0/recipe-sysroot-native/usr/bin/riscv64-oe-linux/riscv64-oe-linux-ld: failed to merge target specific data of file /tmp/lto-llvm-264bc2.o
31EXTRA_OECMAKE:append:riscv32:toolchain-clang = " -DTBB_ENABLE_IPO=OFF "
32EXTRA_OECMAKE:append:riscv64:toolchain-clang = " -DTBB_ENABLE_IPO=OFF "
34 33
35# fails with thumb enabled: 34# fails with thumb enabled:
36# | arm-oe-linux-gnueabi-g++ -march=armv7-a -mthumb -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a9 -mcpu=cortex-a9 -D__ARM__ -D__LINUX_ARM_ARCH__=7 -funwind-tables -mvectorize-with-neon-quad -rdynamic --sysroot=/OE/sysroots/m14tv -c -MMD -DTBB_USE_DEBUG -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -O2 -pipe -g -feliminate-unused-debug-types -fpermissive -fvisibility-inlines-hidden -I../../src -I../../src/rml/include -I../../include ../../src/tbb/concurrent_queue.cpp 35# | arm-oe-linux-gnueabi-g++ -march=armv7-a -mthumb -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a9 -mcpu=cortex-a9 -D__ARM__ -D__LINUX_ARM_ARCH__=7 -funwind-tables -mvectorize-with-neon-quad -rdynamic --sysroot=/OE/sysroots/m14tv -c -MMD -DTBB_USE_DEBUG -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -O2 -pipe -g -feliminate-unused-debug-types -fpermissive -fvisibility-inlines-hidden -I../../src -I../../src/rml/include -I../../include ../../src/tbb/concurrent_queue.cpp