It took some time for me to figure this out, but yay!
Fix preserve-libs immediately unmerging a just preserved (copied over)
lib, because it is no longer needed (!needed).
The problem was/is that the Darwin library naming is
lib<name>.<ver>.dylib instead of lib<name>.so.<ver>. This results in
doing a simple sort() over the list a wrong order of the files, such
that the actual file (libneon.27.1.11.dylib) is seen before it's "soname"
symlink, which is recorded in the reverse NEEDED map. Result, the code
thinks libneon.27.1.11.dylib is no longer needed, and unmerges it.
I now implemented a naive comparator which puts symlinks on top, as this
was implied order for the loop, which by coincidence works for .so
objects with sort().
I think this commit (or an improved version of it) is eligable for
merging in the trunk, as it is a safer (and more explicit) way of
ensuring that symlinks are seen before the actual files.
svn path=/main/branches/prefix/; revision=9499