cksum: port to Apple LLVM version 10.0.0

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.
This commit is contained in:
Paul Eggert 2025-05-29 08:30:13 -07:00
parent 21a662b1ee
commit 4eb2ff1c89
2 changed files with 7 additions and 2 deletions

4
NEWS
View File

@ -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]

View 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"));
}
]])
],[