From owner-freebsd-arch@freebsd.org Fri Jun 24 17:13:31 2016 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F8B9B80D23 for ; Fri, 24 Jun 2016 17:13:31 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50AC22EDC for ; Fri, 24 Jun 2016 17:13:31 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 0EB55B963; Fri, 24 Jun 2016 13:13:30 -0400 (EDT) From: John Baldwin To: freebsd-arch@freebsd.org Cc: Poul-Henning Kamp , Bruce Evans Subject: Re: PowerPC 64-bit time_t Date: Fri, 24 Jun 2016 10:12:13 -0700 Message-ID: <2202995.kTBLB6p9Br@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.3-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <4641.1466766430@critter.freebsd.dk> References: <3FB65E20-0376-4041-86DE-F8CAB7F37314@freebsd.org> <20160624194454.D1013@besplex.bde.org> <4641.1466766430@critter.freebsd.dk> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 24 Jun 2016 13:13:30 -0400 (EDT) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jun 2016 17:13:31 -0000 On Friday, June 24, 2016 11:07:10 AM Poul-Henning Kamp wrote: > -------- > In message <20160624194454.D1013@besplex.bde.org>, Bruce Evans writes: > > >The only practical option for i386 is to change to unsigned time_t before > >2038 and hope that i386 goes away before that runs out in 2106. Changing > >to uint32_t time_t mainly requires doing something with times before the > >Epoch. These are unsupported in POSIX, but are supposed to work back to > >1902 with int32_t in FreeBSD, except 1 second before the Epoch is the > >same as the error code (time_t)(-1) so it doesn't work right. > > I'd recommend it, dates one timezones worth before epoch are far too > common in contemporary traffic (particular HTTP). > > Why don't we make a i387[1] port where time_t is 64 bit and where we jettison > the museum-ready IBM PC baggage ? The common proposal has been to have a freebsd/i386t64 (or some other name). Technically speaking FreeBSD/i386 is already FreeBSD/i486dx anyway (we mandate cmpxchg and an FPU. We might support an external FPU on 486, but that hasn't been tested in a long, long time). It has been pointed out that we can actually make this work by adding a new Elf ABI and that the i386 kernel could support both ABIs by simply choosing the appropriate sysent. For userland we could have a /usr/libt32 or some such that is built with the old ABI similar to /usr/lib32 on amd64 and powerpc64. You could then "stage" this by providing /usr/libt32 for a while and letting people do a cutover where they set a src.conf knob to switch the "default" ABI from plain i386 to i386t64 (depending on /usr/libt32 to run existing binaries during installworld, etc.). We would probably change the default ABI of the next X.0 release to use the new ABI for i386. However, someone has to want to do this to put in the work. -- John Baldwin