yvt / openspades

Compatible client of Ace of Spades 0.75
http://openspades.yvt.jp/
GNU General Public License v3.0
1.13k stars 218 forks source link

Current version of angelscript cannot compile on apple m1. #981

Open Fran6nd opened 2 years ago

Fran6nd commented 2 years ago

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 :)

devnexen commented 2 years ago

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).

yvt commented 2 years ago

Linux counterpart: #906

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