tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

final steps for reproduceable builds.

One last step remains to make the build fully reproduceable, which
is to change the .a file internal timestamps etc. to be deterministic.

Now that we have cgd's ar(1) changes in -current, we can do the
rest of the job. The following patch makes the .a builds and
installs deterministic as desired.

Note that I've updated the ar flags to current ar usage -- "q" is now
just a synonym for "r", and "s" does the ranlib in the same pass as
the ar. The "D" does the deterministic build.

(Arguably, we should similarly fix -- the default ARFLAGS
in includes "l", for instance, which does nothing.)

Comments on this? (For example, does anyone feel we need a switch to
turn "D" off and restore the ranlib -t on install?) Please let me know
soon -- I'll be committing in a few days.


RCS file: /cvsroot/src/share/mk/,v
retrieving revision 1.295
diff -u -r1.295
---  17 Jan 2009 12:09:58 -0000      1.295
+++  9 Mar 2009 16:51:19 -0000
@@ -444,15 +444,14 @@
 __archivebuild: .USE
        rm -f ${.TARGET}
-       ${AR} cq ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
-       ${RANLIB} ${.TARGET}
+       ${AR} crsD ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
 .if !target(__archiveinstall)
 __archiveinstall: .USE
        ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
-           ${empty(PRESERVE):?-a "${RANLIB} -t":} ${.ALLSRC} ${.TARGET}
+           ${.ALLSRC} ${.TARGET}
 __archivesymlinkpic: .USE

Home | Main Index | Thread Index | Old Index