From owner-freebsd-sparc64@FreeBSD.ORG Sat Feb 21 13:18:33 2004 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AB36516A4CE; Sat, 21 Feb 2004 13:18:33 -0800 (PST) Received: from ns1.xcllnt.net (209-128-86-226.bayarea.net [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5BDEC43D1D; Sat, 21 Feb 2004 13:18:33 -0800 (PST) (envelope-from marcel@xcllnt.net) Received: from dhcp01.pn.xcllnt.net (dhcp01.pn.xcllnt.net [192.168.4.201]) by ns1.xcllnt.net (8.12.10/8.12.10) with ESMTP id i1LLIOOE029455; Sat, 21 Feb 2004 13:18:24 -0800 (PST) (envelope-from marcel@piii.pn.xcllnt.net) Received: from dhcp01.pn.xcllnt.net (localhost [127.0.0.1]) i1LLIJqt095964; Sat, 21 Feb 2004 13:18:19 -0800 (PST) (envelope-from marcel@dhcp01.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp01.pn.xcllnt.net (8.12.11/8.12.11/Submit) id i1LLIJ9W095951; Sat, 21 Feb 2004 13:18:19 -0800 (PST) (envelope-from marcel) Date: Sat, 21 Feb 2004 13:18:18 -0800 From: Marcel Moolenaar To: Garance A Drosihn Message-ID: <20040221211818.GA71845@dhcp01.pn.xcllnt.net> References: <20040219143838.GL68388@seekingfire.com> <20040219204008.GB3545@electra.cse.Buffalo.EDU> <20040219205750.GC3545@electra.cse.Buffalo.EDU> <20040220035635.GA69900@dhcp01.pn.xcllnt.net> <20040221140438.M87450@beagle.fokus.fraunhofer.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="y0ulUmNC+osPPQO6" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i cc: ru@freebsd.org cc: sparc64@freebsd.org Subject: Re: Back to the Future - 64-bit time_t on sparc64 X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Feb 2004 21:18:33 -0000 --y0ulUmNC+osPPQO6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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@xcllnt.net --y0ulUmNC+osPPQO6 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="sparc.diff" 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} .ORDER: ${WMAKE_TGTS} +.if ${TARGET_ARCH} == "sparc64" +SPARC64_ANTI_FOOTSHOOTING=sparc64_installcheck +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}' + +sparc64_installcheck: +.if ${OLD_TIME_T} != ${NEW_TIME_T} + echo use the scripts, Luke! + false +.endif + +.endif + # # installcheck # # Checks to be sure system is ready for installworld # -installcheck: +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: .if empty(INSTALLKERNEL) @echo "ERROR: No kernel \"${KERNCONF}\" to install." --y0ulUmNC+osPPQO6--