diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2009-06-30 17:09:57 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2009-06-30 17:09:57 +0300 |
commit | f42ee981668b545ab6d06c6072e262c29605273c (patch) | |
tree | 3c629000a91b0b0dccf11bacdd1878cea508be73 /src/xz | |
parent | Added a comment about "autoconf -fi" to autogen.sh. (diff) | |
download | xz-f42ee981668b545ab6d06c6072e262c29605273c.tar.xz |
Build system fixes
Don't use libtool convenience libraries to avoid recently
discovered long-standing subtle but somewhat severe bugs
in libtool (at least 1.5.22 and 2.2.6 are affected). It
was found when porting XZ Utils to Windows
<http://lists.gnu.org/archive/html/libtool/2009-06/msg00070.html>
but the problem is significant also e.g. on GNU/Linux.
Unless --disable-shared is passed to configure, static
library built from a set of convenience libraries will
contain PIC objects. That is, while libtool builds non-PIC
objects too, only PIC objects will be used from the
convenience libraries. On 32-bit x86 (tested on mobile XP2400+),
using PIC instead of non-PIC makes the decompressor 10 % slower
with the default CFLAGS.
So while xz was linked against static liblzma by default,
it got the slower PIC objects unless --disable-shared was
used. I tend develop and benchmark with --disable-shared
due to faster build time, so I hadn't noticed the problem
in benchmarks earlier.
This commit also adds support for building Windows resources
into liblzma and executables.
Diffstat (limited to 'src/xz')
-rw-r--r-- | src/xz/Makefile.am | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/xz/Makefile.am b/src/xz/Makefile.am index a9b2f690..ba64d72b 100644 --- a/src/xz/Makefile.am +++ b/src/xz/Makefile.am @@ -30,12 +30,15 @@ xz_SOURCES = \ util.c \ util.h +if COND_W32 +xz_SOURCES += xz_w32res.rc +endif + xz_CPPFLAGS = \ -DLOCALEDIR=\"$(localedir)\" \ -I$(top_srcdir)/src/common \ -I$(top_srcdir)/src/liblzma/api \ -I$(top_builddir)/lib \ - -I$(top_srcdir)/lib \ $(STATIC_CPPFLAGS) xz_LDFLAGS = $(STATIC_LDFLAGS) @@ -49,6 +52,12 @@ endif xz_LDADD += $(LTLIBINTL) +# Windows resource compiler support +.rc.o: + $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(xz_CPPFLAGS) $(CPPFLAGS) $(RCFLAGS) -i $< -o $@ + + ## Create symlinks for unxz and xzcat for convenience. Create symlinks also ## for lzma, unlzma, and lzcat for compatibility with LZMA Utils 4.32.x. xzlinks = unxz xzcat lzma unlzma lzcat |