acadia-newlib/newlib/libc/machine
Roger Sayle 6bb96d13a2 nvptx: Emulate clock and other machine stubs.
This patch to the libc/machine/nvptx port of newlib implements an
approximation of "clock" and provides some additional stub routines.
These changes not only reduce the number of (link) failures in the GCC
testsuite when targeting nvptx-none, but also allow the NIST scimark4
benchmark to compile and run without modification.

newlib already contains support for backends to provide their own
clock implementations via -DCLOCK_PROVIDED.  That functionality is
used here to return an approximate elapsed time based on the NVidia
GPU's clock64 cycle counter.  Although not great, this is better than
the current behaviour of link error from the unresolved symbol
_times_r.

The other part of the patch is to add a small number of stub functions
to nvptx's misc.c.  Adding isatty, for example, resolves linking
problems in libc from the dependency in __smakebuf_r, and the sync
stub, for example, fixes the failure with GCC's
testsuite/gfortran.dg/ISO_Fortran_binding_14.f90 [which simply tests
that gfortran can call a/any C function].

newlib/
        configure.host: Add -DCLOCK_PROVIDED to newlib_cflags on nvptx*.

newlib/libc/machine/nvptx
        Makefile.am: Add clock.c to lib_a_SOURCES.
        clock.c: New source file to implement/approximate clock().
        misc.c: Add stubs for fstat, isatty, open, sync and unlink.
2021-08-25 10:20:27 +02:00
..
a29k Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
aarch64 aarch64: support binary mode for opening files 2021-05-26 15:17:11 +01:00
amdgcn Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
arc Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
arm Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
bfin Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
cr16 Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
cris Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
crx Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
csky Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
d10v Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
d30v Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
epiphany Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
fr30 Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
frv Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
ft32 Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
h8300 Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
h8500 Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
hppa Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
i386 fenv: Move shared x86 sys/fenv.h from x86_64 to shared_x86 2021-04-13 12:55:33 +02:00
i960 Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
iq2000 Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
lm32 Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
m32c Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
m32r Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
m68hc11 Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
m68k Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
m88k Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
mep Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
microblaze Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
mips Removed Soft float from MIPS 2021-02-05 10:32:16 +01:00
mn10200 Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
mn10300 Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
moxie Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
msp430 Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
mt Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
nds32 Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
necv70 Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
nios2 Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
nvptx nvptx: Emulate clock and other machine stubs. 2021-08-25 10:20:27 +02:00
or1k Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
powerpc Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
pru Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
riscv RISC-V: Fix optimized strcmp on big endian 2021-02-25 12:14:18 +01:00
rl78 Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
rx Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
sh Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
shared_x86/sys Cygwin: don't export _feinitialise from newlib 2021-04-13 12:55:34 +02:00
sparc Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
spu Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
tic4x Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
tic6x Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
tic80 Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
v850 Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
visium Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
w65 Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
x86_64 fenv: Move shared x86 sys/fenv.h from x86_64 to shared_x86 2021-04-13 12:55:33 +02:00
xc16x Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
xscale Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
xstormy16 Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
z8k Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
Makefile.am Make newlib manpages (v3) 2016-07-04 14:17:10 +01:00
Makefile.in Regenerate newlib Makefiles 2016-07-04 17:13:55 +01:00
aclocal.m4 2012-12-20 Jeff Johnston <jjohnstn@redhat.com> 2012-12-20 21:10:27 +00:00
configure Bump up newlib version to 4.1.0 2020-12-18 18:50:49 -05:00
configure.in Port of C-SKY for newlib 2020-09-23 15:08:59 -04:00