Den 22/10/2010 kl. 12.01 skrev Ulrich Spörlein: > > Why do you make this a requirement? Of course it's usually easier to > build different releases from different source directories, but I think > requiring the following conditions are fine: > > 1. If you build a specific svn revision, > 2. sitting in /usr/src with > 3. the default make.conf (ie., no special flags, no frobbing of OBJDIR) > 4. at different times > > then you get the same binaries. > > Let's start with an achievable, not-so-intrusive goal, right?
Attached is a patch which addresses the simple case where OBJDIR, SRCDIR and SVN revision are constant, and DESTDIR and build time are different across builds. It does the following: * Patches ranlib to produce generic symbol table (-D option, patch also sent to Kai Wang) * Patches sendmail config scripts to output generic headers for config files * Patches a swath of Makefiles in /contrib that override $ARFLAGS * Removes debugging flag from bthidd Makefile * Adds -D to ARFLAGS and RANLIB * Adds -frandom-seed to CXXflags All the above are only activated if "WITH_DETERMINISTIC=true" is passed to make: make WITH_DETERMINISTIC=true buildworld/kernel If I could get sendmail config scripts to see src.conf, then it would be possible to place the flag in src.conf. Normal "make buildworld" should be unaffected by the patch. I have attempted to keep the diff as small as possible. Next goal is making buildworld immune to changing OBJDIRs. Erik
deterministic.patch
Description: Binary data