On riscv64, dynamically linked clang binary fails with:
authordrahn <drahn@openbsd.org>
Fri, 14 May 2021 02:29:00 +0000 (02:29 +0000)
committerdrahn <drahn@openbsd.org>
Fri, 14 May 2021 02:29:00 +0000 (02:29 +0000)
libc++abi: Pure virtual function called!

By statically linking clang (and *-tblgen) this problem is worked around
at least for now.

gnu/usr.bin/clang/Makefile.inc

index 17f9321..4928765 100644 (file)
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.22 2021/04/28 12:55:37 patrick Exp $
+# $OpenBSD: Makefile.inc,v 1.23 2021/05/14 02:29:00 drahn Exp $
 
 CLANG_SRCS?=   ${.CURDIR}/../../../llvm/clang
 LLDB_SRCS?=    ${.CURDIR}/../../../llvm/lldb
@@ -16,6 +16,10 @@ CC=          egcc
 CXX=           eg++
 .endif
 
+.if ${MACHINE_ARCH} == "riscv64" 
+LDSTATIC=-static
+.endif
+
 DEBUG=
 NOPIE=