Programs will be, by default, linke with "-Wl,--as-needed" to

reduce unused library dependencies.
This commit is contained in:
Sanel Zukan
2008-08-10 18:18:16 +00:00
parent ef7c53d33d
commit 3f821eb1e5
2 changed files with 10 additions and 2 deletions

View File

@ -32,6 +32,11 @@ rule MakeProgramPrivate
CFLAGS on $(objects) += $(4) ;
C++FLAGS on $(objects) += $(4) ;
if $(REMOVE_UNUSED_DEPENDENCIES_TRICK) = 1 {
# remove unused dependencies in binaries, as U.Drepper prescribed ;-)
LINKFLAGS on $(target) = -Wl,--as-needed [ on $(target) return $(LINKFLAGS) ] ;
}
LINKLIBS on $(target) = $(3) [ on $(target) return $(LINKLIBS) ] ;
MainFromObjects $(target) : $(objects) ;