--- llvm-project-14.0.6.src/lld/MachO/SyntheticSections.cpp.orig	2022-06-23 02:46:24.000000000 +1000
+++ llvm-project-14.0.6.src/lld/MachO/SyntheticSections.cpp	2022-07-02 20:06:18.000000000 +1000
@@ -1190,7 +1190,8 @@ void CodeSignatureSection::writeHashes(u
   uint8_t *hashes = codeEnd + allHeadersSize;
   while (code < codeEnd) {
     StringRef block(reinterpret_cast<char *>(code),
-                    std::min(codeEnd - code, static_cast<ssize_t>(blockSize)));
+                    std::min(static_cast<size_t>(codeEnd - code),
+                             static_cast<size_t>(blockSize)));
     SHA256 hasher;
     hasher.update(block);
     StringRef hash = hasher.final();
