svn commit: r213643 - head/usr.bin/ar

Erik Cederstrand erik at cederstrand.dk
Thu Oct 14 08:36:26 UTC 2010


Den 13/10/2010 kl. 05.55 skrev Bruce Evans:

> I also don't like distributions that stamp every file with their release
> build time (or maybe a little later, with a single release time).  How would
> do you prevent clobbering metadata outside of archives?  What I do is install
> with -C -p (and also -v -v to report changes), and then compare installed
> copies or just look at the install -v -v output.

What does install(1) do to determine if files are different, if not mtime, size or checksums? Metadata like OBJDIR, SRCDIR, timestamps and user email address might still differ, even though the binaries are functionally equivalent. Would strip(1) or objcopy(1) be able to remove or alter these?

>> I'm a real beginner here. As I read the manuals (GNU ar and BSD ar), the only flags that really control archive contents on archive creation is 'q' and 'r'. The 'l' is ignored, 'c' and 'v' control verbosity, and 'u' and 's' are for performance purposes that are largely irrelevant today (extracting every single *.a file and recreating it wit ar -rD takes less than 10 secs on my slow machine). Is there any negative impact at runtime from having all archives created with either -rD or -qD (ignoring verbosity at build time for now)?
> 
> I don't really know.  's' is also useful for non-libraries.  'u' is related
> to clobbering times, but goes the wrong way by updating the archive if the
> file is newer.  I think all FreeBSD libraries should be built with the same
> flags (probably ARFLAGS, with you putting -D in it if you don't want the
> timestamp update).  However, the places that already use ARFLAGS but set it
> themselves may be a problem.  Some Makefiles initentionally avoid using
> bsd.lib.mk because they are special and it does the wrong things for them.
> They probably don't really care about the exact archive flags, but need to
> be checked individually.

I'd like to give it a try. This is where an easy-to-use regression suite with reasonable coverage for FreeBSD would come in handy :-)

Thanks,
Erik


More information about the svn-src-head mailing list