Skip to content

Commit

Permalink
liblzma: Check HAVE_USABLE_CLMUL before omitting CRC64 table.
Browse files Browse the repository at this point in the history
If liblzma is configured with --disable-clmul-crc
CFLAGS="-msse4.1 -mpclmul", then it will fail to compile because the
generic version must be used but the CRC tables were not included.
  • Loading branch information
JiaT75 committed Feb 1, 2024
1 parent 2f1552a commit ca9015f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/liblzma/check/crc64_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

// FIXME: Compared to crc_common.h this has to check for __x86_64__ too
// so that in 32-bit builds crc64_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

Expand Down

0 comments on commit ca9015f

Please sign in to comment.