void-packages/srcpkgs/mednafen/patches/ppc.patch
q66 2e36f254e9 mednafen: fix build, add ppc patches, altivec option
Previously, mednafen wouldn't even build because of the aclocal
related issues and also that the libcdio option hasn't existed
in it in ages. So fixed that + added an altivec option for ppc
(enabled by default on ppc64, otherwise disabled) and ppc64
elfv2 libco impl from bsnes/higan.
2019-07-25 00:20:52 +02:00

25 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