tbb: upgrade 2021.9.0 -> 2021.11.0
PATCH 1/2 tbb: upgrade 2021.9.0 -> 2021.11.0
riscv arch support enabled in this release, so patching for riscv* not required anymore. Drop patch.
Release note:
https://github.com/oneapi-src/oneTBB/releases/tag/v2021.11.0
Signed-off-by Naveen Saini <[email protected]>
---
...akeLists.txt-exclude-riscv64-riscv32.patch | 35 -------------------
.../tbb/{tbb_2021.9.0.bb => tbb_2021.11.0.bb} | 3 +-
2 files changed, 1 insertion(+), 37 deletions(-)
delete mode 100644 meta-oe/recipes-support/tbb/tbb/0001-CMakeLists.txt-exclude-riscv64-riscv32.patch
rename meta-oe/recipes-support/tbb/{tbb_2021.9.0.bb => tbb_2021.11.0.bb} (95%)meta-oe/recipes-support/tbb/tbb/0001-CMakeLists.txt-exclude-riscv64-riscv32.patch deleted +0 -35
@@ -1,35 +0,0 @@ -From cb9e9b5b1ad05dd9de07a65ee7147cdb3433746a Mon Sep 17 00:00:00 2001 -From: Naveen Saini <[email protected]> -Date: Fri, 9 Apr 2021 15:41:35 +0800 -Subject: [PATCH] CMakeLists.txt: exclude riscv64 & riscv32 - -Upstream-Status: Pending - -Signed-off-by: Naveen Saini <[email protected]> ---- - src/tbb/CMakeLists.txt | 2 +- - src/tbbmalloc/CMakeLists.txt | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - ---- a/src/tbb/CMakeLists.txt -+++ b/src/tbb/CMakeLists.txt -@@ -58,7 +58,7 @@ target_compile_definitions(tbb - $<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:__TBB_DYNAMIC_LOAD_ENABLED=0> - $<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:__TBB_SOURCE_DIRECTLY_INCLUDED=1>) - --if (NOT ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "(armv7-a|aarch64|mips|arm64)" OR -+if (NOT ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "(armv7-a|aarch64|mips|arm64|riscv64|riscv32)" OR - "${CMAKE_OSX_ARCHITECTURES}" MATCHES "arm64" OR - WINDOWS_STORE OR - TBB_WINDOWS_DRIVER)) ---- a/src/tbbmalloc/CMakeLists.txt -+++ b/src/tbbmalloc/CMakeLists.txt -@@ -30,7 +30,7 @@ target_compile_definitions(tbbmalloc - $<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:__TBB_DYNAMIC_LOAD_ENABLED=0> - $<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:__TBB_SOURCE_DIRECTLY_INCLUDED=1>) - --if (NOT ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "(armv7-a|aarch64|mips|arm64)" OR -+if (NOT ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "(armv7-a|aarch64|mips|arm64|riscv64|riscv32)" OR - "${CMAKE_OSX_ARCHITECTURES}" MATCHES "arm64" OR - WINDOWS_STORE OR - TBB_WINDOWS_DRIVER OR
meta-oe/recipes-support/tbb/tbb_2021.11.0.bb renamed from meta-oe/recipes-support/tbb/tbb_2021.9.0.bb +1 -2
@@ -12,9 +12,8 @@ DEPENDS:append:libc-musl = " libucontext" PE = "1" BRANCH = "onetbb_2021" -SRCREV = "a00cc3b8b5fb4d8115e9de56bf713157073ed68c" +SRCREV = "8b829acc65569019edb896c5150d427f288e8aba" SRC_URI = "git://github.com/oneapi-src/oneTBB.git;protocol=https;branch=${BRANCH} \ - file://0001-CMakeLists.txt-exclude-riscv64-riscv32.patch \ " S = "${WORKDIR}/git"
Signature · 1 line
2.37.3
PATCH 2/2 tbb: enable NUMA/Hybrid CPU support
oneTBB relies on HWLOC* to identify the underlying topology of the system to optimize thread scheduling and memory allocation.
Ref:
https://oneapi-src.github.io/oneTBB/GSG/next_steps.html#hybrid-cpu-and-numa-support
Signed-off-by Naveen Saini <[email protected]>
--- ....cmake-remove-cross-compiation-check.patch | 33 +++++++++++++++++++ meta-oe/recipes-support/tbb/tbb_2021.11.0.bb | 12 ++++++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-support/tbb/tbb/0001-hwloc_detection.cmake-remove-cross-compiation-check.patch
meta-oe/recipes-support/tbb/tbb/0001-hwloc_detection.cmake-remove-cross-compiation-check.patch new file +33 -0
@@ -0,0 +1,33 @@ +From 7ffc1eba8596544d6e3af0fd5f4004fff6d56f84 Mon Sep 17 00:00:00 2001 +From: Naveen Saini <[email protected]> +Date: Wed, 29 Nov 2023 15:48:57 +0800 +Subject: [PATCH] hwloc_detection.cmake: remove cross-compiation check + +This check is preventing pkgconfig to +search for hwloc under cross-compilation. + +pkgconfig able to find hwloc pkg from sysroot. + +Upstream-Status: Inappropriate + +Signed-off-by: Naveen Saini <[email protected]> +--- + cmake/hwloc_detection.cmake | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/cmake/hwloc_detection.cmake b/cmake/hwloc_detection.cmake +index 47233b17..5a7e84c3 100644 +--- a/cmake/hwloc_detection.cmake ++++ b/cmake/hwloc_detection.cmake +@@ -46,8 +46,6 @@ endforeach() + unset(HWLOC_TARGET_NAME) + + if (NOT HWLOC_TARGET_EXPLICITLY_DEFINED AND +- # No hwloc auto detection for cross compilation +- NOT CMAKE_CROSSCOMPILING AND + NOT TBB_DISABLE_HWLOC_AUTOMATIC_SEARCH + ) + find_package(PkgConfig QUIET) +-- +2.37.3 +
meta-oe/recipes-support/tbb/tbb_2021.11.0.bb +11 -1
@@ -8,22 +8,25 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=86d3f3a95c324c9479bd8986968f4327" DEPENDS:append:libc-musl = " libucontext" +DEPENDS:append:class-target = " hwloc" PE = "1" BRANCH = "onetbb_2021" SRCREV = "8b829acc65569019edb896c5150d427f288e8aba" SRC_URI = "git://github.com/oneapi-src/oneTBB.git;protocol=https;branch=${BRANCH} \ + file://0001-hwloc_detection.cmake-remove-cross-compiation-check.patch \ " S = "${WORKDIR}/git" -inherit cmake +inherit cmake pkgconfig # test build fails, error: 'mallinfo mallinfo()' is deprecated EXTRA_OECMAKE += " \ -DTBB_TEST=OFF \ -DCMAKE_BUILD_TYPE=Release \ " + # Hard-float 'd' ABI can't be used for a target that doesn't support the D instruction set extension (ignoring target-abi) # 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 # 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
@@ -49,4 +52,11 @@ LDFLAGS:append:libc-musl = " -lucontext" # The latest version of oneTBB does not support PPC COMPATIBLE_MACHINE:powerpc = "(!.*ppc).*" + +do_install:append:class-target() { + # fix for qa check buildpaths + sed -i "s#${RECIPE_SYSROOT}##g" ${D}${libdir}/cmake/TBB/TBBTargets.cmake +} + + BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.37.3