tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
patch: make build.sh create deterministic C++ output
The following patch turns on Joerg's BUILDSEED feature for all
build.sh builds. It sets BUILDSEED to NetBSD-majorversion (i.e. right
now, NetBSD-4, soon NetBSD-5, etc.), and provides a -S flag so that
the BUILDSEED may be set to a different value if people wish.
Are there objections to my committing it?
Perry
Index: build.sh
===================================================================
RCS file: /cvsroot/src/build.sh,v
retrieving revision 1.189
diff -u -r1.189 build.sh
--- build.sh 27 Jun 2008 21:38:36 -0000 1.189
+++ build.sh 4 Aug 2008 18:03:20 -0000
@@ -241,6 +241,10 @@
#
DISTRIBVER="$(${HOST_SH} ${TOP}/sys/conf/osrelease.sh)"
+ # Set the BUILDSEED to NetBSD-"N"
+ #
+ setmakeenv BUILDSEED "NetBSD-$(${HOST_SH} ${TOP}/sys/conf/osrelease.sh
-m)"
+
# Set various environment variables to known defaults,
# to minimize (cross-)build problems observed "in the field".
#
@@ -509,9 +513,10 @@
fi
cat <<_usage_
-Usage: ${progname} [-EnorUux] [-a arch] [-B buildid] [-C cdextras] [-D dest]
- [-j njob] [-M obj] [-m mach] [-N noisy] [-O obj] [-R release]
- [-T tools] [-V var=[value]] [-w wrapper] [-X x11src] [-Z var]
+Usage: ${progname} [-EnorUux] [-a arch] [-B buildid] [-C cdextras]
+ [-D dest] [-j njob] [-M obj] [-m mach] [-N noisy]
+ [-O obj] [-R release] [-S seed] [-T tools]
+ [-V var=[value]] [-w wrapper] [-X x11src] [-Z var]
operation [...]
Build operations (all imply "obj" and "tools"):
@@ -562,6 +567,7 @@
-o Set MKOBJDIRS=no; do not create objdirs at start of build.
-R release Set RELEASEDIR to release. [Default: releasedir]
-r Remove contents of TOOLDIR and DESTDIR before building.
+ -S seed Set BUILDSEED to seed. [Default: NetBSD-majorversion]
-T tools Set TOOLDIR to tools. If unset, and TOOLDIR is not set in
the environment, ${toolprefix}make will be (re)built
unconditionally.
-U Set MKUNPRIVED=yes; build without requiring root privileges,
@@ -581,7 +587,7 @@
parseoptions()
{
- opts='a:B:bC:D:dEhi:j:k:M:m:N:nO:oR:rT:tUuV:w:xX:Z:'
+ opts='a:B:bC:D:dEhi:j:k:M:m:N:nO:oR:rS:T:tUuV:w:xX:Z:'
opt_a=no
if type getopts >/dev/null 2>&1; then
@@ -707,6 +713,11 @@
do_rebuildmake=true
;;
+ -S)
+ eval ${optargcmd}
+ setmakeenv BUILDSEED "${OPTARG}"
+ ;;
+
-T)
eval ${optargcmd}; resolvepath
TOOLDIR="${OPTARG}"
Home |
Main Index |
Thread Index |
Old Index