TBB: qemuppc build failure with lastest 2021.3
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 2 lines · Khem Raj
send a patch to disable it for ppc
Sent!
Sau!
Quoted 49 lines · Saul Wold
Quoted 48 lines
Naveen:
Looks like the latest version of TBB does not build correctly for PPC machine targets (qemuppc for sure), it builds for qemuppc64
The failure seems to be the handling of
__TBB_machine_fetch4()definition below, particularly theITT_ARCHcheck for PPC64 but not PPC.
/srv/nvme/yocto/hardknott/builds/tbb/tmp/work/ppc7400-poky-linux/tbb/2021.2.0-r0/git/src/tbb/tools_api/ittnotify_config.h:338:12: error: '__TBB_machine_fetchadd4' was not declared in this scope 338 | return__TBB_machine_fetchadd4(ptr, 1)+ 1L;
| ^~~~~~~~~~~~~~~~~~~~~~~Is TBB supported for PPC?
Thanks
Sau!#if ITT_ARCH==ITT_ARCH_IA64
#ifdef__INTEL_COMPILER
#define__TBB_machine_fetchadd4(addr, val)__fetchadd4_acq((void *)addr, val)#else /*__INTEL_COMPILER*/
/* TODO: Add Support for not Intel compilers for IA-64 architecture */ #endif /*__INTEL_COMPILER*/
#elif ITT_ARCH==ITT_ARCH_IA32 || ITT_ARCH==ITT_ARCH_IA32E /* ITT_ARCH!=ITT_ARCH_IA64 */ITT_INLINElong__TBB_machine_fetchadd4(volatile void* ptr, long addend)ITT_INLINE_ATTRIBUTE;ITT_INLINElong__TBB_machine_fetchadd4(volatile void* ptr, long addend){
long result;
__asm____volatile__("lock\nxadd %0,%1"
: "=r"(result),"=m"(*(int*)ptr)
: "0"(addend), "m"(*(int*)ptr)
: "memory");
return result;
}
#elif ITT_ARCH==ITT_ARCH_ARM || ITT_ARCH==ITT_ARCH_PPC64
#define__TBB_machine_fetchadd4(addr, val)__sync_fetch_and_add(addr, val)#endif /* ITT_ARCH==ITT_ARCH_IA64 */
#ifndefITT_SIMPLE_INITITT_INLINElong__itt_interlocked_increment(volatile long* ptr)ITT_INLINE_ATTRIBUTE;ITT_INLINElong__itt_interlocked_increment(volatile long* ptr)
{
return__TBB_machine_fetchadd4(ptr, 1)+ 1L;
}
#endif /*ITT_SIMPLE_INIT*/
Signature · 1 line
Sau!