openspades icon indicating copy to clipboard operation
openspades copied to clipboard

Current version of angelscript cannot compile on apple m1.

Open Fran6nd opened this issue 2 years ago • 2 comments

Hi guys,

It seems that the current version of angelscript cannot compile on mac M1:

/home/fne/dev/openspades-hack/Sources/AngelScript/source/as_callfunc_x64_gcc.cpp: In function ‘asQWORD X64_CallFunction(const asQWORD*, int, funcptr_t, asQWORD&, bool)’:
/home/fne/dev/openspades-hack/Sources/AngelScript/source/as_callfunc_x64_gcc.cpp:162:82: error: unknown register name ‘%rcx’ in ‘asm’
  162 | "%rax", "%rdx", "%rcx", "%r8", "%r9", "%r10", "%r11", "%r15");
      |                                                              ^

/home/fne/dev/openspades-hack/Sources/AngelScript/source/as_callfunc_x64_gcc.cpp:162:82: error: unknown register name ‘%rdx’ in ‘asm’
/home/fne/dev/openspades-hack/Sources/AngelScript/source/as_callfunc_x64_gcc.cpp:162:82: error: unknown register name ‘%rax’ in ‘asm’
/home/fne/dev/openspades-hack/Sources/AngelScript/source/as_callfunc_x64_gcc.cpp:162:82: error: unknown register name ‘%rsi’ in ‘asm’
/home/fne/dev/openspades-hack/Sources/AngelScript/source/as_callfunc_x64_gcc.cpp:162:82: error: unknown register name ‘%rdi’ in ‘asm’
/home/fne/dev/openspades-hack/Sources/AngelScript/source/as_callfunc_x64_gcc.cpp:162:82: error: unknown register name ‘%xmm7’ in ‘asm’
/home/fne/dev/openspades-hack/Sources/AngelScript/source/as_callfunc_x64_gcc.cpp:162:82: error: unknown register name ‘%xmm6’ in ‘asm’
/home/fne/dev/openspades-hack/Sources/AngelScript/source/as_callfunc_x64_gcc.cpp:162:82: error: unknown register name ‘%xmm5’ in ‘asm’
/home/fne/dev/openspades-hack/Sources/AngelScript/source/as_callfunc_x64_gcc.cpp:162:82: error: unknown register name ‘%xmm4’ in ‘asm’
/home/fne/dev/openspades-hack/Sources/AngelScript/source/as_callfunc_x64_gcc.cpp:162:82: error: unknown register name ‘%xmm3’ in ‘asm’
/home/fne/dev/openspades-hack/Sources/AngelScript/source/as_callfunc_x64_gcc.cpp:162:82: error: unknown register name ‘%xmm2’ in ‘asm’
/home/fne/dev/openspades-hack/Sources/AngelScript/source/as_callfunc_x64_gcc.cpp:162:82: error: unknown register name ‘%xmm1’ in ‘asm’
/home/fne/dev/openspades-hack/Sources/AngelScript/source/as_callfunc_x64_gcc.cpp:162:82: error: unknown register name ‘%xmm0’ in ‘asm’
make[2]: *** [Sources/AngelScript/projects/cmake/CMakeFiles/Angelscript.dir/build.make:128: Sources/AngelScript/projects/cmake/CMakeFiles/Angelscript.dir/__/__/source/as_callfunc_x64_gcc.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:269: Sources/AngelScript/projects/cmake/CMakeFiles/Angelscript.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

I am working on it but just to report :)

Fran6nd avatar Oct 29 '21 15:10 Fran6nd

assuming you mention the arm 64 version, can you possibly compile it in rosetta mode eventually ? looking at the svn repo, the arm64 code path is not here for darwin devices (which can't be the same as linux arm64).

devnexen avatar Oct 31 '21 11:10 devnexen

Linux counterpart: #906

Let's keep the issues separated because each platform likely needs a slightly different implementation.

yvt avatar Dec 10 '21 16:12 yvt