This is the mail archive of the
mailing list for the binutils project.
Re: How to keep the archive involatile if the members are involatile?
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: Pan ruochen <panruochen at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Wed, 08 Jul 2009 05:30:55 +0100
- Subject: Re: How to keep the archive involatile if the members are involatile?
- References: <firstname.lastname@example.org>
Pan ruochen wrote:
> So I think there is some option for ar to keep the archive unchanged
> if the members are not changed.
> But I can't find it in the manual.
If you're using pretty recent binutils (the feature was only added back in
March), you have the new "deterministic archive" option available:
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.