Date: Wed, 13 Oct 2010 14:55:18 +1100 (EST) From: Bruce Evans <brde@optusnet.com.au> To: Erik Cederstrand <erik@cederstrand.dk> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, Ben Kaduk <minimarmot@gmail.com>, Tim Kientzle <kientzle@freebsd.org>, Bruce Evans <brde@optusnet.com.au>, svn-src-head@freebsd.org Subject: Re: svn commit: r213643 - head/usr.bin/ar Message-ID: <20101013143845.I1817@besplex.bde.org> In-Reply-To: <2A26ECE8-7713-49C4-8706-5AA5B232BE29@cederstrand.dk> References: <201010090531.o995V8n3026865@svn.freebsd.org> <AANLkTim8kj2X7fJMyRHTsXWFs8tvE07439w3Rzan7W1e@mail.gmail.com> <8C667EA1-3012-4499-BCCE-58263165663B@cederstrand.dk> <20101010083725.S3587@besplex.bde.org> <2A26ECE8-7713-49C4-8706-5AA5B232BE29@cederstrand.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 10 Oct 2010, Erik Cederstrand wrote: > Den 10/10/2010 kl. 00.11 skrev Bruce Evans: > >> On Sat, 9 Oct 2010, Erik Cederstrand wrote: >>>> >>>> Thanks! Has anyone looked at the feasibility of setting AR?=ar -D in >>>> sys.mk? I will probably try this when I get my scratch box up again. >> >> I hope not. The default behaviour should not be changed by default. > > The reason I came up with this patch was that I wanted to do binary diffs on FreeBSD distributions to, among other reasons, record witch files are actually affected between commits. Except for a few edge-cases like recording a build timestamp, it seems wrong in my view for FreeBSD to not produce deterministic distributions on identical source code. 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. >> The primary user of ${AR} for FreeBSD builds, namely bsd.lib.mk, doesn't >> even use ${ARFLAGS}, so it is missing from the above list. It uses the >> literal `cq' whenever it uses the non-literal ${AR}. Perhaps ar is often >> spelled `ar' too. > > > 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. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101013143845.I1817>