newlib/libgloss/cris
Hans-Peter Nilsson a6837ca34f Committed, CRIS port: fix fallout from time_t defaulting to 64 bits, part 1
It's been a while...  I see the CRIS port broke with the
time_t-default-to-64-bit change, observable by a few test-cases in the
gcc fortran(!) tests failing, regressing when trying a recent newlib.

This is a two-part belt-and-suspenders change: adjust the CRIS port
gettimeofday syscall (the only one in newlib/CRIS passing a time_t or
struct timeval) to handle a userspace 64-bit time_t and secondly default
time_t to 32-bit long anyway.  I considered making the local
"kernel_timeval" copy in _gettimeofday conditional on (userspace) time_t
being 64 bits, but thought it not worth bothering with the few move insns.
The effect of a 64-bit time_t is however observable as longer simulation
time when running the gcc testsuite and as bigger binaries without any
actual upside from the larger time_t size, so I thought better make the
default for this port go back to being a "long" again.

Tested by running the gcc testsuite over the three combinations of two
parts of the patch and observing the expected changes.  Committed.

libgloss:
	Adjust for syscall and userspace having different time_t or timeval.
	* cris/linunistd.h (kernel_time_t, kernel_suseconds_t, kernel_timeval):
	New types.
	(gettimeofday): Change the type of the first argument to be a
	pointer to a struct kernel_timeval.
	* cris/gensyscalls (_gettimeofday): Use an intermediate struct
	kernel_timeval for the syscall and initialize the result from
	that.

Signed-off-by: Hans-Peter Nilsson <hp@axis.com>
2018-09-13 17:57:11 +02:00
..
Makefile.in libgloss: cris: respect DESTDIR when installing 2012-03-24 03:38:28 +00:00
aclocal.m4 2006-04-19 Jeff Johnston <jjohnstn@redhat.com> 2006-04-19 19:44:05 +00:00
configure [newlib] 2008-04-04 21:52:01 +00:00
configure.in 2006-05-10 Jeff Johnston <jjohnstn@redhat.com> 2006-05-10 20:51:41 +00:00
crt0.S Committed, libgloss: hook up cris-elf to the initfini-array support. 2017-01-29 21:23:32 +01:00
crti.c 2005-01-27 Hans-Peter Nilsson <hp@axis.com> 2005-01-27 22:57:32 +00:00
crtn.c * cris/crt0.S: Use jump, not ba, to skip the interrupt table. Use 2007-02-21 14:08:26 +00:00
gensyscalls Committed, CRIS port: fix fallout from time_t defaulting to 64 bits, part 1 2018-09-13 17:57:11 +02:00
irqtable.S * cris/crt0.S: Use jump, not ba, to skip the interrupt table. Use 2007-02-21 14:08:26 +00:00
lcrt0.c Committed, libgloss: hook up cris-elf to the initfini-array support. 2017-01-29 21:23:32 +01:00
linunistd.h Committed, CRIS port: fix fallout from time_t defaulting to 64 bits, part 1 2018-09-13 17:57:11 +02:00
outbyte.c 2005-01-27 Hans-Peter Nilsson <hp@axis.com> 2005-01-27 22:57:32 +00:00
setup.S * cris/crt0.S: Use jump, not ba, to skip the interrupt table. Use 2007-02-21 14:08:26 +00:00