Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Jun 2016 10:12:13 -0700
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-arch@freebsd.org
Cc:        Poul-Henning Kamp <phk@phk.freebsd.dk>, Bruce Evans <brde@optusnet.com.au>
Subject:   Re: PowerPC 64-bit time_t
Message-ID:  <2202995.kTBLB6p9Br@ralph.baldwin.cx>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2202995.kTBLB6p9Br>