dev-cpp/tbb: fix build on musl

Closes: https://bugs.gentoo.org/830698
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2022-01-16 06:45:33 +00:00
parent 98f12307d0
commit f3cd6cd18b
2 changed files with 26 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
https://github.com/oneapi-src/oneTBB/commit/883c2e5245c39624b3b5d6d56d5b203cf09eac38
https://bugs.gentoo.org/830698
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 15 Dec 2021 08:08:07 -0800
Subject: [PATCH] Musl/linux can not use RTLD_DEEPBIND (#684)
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;
| ^
Signed-off-by: Khem Raj <raj.khem@gmail.com>
--- 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 {

View File

@@ -25,6 +25,7 @@ BDEPEND="virtual/pkgconfig"
PATCHES=(
# should be in.. 2022?
"${FILESDIR}"/${PN}-2021.4.0-lto.patch
"${FILESDIR}"/${PN}-2021.5.0-musl-deepbind.patch
)
src_configure() {