xz-utils: dynamically link xz to liblzma
The shared library code is slower, but it has several advantages:
- users can upgrade the library without upgrading the binary;
- optimizing xz will mean optimizing the same code other liblzma
callers use;
- the xz-utils package is significantly smaller (28% smaller
packaged, 25% smaller installed);
- less memory pressure: the text segment of liblzma can be shared
between all xz instances and other liblzma callers;
- all architectures work the same way;
- it opens up the possibility of using more heavily optimized
versions of the library from capability-based library paths.
The speed regression for “xz --stdout zlib-1.2.3.7.tar >/dev/null”
using PIC code is about 6-7%: large enough to notice, but not large
enough to be fatal. Maybe we can close this gap over time.
Thanks to Russ Allbery <rra@debian.org> and others for advice.
Reported by Guillem Jover <guillem@debian.org> through
http://lists.debian.org/debian-devel/2010/02/msg00592.html