This fixes building libmd on MacOS/Linux. The real fix is probably to
build it as a .S file with $CC instead. It might also be better to just
compile the C file in userspace since the compiler can the use SSE/AVX.
Details
buildworld succeeds without building GNU as.
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Clang's IAS cannot assemble skein_block_asm.s (D8434) so trying to just use ${CC} instead won't work. LLVM PR 33405 is open to track this.
I think this change is reasonable, although I might suggest adding a comment with more detail, and maybe a .warning if the file exists but we don't have as (e.g. .warning as not available: not using optimized Skein asm
It might be worth spending the time to see how the performance differs. If it's not extreme, then just dropping skein_block_asm.s entirely would make sense given we're talking about an SHA3 candidate that didn't win.
I wouldn't be surprised if the C version isn't in fact faster with a modern compiler that can use vectorization (SSE/AVX) in userland. The handwritten assembly only uses GPRs.