tbb: Fix build with musl
PATCH 1/1 tbb: Fix build with musl
Signed-off-by Khem Raj <[email protected]>
--- ...Musl-linux-can-not-use-RTLD_DEEPBIND.patch | 33 +++++++++++++++++++ meta-oe/recipes-support/tbb/tbb_2021.4.0.bb | 1 + 2 files changed, 34 insertions(+) create mode 100644 meta-oe/recipes-support/tbb/tbb/0001-Musl-linux-can-not-use-RTLD_DEEPBIND.patch
meta-oe/recipes-support/tbb/tbb/0001-Musl-linux-can-not-use-RTLD_DEEPBIND.patch new file +33 -0
@@ -0,0 +1,33 @@ +From a7289eeff4ac9e3ca2d2289672c923518433124c Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Wed, 8 Dec 2021 09:26:58 -0800 +Subject: [PATCH] Musl/linux can not use RTLD_DEEPBIND + +Exclude non-glibc linux systems along with android +Fixes +src/tbb/dynamic_link.cpp:417:29: error: use + of undeclared identifier 'RTLD_DEEPBIND' | flags = flags | RTLD_DEEPBIND; +| ^ + +Upstream-Status: Submitted [https://github.com/oneapi-src/oneTBB/pull/684] +Signed-off-by: Khem Raj <[email protected]> +--- + src/tbb/dynamic_link.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/tbb/dynamic_link.cpp b/src/tbb/dynamic_link.cpp +index 12f35cfd..942c1c64 100644 +--- a/src/tbb/dynamic_link.cpp ++++ b/src/tbb/dynamic_link.cpp +@@ -413,7 +413,7 @@ namespace r1 { + int flags = RTLD_NOW; + if (local_binding) { + flags = flags | RTLD_LOCAL; +-#if __linux__ && !__ANDROID__ && !__TBB_USE_SANITIZERS ++#if (__linux__ && __GLIBC__) && !__TBB_USE_SANITIZERS + flags = flags | RTLD_DEEPBIND; + #endif + } else { +-- +2.34.1 +
meta-oe/recipes-support/tbb/tbb_2021.4.0.bb +1 -0
@@ -17,6 +17,7 @@ SRC_URI = "git://github.com/oneapi-src/oneTBB.git;protocol=https;branch=${BRANCH file://0001-mallinfo-is-glibc-specific-API-mark-it-so.patch \ file://0001-CMakeLists.txt-exclude-riscv64-riscv32.patch \ file://0001-Disable-use-of-_tpause-instruction.patch \ + file://0001-Musl-linux-can-not-use-RTLD_DEEPBIND.patch \ " S = "${WORKDIR}/git"
Signature · 1 line
2.34.1