]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
liblzma: Check HAVE_USABLE_CLMUL before omitting CRC32 table.
authorJia Tan <jiat0218@gmail.com>
Thu, 1 Feb 2024 08:07:03 +0000 (16:07 +0800)
committerJia Tan <jiat0218@gmail.com>
Thu, 1 Feb 2024 12:09:11 +0000 (20:09 +0800)
This was split from the prior commit so it could be easily applied to
the 5.4 branch.

Closes: https://github.com/tukaani-project/xz/pull/77
src/liblzma/check/crc32_table.c

index 41a80dcb4f5ce1b5fe4968e3839cbc8e4288b6de..09b00fa3f6627c5ac17686187ec5439ae4b10124 100644 (file)
@@ -15,9 +15,9 @@
 
 // FIXME: Compared to crc_common.h this has to check for __x86_64__ too
 // so that in 32-bit builds crc32_x86.S won't break due to a missing table.
-#if (defined(__x86_64__) && defined(__SSSE3__) \
+#if defined(HAVE_USABLE_CLMUL) && ((defined(__x86_64__) && defined(__SSSE3__) \
                        && defined(__SSE4_1__) && defined(__PCLMUL__)) \
-               || (defined(__e2k__) && __iset__ >= 6)
+               || (defined(__e2k__) && __iset__ >= 6))
 #      define X86_CLMUL_NO_TABLE 1
 #endif