Solene Rapenne <sol...@perso.pw> wrote: > the following diff add a patch file used only when using clang, so it links to > c++abi correctly. > > Thanks to naddy@ for his explanations about the work required for fixing it. > > I found the PATCH_LIST idea from games/xkobo >
new diff, uses PROPERTIES:Mlld instead of reusing the clang if compiles and run fine on amd64 Index: Makefile =================================================================== RCS file: /data/cvs/ports/games/tome4/Makefile,v retrieving revision 1.18 diff -u -p -r1.18 Makefile --- Makefile 4 Sep 2018 12:46:13 -0000 1.18 +++ Makefile 30 Oct 2018 17:57:58 -0000 @@ -54,6 +54,12 @@ COMPILER_LANGS = c WANTLIB-main += c++abi .endif +# lld requires linking against c++abi for libunwind +# symbols needed by luajit +.if ${PROPERTIES:Mlld} +PATCH_LIST = patch-* lld-linking +.endif + NO_TEST = Yes USE_GMAKE = Yes Index: patches/lld-linking =================================================================== RCS file: patches/lld-linking diff -N patches/lld-linking --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/lld-linking 30 Oct 2018 17:56:04 -0000 @@ -0,0 +1,15 @@ +$OpenBSD: patch-build_te4core_lua,v 1.2 2018/04/29 10:21:35 solene Exp $ + +link against libc++abi to access libunwind symbols needed by luajit + +Index: build/te4core.lua +--- build/te4core.lua.orig ++++ build/te4core.lua +@@ -50,6 +50,7 @@ project "TEngine" + if _OPTIONS.relpath == "64" then defines{"TE4_RELPATH64"} end + + links { "m" } ++ links { "c++abi" } + + if _OPTIONS.no_rwops_size then defines{"NO_RWOPS_SIZE"} end +