No love for PowerPC from MAME
Besides a minor fix for one of their upstream libraries on little-endian PowerPC, the most straightforward workaround to get MAME up on the Talos II is to simply use 64-bit long doubles by setting the compiler flag -mlong-double-64. This is admittedly a non-standard ABI option but appears to work just fine as the screenshot demonstrates. However, rather than allow this (hopefully temporary) workaround to fix the platform given that the gcc issue is longstanding and apparently difficult to resolve, the MAME team decided not to allow any such workaround even given that it clearly wouldn't affect anything else. It's their project, but I really think that sucks, because it means MAME won't build on any PowerPC system out of the box for the foreseeable near future.
You have two options. The first is to change the makefile and/or set the appropriate compile-time options to use clang instead of gcc. I haven't tested this and clang isn't my preferred compiler on Power ISA as it's less mature on this architecture, but it is a supported compiler at least for MAME on macOS, so it should work. You'll still need the bx patch below right now (read on) if you're building on ppc64le.
Otherwise, you can apply the patch that was rejected to get gcc builds working. You'll still need the bx portion of this diff right now for either compiler on little-endian systems, though hopefully at some future point the bx patch will be accepted upstream and merged back to MAME. Again, as a non-standard ABI there is the potential for conflict with code that may not expect the altered datatype, but this is the build I currently use myself and at least as of this writing seems to work.
Note that musl *always* uses -mlong-double-64, so this should not need any compiler flags nor hacking on Adélie Linux.
ReplyDeletehttps://twitter.com/gnutools/status/1076293409336451072
ReplyDeleteVery nice. Updated and I did a successive post after a little more research based on the reply you got.
Delete