Both ar and objcopy default to build deterministic archives, but dlltool doesn't.
Please could you elaborate on this ?
What specifically do you think should be happening ?
The bfd objects used for dlltool should have the BFD_DETERMINISTIC_OUTPUT flag set.
Created attachment 14284 [details]
Thanks - that makes things clearer.
Please could you try out the uploaded patch to see if it does what you expect.
(Note - I do not have a cygwin/mingw test environment, so I have not been
able to test the patch thoroughly).
The patch seems to work as expected.
The master branch has been updated by Nick Clifton <firstname.lastname@example.org>:
Author: Nick Clifton <email@example.com>
Date: Tue Aug 23 09:54:52 2022 +0100
Add an option to dlltool to allow the creation of deterministic libraries.
* dlltool.c (deterministic): New variable.
(gen_lib_file): If deterministic is true set the
(usage): Mention --deterministic-libraries and
(long_options): Add new options.
(main): Parse new options.
* doc/binutils.texi: Document the new options.
* NEWS: Mention the new feature.