[MPlayer-dev-eng] [PATCH] use -fvisibility=hidden
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Sun Aug 5 20:00:16 CEST 2012
On Sun, Aug 05, 2012 at 07:25:09PM +0200, wbrana wrote:
> -fvisibility=hidden makes executables smaller with smaller load time
> --- configure.orig 2012-08-05 19:15:27.000000000 +0200
> +++ configure 2012-08-05 19:16:00.078697510 +0200
> @@ -2608,7 +2608,7 @@
> elif test "$cc_vendor" != "gnu" ; then
> CFLAGS="-O2 $_march $_mcpu $_pipe"
> else
> - CFLAGS="-O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer"
> + CFLAGS="-O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer -fvisibility=hidden"
That is the GNU only way for something that is supported on many more
platforms by using a linker script (with -Wl,--version-script,).
Only disadvantage is that older binutils versions were broken and
ignored it for executables.
More information about the MPlayer-dev-eng
mailing list