mame: fix ppc64 builds, fix ELF in /usr/share

[ci skip]
This commit is contained in:
q66 2018-12-20 18:16:33 +01:00 committed by Helmut Pozimski
parent ab58df2966
commit 718cf88e8d
4 changed files with 42 additions and 7 deletions

View file

@ -1,7 +1,7 @@
#!/bin/sh
exec_mame() {
/usr/share/mame/mame \
/usr/libexec/mame/mame \
-artpath "$HOME/.mame/artwork;artwork" \
-ctrlrpath "$HOME/.mame/ctrlr;ctrlr" \
-inipath $HOME/.mame/ini \
@ -41,5 +41,5 @@ elif [ ! -e $HOME/.mame ]; then
cd $HOME/.mame && exec_mame
else
cd /usr/share/mame
./mame "$@"
/usr/libexec/mame/mame "$@"
fi

View file

@ -1,7 +1,7 @@
#!/bin/sh
exec_mess() {
/usr/share/mame/mess \
/usr/libexec/mame/mess \
-artpath "$HOME/.mess/artwork;artwork" \
-ctrlrpath "$HOME/.mess/ctrlr;ctrlr" \
-inipath $HOME/.mess/ini \
@ -41,5 +41,5 @@ elif [ ! -e $HOME/.mess ]; then
cd $HOME/.mess && exec_mess
else
cd /usr/share/mame
./mame "$@"
/usr/libexec/mame/mess "$@"
fi

View file

@ -0,0 +1,35 @@
--- 3rdparty/bx/include/bx/platform.h
+++ 3rdparty/bx/include/bx/platform.h
@@ -133,8 +133,14 @@
#endif //
#if BX_CPU_PPC
-# undef BX_CPU_ENDIAN_BIG
-# define BX_CPU_ENDIAN_BIG 1
+// _LITTLE_ENDIAN exists on ppc64le.
+# if _LITTLE_ENDIAN
+# undef BX_CPU_ENDIAN_LITTLE
+# define BX_CPU_ENDIAN_LITTLE 1
+# else
+# undef BX_CPU_ENDIAN_BIG
+# define BX_CPU_ENDIAN_BIG 1
+# endif
#else
# undef BX_CPU_ENDIAN_LITTLE
# define BX_CPU_ENDIAN_LITTLE 1
--- makefile
+++ makefile
@@ -394,6 +394,12 @@ BIGENDIAN := 1
endif
endif # BIGENDIAN
+# Work around an issue with long doubles on ppc64 (#3157)
+ifneq (,$(findstring ppc64,$(UNAME)))
+ARCHOPTS_C += -mlong-double-64
+ARCHOPTS_CXX += -mlong-double-64
+endif
+
ifndef PYTHON_EXECUTABLE
PYTHON := python
else

View file

@ -52,7 +52,7 @@ do_build() {
i686*) # Overcome linker memory exhaustion
opts+=" SYMBOLS=0"
;;
x86_64*|aarch64*)
x86_64*|aarch64*|ppc64*)
opts+=" PTR64=1"
;;
esac
@ -78,13 +78,13 @@ do_install() {
# Install the main application(s)
for f in mame mame64 mamearcade mamearcade64; do
if [ -r ${f} ]; then
vinstall ${f} 755 usr/share/${pkgname} mame
vinstall ${f} 755 usr/libexec/${pkgname} mame
break
fi
done
for f in mess mess64; do
if [ -r ${f} ]; then
vinstall ${f} 755 usr/share/${pkgname} mess
vinstall ${f} 755 usr/libexec/${pkgname} mess
break
fi
done