From: drahn Date: Fri, 14 May 2021 02:29:00 +0000 (+0000) Subject: On riscv64, dynamically linked clang binary fails with: X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=51f1a9bf6af6d056fa64b2087147b6b8b973f668;p=openbsd On riscv64, dynamically linked clang binary fails with: libc++abi: Pure virtual function called! By statically linking clang (and *-tblgen) this problem is worked around at least for now. --- diff --git a/gnu/usr.bin/clang/Makefile.inc b/gnu/usr.bin/clang/Makefile.inc index 17f932106d9..4928765acb4 100644 --- a/gnu/usr.bin/clang/Makefile.inc +++ b/gnu/usr.bin/clang/Makefile.inc @@ -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=