Timestamps in libraries created by GNU ar

Jul 11, 2008 2 Replies

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


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?

I don't think so.

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.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required