aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/check/crc32_x86.S
diff options
context:
space:
mode:
Diffstat (limited to 'src/liblzma/check/crc32_x86.S')
-rw-r--r--src/liblzma/check/crc32_x86.S8
1 files changed, 7 insertions, 1 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__)