aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/check
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/check
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/check')
-rw-r--r--src/liblzma/check/Makefile.am47
-rw-r--r--src/liblzma/check/Makefile.inc51
2 files changed, 51 insertions, 47 deletions
diff --git a/src/liblzma/check/Makefile.am b/src/liblzma/check/Makefile.am
deleted file mode 100644
index abd598aa..00000000
--- a/src/liblzma/check/Makefile.am
+++ /dev/null
@@ -1,47 +0,0 @@
-##
-## Author: Lasse Collin
-##
-## This file has been put into the public domain.
-## You can do whatever you want with this file.
-##
-
-EXTRA_DIST = crc32_tablegen.c crc64_tablegen.c
-
-noinst_LTLIBRARIES = libcheck.la
-libcheck_la_SOURCES = \
- check.c \
- check.h \
- crc_macros.h
-libcheck_la_CPPFLAGS = \
- -I$(top_srcdir)/src/liblzma/api \
- -I$(top_srcdir)/src/liblzma/common
-
-if COND_CHECK_CRC32
-if COND_SMALL
-libcheck_la_SOURCES += crc32_small.c
-else
-libcheck_la_SOURCES += crc32_table.c crc32_table_le.h crc32_table_be.h
-if COND_ASM_X86
-libcheck_la_SOURCES += crc32_x86.S
-else
-libcheck_la_SOURCES += crc32_fast.c
-endif
-endif
-endif
-
-if COND_CHECK_CRC64
-if COND_SMALL
-libcheck_la_SOURCES += crc64_small.c
-else
-libcheck_la_SOURCES += crc64_table.c crc64_table_le.h crc64_table_be.h
-if COND_ASM_X86
-libcheck_la_SOURCES += crc64_x86.S
-else
-libcheck_la_SOURCES += crc64_fast.c
-endif
-endif
-endif
-
-if COND_CHECK_SHA256
-libcheck_la_SOURCES += sha256.c
-endif
diff --git a/src/liblzma/check/Makefile.inc b/src/liblzma/check/Makefile.inc
new file mode 100644
index 00000000..e4067a9c
--- /dev/null
+++ b/src/liblzma/check/Makefile.inc
@@ -0,0 +1,51 @@
+##
+## Author: Lasse Collin
+##
+## This file has been put into the public domain.
+## You can do whatever you want with this file.
+##
+
+EXTRA_DIST += \
+ check/crc32_tablegen.c \
+ check/crc64_tablegen.c
+
+liblzma_la_SOURCES += \
+ check/check.c \
+ check/check.h \
+ check/crc_macros.h
+
+if COND_CHECK_CRC32
+if COND_SMALL
+liblzma_la_SOURCES += check/crc32_small.c
+else
+liblzma_la_SOURCES += \
+ check/crc32_table.c \
+ check/crc32_table_le.h \
+ check/crc32_table_be.h
+if COND_ASM_X86
+liblzma_la_SOURCES += check/crc32_x86.S
+else
+liblzma_la_SOURCES += check/crc32_fast.c
+endif
+endif
+endif
+
+if COND_CHECK_CRC64
+if COND_SMALL
+liblzma_la_SOURCES += check/crc64_small.c
+else
+liblzma_la_SOURCES += \
+ check/crc64_table.c \
+ check/crc64_table_le.h \
+ check/crc64_table_be.h
+if COND_ASM_X86
+liblzma_la_SOURCES += check/crc64_x86.S
+else
+liblzma_la_SOURCES += check/crc64_fast.c
+endif
+endif
+endif
+
+if COND_CHECK_SHA256
+liblzma_la_SOURCES += check/sha256.c
+endif