Package: mame
Version: 0.173-6
Severity: important
Tags: sid + patch
Justification: FTBFS
User: [email protected]
Usertags: mips-patch
Hello,
Package mame FTBFS on mips64el with following error:
g++: error: unrecognized command line option '-m64'
build log:
https://buildd.debian.org/status/fetch.php?pkg=mame&arch=mips64el&ver=0.173-6&stamp=1464007306
-m64 flag is not supported on mips64el.
I have created two patches. One patch is to remove -m64 flag for mips64el.
The other patch is for debian/rules, it adds -no-keep-memory flag for mips64el
to fix linker issues with memory consumption.
Patches are tested on mips64el, i386 and amd64.
With these patches package was build successfully.
Please include these patches.
Thank you!
Regards,
Daniel
--- mame-0.173/debian/rules 2016-05-21 00:43:02.000000000 +0000
+++ ../mame/mame-0.173/debian/rules 2016-06-16 14:56:33.000000000 +0000
@@ -95,9 +95,7 @@
endif
ifeq ($(DEB_BUILD_ARCH),mips64el)
-DEB_OPTS += \
- PTR64=1 \
- NOASM=
+export DEB_LDFLAGS_MAINT_APPEND = -Wl,--no-keep-memory
endif
ifeq ($(DEB_BUILD_ARCH),powerpc)
--- mame-0.173.orig/makefile
+++ mame-0.173/makefile
@@ -150,6 +150,9 @@ endif
ifneq ($(filter powerpc,$(UNAME_P)),)
PLATFORM := powerpc
endif
+ifneq ($(filter mips64%,$(UNAME_M)),)
+PLATFORM := mips64
+endif
ifeq ($(firstword $(filter Linux,$(UNAME))),Linux)
OS := linux
endif
--- mame-0.173.orig/scripts/genie.lua
+++ mame-0.173/scripts/genie.lua
@@ -1005,6 +1005,12 @@ if (_OPTIONS["PLATFORM"]=="arm64") then
}
end
+if (_OPTIONS["PLATFORM"]=="mips64") then
+ defines {
+ "PTR64=1",
+ }
+end
+
local subdir
if (_OPTIONS["target"] == _OPTIONS["subtarget"]) then
subdir = _OPTIONS["osd"] .. "/" .. _OPTIONS["target"]