Skip to contentSkip to conversation

tbb: Link with libatomic when using clang compiler on rv32

PATCH New Khem Raj 1 participant 1 message Oct 25, 2021

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 tbb: Link with libatomic when using clang compiler on rv32

This helps fixing opencv builds where lack of libatomic link in tbb ends up with build failures e.g.

riscv32-yoe-linux-ld: lib/libopencv_core.so.4.5.2: undefined reference to `__atomic_fetch_add_8'

---
 meta-oe/recipes-support/tbb/tbb_2021.2.0.bb | 1 +
 1 file changed, 1 insertion(+)
meta-oe/recipes-support/tbb/tbb_2021.2.0.bb +1 -0
index 36ca8f91ae..c726bef3b5 100644
@@ -45,6 +45,7 @@ ASNEEDED = ""
 
 LDFLAGS:append:mips = " -latomic"
 LDFLAGS:append:mipsel = " -latomic"
+LDFLAGS:append:riscv32:toolchain-clang = " -latomic"
 
 LDFLAGS:append:libc-musl = " -lucontext"
 
Signature · 1 line
2.33.1