[Scummvm-git-logs] scummvm master -> 45112f416d708c1fb2ee8ace8fbdb2948f4561be

rsn8887 rsn8887 at users.noreply.github.com
Sat Mar 14 05:47:11 UTC 2020


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
bd1b346e08 BACKENDS: strip psp2 executable to reduce size
45112f416d CONFIGURE: use lto and gc flags on psp2 to reduce executable size


Commit: bd1b346e081e94081eea73bf28862db798cd999d
    https://github.com/scummvm/scummvm/commit/bd1b346e081e94081eea73bf28862db798cd999d
Author: rsn8887 (rsn8887 at users.noreply.github.com)
Date: 2020-03-14T00:46:46-05:00

Commit Message:
BACKENDS: strip psp2 executable to reduce size

Changed paths:
    backends/platform/sdl/psp2/psp2.mk


diff --git a/backends/platform/sdl/psp2/psp2.mk b/backends/platform/sdl/psp2/psp2.mk
index c1396ce412..4283f4de05 100644
--- a/backends/platform/sdl/psp2/psp2.mk
+++ b/backends/platform/sdl/psp2/psp2.mk
@@ -1,10 +1,15 @@
-psp2vpk: $(EXECUTABLE)
+PSP2_EXE_STRIPPED := scummvm_stripped$(EXEEXT)
+
+$(PSP2_EXE_STRIPPED): $(EXECUTABLE)
+	$(STRIP) --strip-debug $< -o $@
+
+psp2vpk: $(PSP2_EXE_STRIPPED)
 	rm -rf psp2pkg
 	rm -f $(EXECUTABLE).vpk
 	mkdir -p psp2pkg/sce_sys/livearea/contents
 	mkdir -p psp2pkg/data/
 	mkdir -p psp2pkg/doc/
-	vita-elf-create $(EXECUTABLE) $(EXECUTABLE).velf
+	vita-elf-create $(PSP2_EXE_STRIPPED) $(EXECUTABLE).velf
 	vita-make-fself -s -c $(EXECUTABLE).velf psp2pkg/eboot.bin
 	vita-mksfoex -s TITLE_ID=VSCU00001 -d ATTRIBUTE2=12 "$(EXECUTABLE)" psp2pkg/sce_sys/param.sfo
 	cp $(srcdir)/dists/psp2/icon0.png psp2pkg/sce_sys/


Commit: 45112f416d708c1fb2ee8ace8fbdb2948f4561be
    https://github.com/scummvm/scummvm/commit/45112f416d708c1fb2ee8ace8fbdb2948f4561be
Author: rsn8887 (rsn8887 at users.noreply.github.com)
Date: 2020-03-14T00:46:46-05:00

Commit Message:
CONFIGURE: use lto and gc flags on psp2 to reduce executable size

Changed paths:
    configure


diff --git a/configure b/configure
index 4c8f954665..282fdcceab 100755
--- a/configure
+++ b/configure
@@ -2930,6 +2930,14 @@ case $_host_os in
 		append_var CXXFLAGS "-fno-optimize-sibling-calls"
 		#the next line fixes "branch out of range" error in gob engine when -Os is used
 		append_var CXXFLAGS "-mlong-calls"
+		append_var CXXFLAGS "-mword-relocations"
+		append_var CXXFLAGS "-fomit-frame-pointer"
+		#use link time optimization to further reduce exe size
+		append_var CXXFLAGS "-flto"
+		append_var LDFLAGS "-flto"
+		#use linker dead code elimination to further reduce exe size
+		append_var CXXFLAGS "-ffunction-sections -fdata-sections"
+		append_var LDFLAGS "-Wl,--gc-sections"
 		if test "$_debug_build" = no; then
 		#optimize for smallest file size. This is necessary to prevent a crash on startup
 		#due to the large executable file size when many engines are enabled
@@ -3429,6 +3437,9 @@ if test -n "$_host"; then
 			_mt32emu=no
 			_timidity=no
 			_port_mk="backends/platform/sdl/psp2/psp2.mk"
+			#the -gcc- variants allow link time optimization
+			_ar="$_host_alias-gcc-ar cru"
+			_ranlib=$_host_alias-gcc-ranlib
 			;;
 		psp)
 			_backend="psp"




More information about the Scummvm-git-logs mailing list