On 2026-09-18 05:31, Simon Josefsson via GNU gzip discussion and bug reports. wrote:
I wonder if maybe this could be applied to gnulib's crc module? And then gzip use that instead of the current custom code?
Yes, that would make sense. This should require almost no changes to gzip proper, and would benefit apps other than gzip. The idea would be to create a new Gnulib module crc-riscv that is parallel to the existing crc-x86_64 module in Gnulib. gzip can then use both modules. To be parallel with crc-x86_64, Gnulib would contain new files modules/crc-riscv, lib/crc-riscv.c, lib/crc-riscv.h, m4/crc-riscv.m4, and there would be changes to Gnulib lib/crc.c, lib/cpu-supports.h, m4/crc.m4 to use the crc-riscv module if available. There would need to be a few changes to the gzip patch proposed in [1] to make it work as a Gnulib module, but this should be straightforward. Also, a change this big requires assignment of copyright. Shangcheng, is that something you could do? If so, I can send you the appropriate forms for the copyright assignment. [1]: https://bugs.gnu.org/81888
