]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
cksum: fix bug in check for cksum_pclmul
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 14 Jun 2023 21:13:35 +0000 (14:13 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 14 Jun 2023 21:54:46 +0000 (14:54 -0700)
This fixes a typo in the previous patch.
Problem reported by Pádraig Brady <https://bugs.gnu.org/64058#11>.
* src/cksum.c (pclmul_supported): Also require AVX support
to use cksum_pclmul.

src/cksum.c

index 631ac3449bf73352edab4d88912cf07799b4b9bc..e935ba75c8e00055c7ce2bf9901794cbe019a9f9 100644 (file)
@@ -160,7 +160,8 @@ static bool
 pclmul_supported (void)
 {
 # if USE_PCLMUL_CRC32
-  bool pclmul_enabled = 0 < __builtin_cpu_supports ("pclmul");
+  bool pclmul_enabled = (0 < __builtin_cpu_supports ("pclmul")
+                         && 0 < __builtin_cpu_supports ("avx"));
 
   if (cksum_debug)
     error (0, 0, "%s",