<div dir="ltr"><div>Hello,</div><div><br></div><div>I'm trying to cross compile an executable that's using pthread. Target is armv7-linux-gnueabihf. I'm using the latest raspberry pi os as sysroot. I've managed to successfully build llvm, clang + all the runtimes and I'm trying to build a statically linked executable that's using as less GNU stuff as possible.</div><div><br></div><div>clang++ -sysroot=...  -stdlib=libc++ --rtlib=compiler-rt -static -resource-dir ... -fuse-ld=lld -lc++abi -lunwind test.cpp</div><div><br></div><div>The linker error I'm getting is:</div><div><br></div><div>ld.lld: error: undefined symbol: _Unwind_ForcedUnwind<br>>>> referenced by unwind.c:121<br>>>>               unwind.o:(__pthread_unwind) in archive path-to-sysroot/usr/lib/arm-linux-gnueabihf/libpthread.a</div><div><br></div><div>Peeking at libunwind's internals, it seems clear there's no 
_Unwind_ForcedUnwind built for ARM (at least not with default options). What options do I have?</div><div><br></div><div>1) Should I add some options when building libunwind so I get 
_Unwind_ForcedUnwind? I'm not sure this is even possible</div><div>2) Use libgcc?</div><div><br></div><div>Thanks,</div><div>Andrei<br></div><div><br>

</div></div>