Web lists-archives.com

[MPlayer-dev-eng] [PATCH] configure: Avoid eh_frame bloat in release builds




Hi,

This patch reduces both mplayer and mencoder size by 1mb, or 6%. The
eh_frame sections are mainly used for C++ exceptions and accurate
debugging, neither of which is desired in a C program and a release
build.

- Lauri
Index: configure
===================================================================
--- configure	(revision 37696)
+++ configure	(working copy)
@@ -2847,6 +2847,12 @@
   cflag_check -Wdisabled-optimization && WARN_CFLAGS="-Wdisabled-optimization $WARN_CFLAGS"
   cflag_check -Wmissing-prototypes && WARN_CFLAGS="-Wmissing-prototypes $WARN_CFLAGS"
   cflag_check -Wstrict-prototypes && WARN_CFLAGS="-Wstrict-prototypes $WARN_CFLAGS"
+
+  # These may hinder debugging, but result in a significantly smaller binary on gcc.
+  if test "$_crash_debug" = no && test "$_debug" = ""; then
+    cflag_check -fno-unwind-tables && CFLAGS="$CFLAGS -fno-unwind-tables"
+    cflag_check -fno-asynchronous-unwind-tables && CFLAGS="$CFLAGS -fno-asynchronous-unwind-tables"
+  fi
 fi
 
 cflag_check -mno-omit-leaf-frame-pointer && cflags_no_omit_leaf_frame_pointer="-mno-omit-leaf-frame-pointer"
_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-eng@xxxxxxxxxxxx
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng