CMakeFiles/zdoom.dir/scripting/vm/jit_runtime.cpp.o: In function `JitRelease()':
jit_runtime.cpp:(.text+0x3cc): undefined reference to `__deregister_frame'
CMakeFiles/zdoom.dir/scripting/vm/jit_runtime.cpp.o: In function `CreateUnwindInfoUnix(asmjit::CCFunc*, unsigned int&) [clone .constprop.25]':
jit_runtime.cpp:(.text+0xc9c): undefined reference to `asmjit::X86Assembler::X86Assembler(asmjit::CodeHolder*)'
jit_runtime.cpp:(.text+0x1844): undefined reference to `asmjit::X86Assembler::~X86Assembler()'
jit_runtime.cpp:(.text+0x1aec): undefined reference to `asmjit::X86Assembler::~X86Assembler()'
CMakeFiles/zdoom.dir/scripting/vm/jit_runtime.cpp.o: In function `AddJitFunction(asmjit::CodeHolder*, JitCompiler*)':
jit_runtime.cpp:(.text+0x1ce4): undefined reference to `__register_frame'
CMakeFiles/zdoom.dir/scripting/vm/jit.cpp.o: In function `JitCompile(VMScriptFunction*)':
jit.cpp:(.text+0x4744): undefined reference to `asmjit::X86Compiler::X86Compiler(asmjit::CodeHolder*)'
jit.cpp:(.text+0x4880): undefined reference to `asmjit::X86Compiler::~X86Compiler()'
CMakeFiles/zdoom.dir/scripting/vm/jit.cpp.o: In function `JitCompiler::Codegen()':
jit.cpp:(.text+0x53d0): undefined reference to `asmjit::X86Compiler::finalize()'
CMakeFiles/zdoom.dir/scripting/vm/jit.cpp.o: In function `JitDumpLog(_IO_FILE*, VMScriptFunction*)':
jit.cpp:(.text+0x6260): undefined reference to `asmjit::X86Compiler::X86Compiler(asmjit::CodeHolder*)'
jit.cpp:(.text+0x63ac): undefined reference to `asmjit::X86Compiler::~X86Compiler()'
CMakeFiles/zdoom.dir/scripting/vm/jit.cpp.o: In function `JitCompiler::~JitCompiler()':
jit.cpp:(.text._ZN11JitCompilerD2Ev[_ZN11JitCompilerD5Ev]+0x6c): undefined reference to `asmjit::X86Compiler::~X86Compiler()'
collect2: error: ld returned 1 exit status
src/CMakeFiles/zdoom.dir/build.make:12816: recipe for target 'gzdoom' failed
make[2]: *** [gzdoom] Error 1
CMakeFiles/Makefile2:1031: recipe for target 'src/CMakeFiles/zdoom.dir/all' failed
make[1]: *** [src/CMakeFiles/zdoom.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
Are you linking the legacy version or the modern version? 32-bit or 64-bit? Either way, unless ARM SOC's get a GPU upgrade, I am not sure how much is worth investing in this.
This is mostly a question of fixing CMakeLists.txt to not include the jit*.cpp files when asmjit isn't included. There may be 4 functions that also needs empty dummy functions (JitCompile, JitDumpLog, JitRelease and JitCaptureStackTrace).
I am not sure, but I have a sneaky suspicion that it would link properly on 32-bit due to the exceptions already put in place for IA32 to allow linking. That is the reason why I am asking her these questions. I want to fix this, but I also want to do the fix right, and if ARM32 is working and ARM64 is not, then it's just a question of detecting the architecture and not the bits.
The way I made x86 work was a bit of a hack. Asmjit does have x86 support, so it links it in and it could theoretically even run the JIT there with no linker errors. It is mainly because it is crashing and I don't want to fix the pointer size related bugs.
ARM is different because here there is no Asmjit support. CMake correctly identifies this and doesn't link in asmjit - hence the linker errors. In other words, to make it work on ARM the code needs to stop calling Asmjit functions completely. This is easiest done by not including the jit*.cpp files and then make stubs for the outer interface (the four functions I mentioned).