mame: proper fix for powerpc64

Remove the patches and add -mlong-double-64 to the C{,XX}FLAGS for ppc*.
This commit is contained in:
Jürgen Buchmüller 2020-12-31 16:42:59 +01:00
parent 35c6e4c369
commit 8b3336e2de
3 changed files with 7 additions and 31 deletions

View file

@ -1,15 +0,0 @@
--- makefile
+++ makefile
@@ -394,6 +394,12 @@ BIGENDIAN := 1
endif
endif # BIGENDIAN
+# Work around an issue with long doubles on ppc (#3157)
+ifneq (,$(findstring ppc,$(UNAME)))
+ARCHOPTS_C += -mlong-double-64
+ARCHOPTS_CXX += -mlong-double-64
+endif
+
ifndef PYTHON_EXECUTABLE
PYTHON := python
else

View file

@ -1,16 +0,0 @@
--- src/emu/xtal.h 2020-12-30 16:46:10.000000000 +0100
+++ src/emu/xtal.h 2020-12-31 13:41:51.679447004 +0100
@@ -81,8 +81,13 @@
constexpr XTAL operator *(double mult, const XTAL &xtal) { return XTAL(xtal.base(), mult * xtal.dvalue()); }
constexpr XTAL operator ""_Hz_XTAL(long double clock) { return XTAL(double(clock)); }
+#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
+constexpr XTAL operator ""_kHz_XTAL(long double clock) { return XTAL(double(clock) * 1e3); }
+constexpr XTAL operator ""_MHz_XTAL(long double clock) { return XTAL(double(clock) * 1e6); }
+#else
constexpr XTAL operator ""_kHz_XTAL(long double clock) { return XTAL(double(clock * 1e3)); }
constexpr XTAL operator ""_MHz_XTAL(long double clock) { return XTAL(double(clock * 1e6)); }
+#endif
constexpr XTAL operator ""_Hz_XTAL(unsigned long long clock) { return XTAL(double(clock)); }
constexpr XTAL operator ""_kHz_XTAL(unsigned long long clock) { return XTAL(double(clock) * 1e3); }

View file

@ -21,6 +21,13 @@ CFLAGS="-I${XBPS_CROSS_BASE}/usr/include/lua5.3 -I${XBPS_CROSS_BASE}/usr/include
CXXFLAGS="$CFLAGS"
[ "$XBPS_TARGET_LIBC" = musl ] && CXXFLAGS+=" -DBX_CRT_MUSL=1"
case "$XBPS_TARGET_MACHINE" in
ppc*)
CFLAGS+=" -mlong-double-64"
CXXFLAGS+=" -mlong-double-64"
;;
esac
build_options="qt"
build_options_default="qt"