[PATCH] configure: Avoid eh_frame bloat in release builds
Lauri Kasanen <[email protected]>
| Newsgroups | gmane.comp.video.mplayer.devel |
|---|---|
| Message-ID | <[email protected]> |
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 _______________________________________________ MPlayer-dev-eng mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
eh_frame.patch
(text/plain, 880 B)
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"