[mame] 01/03: Try to avoid hitting memory limit on 32 bit arches.
Jordi Mallach
jordi at moszumanska.debian.org
Fri May 13 22:41:53 UTC 2016
This is an automated email from the git hooks/post-receive script.
jordi pushed a commit to branch master
in repository mame.
commit c1b1140817bb82e9e2f3b1dd4c69fa298b55ede3
Author: Jordi Mallach <jordi at debian.org>
Date: Sat May 14 00:34:15 2016 +0200
Try to avoid hitting memory limit on 32 bit arches.
---
debian/changelog | 9 +++++++++
debian/rules | 12 ++++++++++--
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 9732923..32e68ed 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+mame (0.173-3) UNRELEASED; urgency=medium
+
+ * Define DEB_HOST_ARCH_BITS and, if the build is for a 32 bit arch,
+ - pass -g0 as CFLAGS.
+ - pass -Wl,--no-keep-memory to the linker.
+ Hopefully this fixes the build on 32 bit architectures.
+
+ -- Jordi Mallach <jordi at debian.org> Sat, 14 May 2016 00:06:00 +0200
+
mame (0.173-2) experimental; urgency=medium
* Add ftbfs_v60_m_fetch_xor.patch: cherrypick from git to fix a compile
diff --git a/debian/rules b/debian/rules
index 31dcd75..5645d8d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,15 +9,23 @@
export DH_VERBOSE = 1
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
+DEB_HOST_ARCH_BITS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_BITS)
# Define DEB_HOST_MULTIARCH for QT prefix handling
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
-export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed,--no-keep-memory
-
# add c++ hardening options (upstream makefile doesn't use CPPFLAGS)
export DEB_CFLAGS_MAINT_APPEND = $(shell dpkg-buildflags --get CPPFLAGS)
+# Try to deal with mame's linking requiring huge amounts of memory and
+# causing problems on 32 bit architectures
+# Sacrifice linking speed to avoid using so much memory
+ifeq ($(DEB_HOST_ARCH_BITS),32)
+export DEB_LDFLAGS_MAINT_APPEND = -Wl,--no-keep-memory
+# Disable -g entirely
+CFLAGS := $(CFLAGS:-g=-g0)
+endif
+
# taken verbatim from debian policy
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mame.git
More information about the Pkg-games-commits
mailing list