Back to the Future - 64-bit time_t on sparc64

Marcel Moolenaar marcel at
Sat Feb 21 13:18:33 PST 2004

On Sat, Feb 21, 2004 at 01:59:06PM -0500, Garance A Drosihn wrote:
> Why do we want to allow 32-bit builds?
> Because the instructions say:
>        First do a 32-bit build.  Install it.
>        Once you know that that installation is working,
>        Change _types.h, do a 64-bit build, and install that.

If we are going to commit this stuff, the requirement to build a
32-bit time_t system first, apply the one-liner to _types.h and
rebuild a 64-bit time_t from the same source tree is not going to
fly anymore. We need to realize that we get people who upgrade
a 32-bit time_t many months old to a 64-bit time_t in a single
pass. This is a risk we need to take. As long as people do not
install anything, a buildworld or buildkernel can fail. The part
that is tricky is that the executables actually run. I'm not too
worried about that.

Note also that we should not make a mountain out of this. I think
upgrading should not be made harder than it really is. All we need
to do is protect the installation targets so that people are
forced to run the scripts when they need to. Remember that we
probably want the footshooting measure for the whole 5-stable
lifetime. Just to be on the safe side.

See attached patch for an implementation of the concept,

 Marcel Moolenaar	  USPA: A-39004		 marcel at
-------------- next part --------------
Index: Makefile.inc1
RCS file: /home/ncvs/src/Makefile.inc1,v
retrieving revision 1.405
diff -u -r1.405 Makefile.inc1
--- Makefile.inc1	13 Feb 2004 21:52:08 -0000	1.405
+++ Makefile.inc1	21 Feb 2004 21:15:28 -0000
@@ -342,12 +342,25 @@
 buildworld: ${WMAKE_TGTS}
+.if ${TARGET_ARCH} == "sparc64"
+OLD_TIME_T!= grep __time_t /usr/include/machine/_types.h | awk '{print $2}'
+NEW_TIME_T!= grep __time_t ${.CURDIR}/sys/sparc64/include/_types.h | awk '{print $2}'
+.if ${OLD_TIME_T} != ${NEW_TIME_T}
+	echo use the scripts, Luke!
+	false
 # installcheck
 # Checks to be sure system is ready for installworld
+installcheck: ${SPARC64_ANTI_FOOTSHOOTING}
 .if !defined(NO_SENDMAIL)
 	@if ! `id -u smmsp > /dev/null`; then \
 		echo "ERROR: Required smmsp user is missing, see /usr/src/UPDATING."; \
@@ -503,6 +516,9 @@
 # Install the kernel defined by INSTALLKERNEL
+installkernel installkernel.debug: ${SPARC64_ANTI_FOOTSHOOTING}
+reinstallkernel reinstallkernel.debug: ${SPARC64_ANTI_FOOTSHOOTING}
 installkernel reinstallkernel installkernel.debug reinstallkernel.debug:
 	@echo "ERROR: No kernel \"${KERNCONF}\" to install."

More information about the freebsd-sparc64 mailing list