diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2009-06-27 00:43:06 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2009-06-27 00:43:06 +0300 |
commit | b2b1f867532732fe9969131f8713bdd6b0731763 (patch) | |
tree | 1ddcfb02d9893556cf6c9eb811b5fed954319e38 /src/liblzma/check | |
parent | Updated THANKS (most of today's commits are based on (diff) | |
download | xz-b2b1f867532732fe9969131f8713bdd6b0731763.tar.xz |
Hopefully improved portability of the assembler code in
Autotools based builds on Windows.
Diffstat (limited to 'src/liblzma/check')
-rw-r--r-- | src/liblzma/check/crc32_x86.S | 8 | ||||
-rw-r--r-- | src/liblzma/check/crc64_x86.S | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/liblzma/check/crc32_x86.S b/src/liblzma/check/crc32_x86.S index 2342168b..cca29891 100644 --- a/src/liblzma/check/crc32_x86.S +++ b/src/liblzma/check/crc32_x86.S @@ -109,8 +109,14 @@ LZMA_CRC32: * by GCC but only on some systems. Testing for both makes it simpler * to test this code without libtool, and keeps the code working also * when built with libtool but using something else than GCC. + * + * I understood that libtool may define PIC on Windows even though + * the code in Windows DLLs is not PIC in sense that it is in ELF + * binaries, so we need a separate check to always use the non-PIC + * code on Windows. */ -#if !defined(PIC) && !defined(__PIC__) +#if (!defined(PIC) && !defined(__PIC__)) \ + || (defined(_WIN32) || defined(__CYGWIN__)) /* Not PIC */ movl $LZMA_CRC32_TABLE, %ebx #elif defined(__MACH__) diff --git a/src/liblzma/check/crc64_x86.S b/src/liblzma/check/crc64_x86.S index 8b0a42db..17de076a 100644 --- a/src/liblzma/check/crc64_x86.S +++ b/src/liblzma/check/crc64_x86.S @@ -100,8 +100,14 @@ LZMA_CRC64: * by GCC but only on some systems. Testing for both makes it simpler * to test this code without libtool, and keeps the code working also * when built with libtool but using something else than GCC. + * + * I understood that libtool may define PIC on Windows even though + * the code in Windows DLLs is not PIC in sense that it is in ELF + * binaries, so we need a separate check to always use the non-PIC + * code on Windows. */ -#if !defined(PIC) && !defined(__PIC__) +#if (!defined(PIC) && !defined(__PIC__)) \ + || (defined(_WIN32) || defined(__CYGWIN__)) /* Not PIC */ movl $LZMA_CRC64_TABLE, %ebx #elif defined(__MACH__) |