[mupen64plus-core] 166/310: Enable experimental support for link-time optimization

Sven Eckelmann ecsv-guest at moszumanska.debian.org
Thu Nov 26 05:57:50 UTC 2015


This is an automated email from the git hooks/post-receive script.

ecsv-guest pushed a commit to branch armhf_test
in repository mupen64plus-core.

commit c9335283c2f6b3b5b0384a813cecb92d670acd3c
Author: Sven Eckelmann <sven at narfation.org>
Date:   Mon May 28 23:38:44 2012 +0200

    Enable experimental support for link-time optimization
---
 debian/changelog             |  1 +
 debian/patches/gcc_lto.patch | 29 +++++++++++++++++++++++++++++
 debian/patches/series        |  1 +
 debian/rules                 |  2 +-
 4 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index a08d7ba..e2cc0f7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ mupen64plus-core (1.99.5-6) UNRELEASED; urgency=low
     - Add unused_bdslot.patch, Remove unused variable bdslot
     - Add printf_function_pointer.patch, Print function pointer using %p instead
       of %x
+    - Add gcc_lto.patch, Enable support for link-time optimization
 
  -- Sven Eckelmann <sven at narfation.org>  Sat, 09 Jun 2012 00:28:40 +0200
 
diff --git a/debian/patches/gcc_lto.patch b/debian/patches/gcc_lto.patch
new file mode 100644
index 0000000..10835c5
--- /dev/null
+++ b/debian/patches/gcc_lto.patch
@@ -0,0 +1,29 @@
+Description: Enable experimental support for link-time optimization
+Origin: upstream, https://bitbucket.org/richard42/mupen64plus-core/changeset/99517e4bc1b8
+Author: Sven Eckelmann <sven at narfation.org>
+
+---
+diff --git a/projects/unix/Makefile b/projects/unix/Makefile
+index 3a5f5497280d92ab86f15706e2ae057da94d34a3..992cc16afac3ccb429337f9ec6dc0f2c24f1d66b 100644
+--- a/projects/unix/Makefile
++++ b/projects/unix/Makefile
+@@ -414,6 +414,7 @@ targets:
+ 	@echo "    DBG_COUNT=1   == print R4300 instruction count totals (64-bit dynarec only)"
+ 	@echo "    DBG_COMPARE=1 == enable core-synchronized r4300 debugging"
+ 	@echo "    DBG_PROFILE=1 == dump profiling data for r4300 dynarec to data file"
++	@echo "    LTO=1         == enable experimental build with link-time optimization"
+ 	@echo "    V=1           == show verbose compiler output"
+ 
+ all: $(TARGET)
+@@ -446,6 +447,11 @@ CFLAGS += -MD
+ -include $(OBJECTS:.o=.d)
+ 
+ CXXFLAGS += $(CFLAGS)
++ifeq ($(LTO), 1)
++  CFLAGS += -flto
++  CXXFLAGS += -flto
++  LDFLAGS += -fuse-linker-plugin $(CXXFLAGS)
++endif
+ 
+ # standard build rules
+ $(OBJDIR)/%.o: $(SRCDIR)/%.c
diff --git a/debian/patches/series b/debian/patches/series
index 158dd30..2f6df4b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@ debugger_api.patch
 disable_recompiler_disassembler.patch
 unused_bdslot.patch
 printf_function_pointer.patch
+gcc_lto.patch
diff --git a/debian/rules b/debian/rules
index 8f20ae7..24aab04 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,7 +6,7 @@ export DEB_BUILD_MAINT_OPTIONS=hardening=+all,-pie
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 DEB_HOST_GNU_CPU ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
 DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
-MAKEOPTIONS = V=1 UNAME='$(DEB_HOST_ARCH_OS)' HOST_CPU='$(DEB_HOST_GNU_CPU)' APIDIR=/usr/include/mupen64plus/ DEBUG=1 DEBUGGER=1 PREFIX=/usr/ LIBDIR="/usr/lib/$(DEB_HOST_MULTIARCH)" PIC=1 OPTFLAGS="" SHAREDIR="/usr/share/games/mupen64plus/"
+MAKEOPTIONS = V=1 UNAME='$(DEB_HOST_ARCH_OS)' HOST_CPU='$(DEB_HOST_GNU_CPU)' APIDIR=/usr/include/mupen64plus/ DEBUG=1 DEBUGGER=1 PREFIX=/usr/ LIBDIR="/usr/lib/$(DEB_HOST_MULTIARCH)" PIC=1 OPTFLAGS="" SHAREDIR="/usr/share/games/mupen64plus/" LTO=1
 DBG_PACKAGE=$(shell dpkg-parsechangelog|grep '^Source: '|sed 's/^Source:\s*//')-dbg
 
 binary binary-arch binary-indep build build-arch build-indep clean install install-arch install-indep:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mupen64plus-core.git



More information about the Pkg-games-commits mailing list