Deterministic Archives

Ralf Corsepius ralf.corsepius at rtems.org
Thu Jan 31 11:58:55 UTC 2013


On 01/31/2013 10:44 AM, Sebastian Huber wrote:
> Hello,
>
> the GNU AR program as a 'D' option
> (http://sourceware.org/binutils/docs-2.23.1/binutils/ar-cmdline.html#ar-cmdline):
>
>
> [...]
> `D'
>      Operate in deterministic mode. When adding files and the archive
> index use zero for UIDs, GIDs, timestamps, and use consistent file modes
> for all files. When this option is used, if ar is used with identical
> options and identical input files, multiple runs will create identical
> output files regardless of the input files' owners, groups, file modes,
> or modification times.
>
>      If binutils was configured with --enable-deterministic-archives,
> then this mode is on by default. It can be disabled with the `U'
> modifier, below.
> [...]
>
> We should consider to add this configure option to the standard tool
> chain build.  This helps to avoid artificial differences in library files.
>
If you're serously interested in this, bring this to the attention of 
upstream binutils, newlib, GCC and automake and have all these tools 
changed.

I for one do not see much sense in this (All it does it to add 
complexity and non-portability) and therefore am opposed to doing this.

Ralf




More information about the devel mailing list