devel/onetbb: fix build on powerpc
/wrkdirs/usr/ports/devel/onetbb/work/oneTBB-2021.2.0/src/tbb/tools_api/ittnotify_config.h:338:12: error: use of undeclared identifier '__TBB_machine_fetchadd4' return __TBB_machine_fetchadd4(ptr, 1) + 1L; Patch taken from https://github.com/oneapi-src/oneTBB/issues/186.
This commit is contained in:
parent
5985a22c6f
commit
122b7f1890
2 changed files with 15 additions and 0 deletions
|
@ -39,6 +39,10 @@ OPTIONS_DEFINE= DOCS
|
|||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${ARCH} == powerpc
|
||||
EXTRA_PATCHES= ${FILESDIR}/extra-patch-src_tbb_tools__api_ittnotify__config.h
|
||||
.endif
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA} ${WRKDIR}/onetbb.pc ${STAGEDIR}${PREFIX}/libdata/pkgconfig
|
||||
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
--- src/tbb/tools_api/ittnotify_config.h.orig 2021-06-30 18:42:09 UTC
|
||||
+++ src/tbb/tools_api/ittnotify_config.h
|
||||
@@ -335,7 +335,7 @@ ITT_INLINE long
|
||||
__itt_interlocked_increment(volatile long* ptr) ITT_INLINE_ATTRIBUTE;
|
||||
ITT_INLINE long __itt_interlocked_increment(volatile long* ptr)
|
||||
{
|
||||
- return __TBB_machine_fetchadd4(ptr, 1) + 1L;
|
||||
+ return __atomic_fetch_add(ptr, 1L, __ATOMIC_SEQ_CST) + 1L;
|
||||
}
|
||||
#endif /* ITT_SIMPLE_INIT */
|
||||
|
Loading…
Reference in a new issue