[TUHS] Reproducible builds in the Seventh Research Edition
Diomidis Spinellis via TUHS
tuhs at tuhs.org
Mon Jan 19 00:44:30 AEST 2026
I noticed that most makefiles in the Seventh Research Edition Unix
/usr/src/cmd directory contain two non-default rules: *cp* to build and
copy the executable file to its destination and *cmp* to build and
compare the executable against its destination. Both then delete the
object and executable files. Here's an example from awk [1].
all: awk
cp: awk
cp awk /bin/awk
rm *.o awk.h proc awk proctab.c y.tab.h
cmp: awk
cmp awk /bin/awk
rm *.o awk.h proc awk proctab.c y.tab.h
Does anyone know the main reason for the *cmp* rule? Was it to check
that the source code matched the system's executable; to check that an
updated compiler still produced the same executable; or to check against
disk corruption?
In any case, it appears that in the 1970s Unix supported reproducible
builds, a property that got lost as build tool chains got more complex
and became a thing decades later [2].
[1]
https://github.com/dspinellis/unix-history-repo/blob/Research-V7/usr/src/cmd/awk/makefile
[2] https://en.wikipedia.org/wiki/Reproducible_builds
Diomidis - https://www.spinellis.gr
More information about the TUHS
mailing list