This patch enables reproducible builds of cygwin package in conjunction with this cygport patch: https://sourceware.org/pipermail/cygwin-apps/2023-August/043108.html cygwin.cygport was enhanced for the test as described in the above post. If the same build path, SOURCE_DATE_EPOCH and toolchain are used, rebuilds with cygport produce identical distribution tarballs. Adding proper -fmacro-prefix-map gcc options (or remove all usages of __FILE__) could possibly make this independent from the build path. Note that 'u' (replace with newer objects only) flag needed to be removed from ar commands because it is incompatible with 'D' (deterministic archive). I don't expect any negative effect because existing .a files are always removed before ar is run. Not yet tested with different machines or different users accounts. Patch would be much simpler (mkvers.sh only) if binutils would support SOURCE_DATE_EPOCH directly. -- Regards, Christian