On 12 Nov 2007, at 04:27, Daniel Johnson wrote: > > On Nov 11, 2007, at 8:12 PM, Jean-François Mertens wrote: > >> I see in an excerpt of 'man ld' for 10.5 that ld >> now has an option '-dead_strip_dylibs'. >> I would strongly favour adding this as a default >> LDFLAG (conditional to 10.5). >> It does have the potential, when used systematically, >> to substantially reduce our deps ... > > Interesting! I'm testing this with some of my packages and it seems > to work well. For instance, curl went from > > $ otool -L /sw/bin/curl > /sw/bin/curl: > /sw/lib/libcurl.4.dylib (compatibility version 5.0.0, current > version 5.1.0) > /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos > (compatibility version 5.0.0, current version 5.0.0) > /usr/lib/libresolv.9.dylib (compatibility version 1.0.0, current > version 19.0.0) > /sw/lib/libssh2.1.dylib (compatibility version 2.0.0, current > version 2.0.0) > /usr/lib/libssl.0.9.7.dylib (compatibility version 0.9.7, current > version 0.9.7) > /usr/lib/libcrypto.0.9.7.dylib (compatibility version 0.9.7, > current version 0.9.7) > /usr/lib/libz.1.dylib (compatibility version 1.0.0, current > version 1.2.3) > /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current > version 1.0.0) > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current > version 111.0.0) > > to this > > $ otool -L /sw/bin/curl > /sw/bin/curl: > /sw/lib/libcurl.4.dylib (compatibility version 5.0.0, current > version 5.1.0) > /usr/lib/libz.1.dylib (compatibility version 1.0.0, current > version 1.2.3) > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current > version 111.0.0) > > Only libcurl links to the other libraries. I did this by adding > SetLDFLAGS: -Wl,-dead_strip_dylibs to the info file. I think it's > necessary to use the "-Wl," construction with libtool, though I > didn't try without. > > I don't think it's a good idea to make this a default though. There > are too many chances for surprises. You're perfectly right. It should work only in "well built packages", where every undefined symbol is accompanied by a " (from .." And there are too many other pkgs.. Too bad the option doesn't have those semantics !
Jean-Francois ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Fink-devel mailing list Fink-devel@lists.sourceforge.net http://news.gmane.org/gmane.os.apple.fink.devel