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 sys.mk -- the sys.mk default ARFLAGS
in sys.mk 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.


Perry


Index: bsd.lib.mk
===================================================================
RCS file: /cvsroot/src/share/mk/bsd.lib.mk,v
retrieving revision 1.295
diff -u -r1.295 bsd.lib.mk
--- bsd.lib.mk  17 Jan 2009 12:09:58 -0000      1.295
+++ bsd.lib.mk  9 Mar 2009 16:51:19 -0000
@@ -444,15 +444,14 @@
 __archivebuild: .USE
        ${_MKTARGET_BUILD}
        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}`
 .endif
 
 .if !target(__archiveinstall)
 __archiveinstall: .USE
        ${_MKTARGET_INSTALL}
        ${INSTALL_FILE} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
-           ${empty(PRESERVE):?-a "${RANLIB} -t":} ${.ALLSRC} ${.TARGET}
+           ${.ALLSRC} ${.TARGET}
 .endif
 
 __archivesymlinkpic: .USE


Home | Main Index | Thread Index | Old Index