Hi, I have a question regarding timestamps in libraries that are created by GNU ar (I asked this question yesterday in gnu.gcc but it seems to me this group is not very frequented). Everytime a library is created by ar the timestamps of the object files are included in the resulting library. Is there a way to prevent the timestamps in the library? The problem with the timestamps is that one cannot see directly in a diff if only the timestamps have changed but also functionality has changed. Thanks in advance Karl-Heinz
Timestamps in libraries created by GNU ar
Started by ●July 11, 2008
Reply by ●July 11, 20082008-07-11
KHR wrote:> Everytime a library is created by ar the timestamps of the object > files are included in the resulting library.Of course it is --- after all, the second(!) paragraph of info 'ar' says this: The original files' contents, mode (permissions), timestamp, owner, and group are preserved in the archive, and can be restored on extraction. How could it do that, if it didn't store the timestamps?> Is there a way to prevent the timestamps in the library?I don't think so.> The problem with the timestamps is that one cannot see directly in a > diff if only the timestamps have changed but also functionality has > changed.So don't do that. Un-ar them to separate directories, and diff the object files instead. And don't be too surprised if that doesn't work like you want it to, either. Some object file formats have timestamps inside, too!
Reply by ●July 14, 20082008-07-14
On 11 Jul., 23:44, Hans-Bernhard Br=F6ker <HBBroe...@t-online.de> wrote:> KHR wrote: > > Everytime a library is created by ar the timestamps of the object > > files are included in the resulting library. > > Of course it is --- after all, the second(!) paragraph of info 'ar' says > this: > > The original files' contents, mode (permissions), timestamp, owner, > and group are preserved in the archive, and can be restored on > extraction. > > How could it do that, if it didn't store the timestamps? > > > Is there a way to prevent the timestamps in the library? > > I don't think so. > > > The problem with the timestamps is that one cannot see directly in a > > diff if only the timestamps have changed but also functionality has > > changed. > > So don't do that. Un-ar them to separate directories, and diff the > object files instead. > > And don't be too surprised if that doesn't work like you want it to, > either. Some object file formats have timestamps inside, too!Thank you for your answer. I will try the procedure to un-ar the libs to separate directories. It seems to be the only option.