void-packages/srcpkgs/mednafen/patches/ppc.patch

26 lines
900 B
Diff

This fixes arch detection on all ppc as well as some incorrect handling
of endianness on little endian ppc64.
--- configure.ac 2019-01-28 06:52:37.000000000 +0000
+++ configure.ac 2019-03-24 22:30:31.180000000 +0000
@@ -765,7 +765,7 @@
AM_CONDITIONAL(ARCH_X86_32, true)
;;
- powerpc)
+ powerpc*|ppc*)
AC_DEFINE([ARCH_POWERPC], [1], [Define if we are compiling for PPC architectures.])
AM_CONDITIONAL(ARCH_POWERPC, true)
--- src/snes/src/lib/nall/detect.hpp
+++ src/snes/src/lib/nall/detect.hpp
@@ -21,7 +21,7 @@
/* Endian detection */
-#if defined(__i386__) || defined(__amd64__) || defined(_M_IX86) || defined(_M_AMD64)
+#if defined(__i386__) || defined(__amd64__) || defined(_M_IX86) || defined(_M_AMD64) || defined(__LITTLE_ENDIAN__)
#define ARCH_LSB
#elif defined(__powerpc__) || defined(_M_PPC) || defined(__BIG_ENDIAN__)
#define ARCH_MSB