diff options
author | Emil Velikov <emil.l.velikov@gmail.com> | 2014-03-11 17:58:08 +0000 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2014-03-31 14:56:14 +0100 |
commit | d681b22ed77274a805c6c8e81925c18eeb57a968 (patch) | |
tree | 123ac46987e30805fe5ca7b514597ae0b0565f02 /src/mapi/es1api | |
parent | d187a150d45cbf5bd3476eab49be5057382c2c86 (diff) | |
download | external_mesa3d-d681b22ed77274a805c6c8e81925c18eeb57a968.zip external_mesa3d-d681b22ed77274a805c6c8e81925c18eeb57a968.tar.gz external_mesa3d-d681b22ed77274a805c6c8e81925c18eeb57a968.tar.bz2 |
automake: ask the linker to do garbage collection
By doing GC the linker removes all the symbols that are not referenced
and/or used by the final library. This results in a saving of ~100K
up-to ~600K per (stripped) binary (classic vs gallium drivers).
If interested one can ask the compiler to print the sections that are
removed using -Wl,--print-gc-sections.
v2: Check if ld supports the flag before using it.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Matt Turner <mattst88@gmail.com> (v1)
Diffstat (limited to 'src/mapi/es1api')
-rw-r--r-- | src/mapi/es1api/Makefile.am | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mapi/es1api/Makefile.am b/src/mapi/es1api/Makefile.am index b958118..febb137 100644 --- a/src/mapi/es1api/Makefile.am +++ b/src/mapi/es1api/Makefile.am @@ -47,6 +47,7 @@ libGLESv1_CM_la_LIBADD = $(GLESv1_CM_LIB_DEPS) libGLESv1_CM_la_LDFLAGS = \ -no-undefined \ -version-number 1:1 \ + $(GC_SECTIONS) \ -Wl,--no-undefined if HAVE_SHARED_GLAPI |