aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/lz
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2009-06-30 17:09:57 +0300
committerLasse Collin <lasse.collin@tukaani.org>2009-06-30 17:09:57 +0300
commitf42ee981668b545ab6d06c6072e262c29605273c (patch)
tree3c629000a91b0b0dccf11bacdd1878cea508be73 /src/liblzma/lz
parentAdded a comment about "autoconf -fi" to autogen.sh. (diff)
downloadxz-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/liblzma/lz')
-rw-r--r--src/liblzma/lz/Makefile.am29
-rw-r--r--src/liblzma/lz/Makefile.inc21
2 files changed, 21 insertions, 29 deletions
diff --git a/src/liblzma/lz/Makefile.am b/src/liblzma/lz/Makefile.am
deleted file mode 100644
index c3312626..00000000
--- a/src/liblzma/lz/Makefile.am
+++ /dev/null
@@ -1,29 +0,0 @@
-##
-## Author: Lasse Collin
-##
-## This file has been put into the public domain.
-## You can do whatever you want with this file.
-##
-
-noinst_LTLIBRARIES = liblz.la
-liblz_la_CPPFLAGS = \
- -I$(top_srcdir)/src/liblzma/api \
- -I$(top_srcdir)/src/liblzma/common \
- -I$(top_srcdir)/src/liblzma/check
-liblz_la_SOURCES =
-
-
-if COND_ENCODER_LZ
-liblz_la_SOURCES += \
- lz_encoder.c \
- lz_encoder.h \
- lz_encoder_hash.h \
- lz_encoder_mf.c
-endif
-
-
-if COND_DECODER_LZ
-liblz_la_SOURCES += \
- lz_decoder.c \
- lz_decoder.h
-endif
diff --git a/src/liblzma/lz/Makefile.inc b/src/liblzma/lz/Makefile.inc
new file mode 100644
index 00000000..470d59c0
--- /dev/null
+++ b/src/liblzma/lz/Makefile.inc
@@ -0,0 +1,21 @@
+##
+## Author: Lasse Collin
+##
+## This file has been put into the public domain.
+## You can do whatever you want with this file.
+##
+
+if COND_ENCODER_LZ
+liblzma_la_SOURCES += \
+ lz/lz_encoder.c \
+ lz/lz_encoder.h \
+ lz/lz_encoder_hash.h \
+ lz/lz_encoder_mf.c
+endif
+
+
+if COND_DECODER_LZ
+liblzma_la_SOURCES += \
+ lz/lz_decoder.c \
+ lz/lz_decoder.h
+endif