libretro / mame2010-libretro

Late 2010 version of MAME (0.139) for libretro. Compatible with MAME 0.139 sets.
32 stars 50 forks source link

ARM64/iOS does not compile #135

Closed jet082 closed 4 years ago

jet082 commented 4 years ago

I got part of the way there by doing the following:

src/emu/eminline.h

result = compare_exchange32((INT32 volatile *)ptr, (INT32)compare, (INT32)exchange); to result = compare_exchange32((INT32 volatile *)ptr, (intptr_t)compare, (intptr_t)exchange);

src/emu/state.h

#include <tr1/type_traits> to #include <type_traits> and #define DEF_NAMESPACE std::tr1 to #define DEF_NAMESPACE std beneath the IOS check

src/emu/tokenize.h

#define TOKEN_VALUE(field,a) { (FPTR)(a) } to #define TOKEN_VALUE(field,a) { (intptr_t)(a) }

src/emu/mmry.h

#define myoffsetof(_struct, _member) ((FPTR)&((_struct *)0x1000)->_member - 0x1000) to #define myoffsetof(_struct, _member) ((intptr_t)&((_struct *)0x1000)->_member - 0x1000)

jet082 commented 4 years ago

Okay, there's a way to compile this. Ignore the op.

src/emu/state.h - change #include <tr1/type_traits> to #include <type_traits> and #define DEF_NAMESPACE std::tr1 to #define DEF_NAMESPACE std beneath the IOS check

Change the Makefile as follows:

1) Change the armv7 to arm64 under the iOS check 2) Change PTR64 = 0 to PTR64 = 1 under the iOS check

Run libretro-build-ios-arm64.sh mame2010

This will compile, but fail in the linking phase. Copy the linking command that fails, cd into the root, and paste it in there replacing the "cc" with "c++" and it will output your dylib.

jet082 commented 4 years ago

This is fixed.