See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196929 for background. In FreeBSD I would like to have ar(1) and ranlib(1) operate in deterministic mode by default, but if we do that we need an option to turn deterministic mode back off. Binutils has -U for that purpose -- from the Binutils manual:
-D
Operate in deterministic mode. The symbol map archive member's header will show zero for the UID, GID, and timestamp. When this option is used, multiple runs will produce identical output files.If binutils was configured with --enable-deterministic-archives, then this mode is on by default. It can be disabled with the `-U' option, described below.
-U
Do not operate in deterministic mode. This is the inverse of the `-D' option, above: the archive index will get actual UID, GID, timestamp, and file mode values.If binutils was configured without --enable-deterministic-archives, then this mode is on by default.
-U added in [r3230]. Still need a mechanism to build ar with -D enabled by default
Related
Commit: [r3230]
Making deterministic mode the default might be surprising to users since then an 'ar r' (archive creation) followed by an 'ar x' (file extraction) would not be idempotent.
People do use
aras a general-purpose archiver. In fact, POSIX says:(from: http://pubs.opengroup.org/onlinepubs/009695399/utilities/ar.html).