From d681b22ed77274a805c6c8e81925c18eeb57a968 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Tue, 11 Mar 2014 17:58:08 +0000 Subject: 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 Acked-by: Matt Turner (v1) --- src/egl/wayland/wayland-egl/Makefile.am | 1 + 1 file changed, 1 insertion(+) (limited to 'src/egl/wayland') diff --git a/src/egl/wayland/wayland-egl/Makefile.am b/src/egl/wayland/wayland-egl/Makefile.am index 3c2673a..d3fe117 100644 --- a/src/egl/wayland/wayland-egl/Makefile.am +++ b/src/egl/wayland/wayland-egl/Makefile.am @@ -11,6 +11,7 @@ libwayland_egl_la_SOURCES = wayland-egl.c libwayland_egl_la_LDFLAGS = \ -no-undefined \ -version-info 1 \ + $(GC_SECTIONS) \ -Wl,--no-undefined TESTS = wayland-egl-symbols-check -- cgit v1.1