]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
cksum: port to Apple LLVM version 10.0.0
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 29 May 2025 15:30:13 +0000 (08:30 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 29 May 2025 16:06:34 +0000 (09:06 -0700)
This compiler lacks support for the x86-64 VPCLMULQDQ instruction;
compiles fail with "error: invalid cpu feature string for builtin".
Problem reported by Peter Dyballa, and fix suggested by
Pádraig Brady <https://bugs.gnu.org/78562#8>.
* configure.ac (USE_AVX512_CRC32):
Also check that __builtin_cpu_supports ("vpclmulqdq") compiles.

NEWS
configure.ac

diff --git a/NEWS b/NEWS
index 923aa72f88d04973a90a5f871161e077c2a6d3d0..1f498269f89ca110428a68aa25cf47536441126e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,10 @@ GNU coreutils NEWS                                    -*- outline -*-
 
 ** Bug fixes
 
+  cksum was not compilable by Apple LLVM 10.0.0 x86-64, which
+  lacks support for checking for the VPCLMULQDQ instruction.
+  [bug introduced in coreutils-9.6]
+
   'cp -p' had spurious "Operation not supported" failures when
   copying to non-NFS files from NFSv4 files with trivial ACLs.
   [bug introduced in coreutils-9.6]
index 5ea280f2622db4762528138147031f2baef424a1..b44687204359f5eb07d5fb5ac9d2b23ec705261e 100644 (file)
@@ -693,8 +693,9 @@ AC_LINK_IFELSE(
                            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
       a = _mm512_clmulepi64_epi128 (a, b, 0x00);
       a = _mm512_shuffle_epi8 (a, b);
-      return __builtin_cpu_supports ("avx512bw") &&
-        __builtin_cpu_supports ("avx512f");
+      return (__builtin_cpu_supports ("avx512bw")
+              && __builtin_cpu_supports ("avx512f")
+              && __builtin_cpu_supports ("vpclmulqdq"));
     }
   ]])
   ],[