1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-02-11 01:42:17 +02:00
Files
coreutils/build-aux
Pádraig Brady cd52292221 build: reduce size of multi-call binary by reusing cksum logic
Map md5sum and sha{1,224,256,385,512} to use cksum logic,
which selects appropriate behavior at runtime, rather than
separate binaries for each closely related utility.

$ size src/coreutils  # before
   text	   data	    bss	    dec	    hex	filename
1349509	   6812	 619312	1975633	 1e2551	src/coreutils
$ size src/coreutils  # after
   text	   data	    bss	    dec	    hex	filename
1306933	   6748	 619152	1932833	 1d7e21	src/coreutils

* build-aux/gen-single-binary.sh: Map sha*sum to use cksum.c
* src/cksum.c: Adjust to behave more like sha*sum,
when the algorithm to something other than "crc".
* src/cksum.h: Expose the cksum_algorithm global and enum.
* src/coreutils-md5sum.c: Set cksum_algorithm and call cksum logic.
* src/coreutils-sha1sum.c: Likewise.
* src/coreutils-sha224sum.c Likewise.
* src/coreutils-sha256sum.c Likewise.
* src/coreutils-sha384sum.c Likewise.
* src/coreutils-sha512sum.c Likewise.
* NEWS: Mention the improvement.
2025-12-13 17:18:47 +00:00
..