Commit Graph

187 Commits

Author SHA1 Message Date
Giacomo Tesio ded03c70bf Merge branch 'upstream-master' into merge-upstream-20200829 2020-08-29 00:05:13 +02:00
Eshan dhawan via Newlib 65918715a0 mips fenv support
Signed-off-by: Eshan dhawan <eshandhawan51@gmail.com>
2020-07-03 10:41:45 +02:00
Eshan dhawan via Newlib 03bf9f431c SPARC fenv support
Signed-off-by: Eshan dhawan <eshandhawan51@gmail.com>
2020-07-03 10:41:45 +02:00
Eshan dhawan via Newlib e6ce6f1430 hard float support for PowerPC taken from FreeBSD
Signed-off-by: Eshan dhawan <eshandhawan51@gmail.com>
2020-06-03 11:17:47 +02:00
Jeff Johnston 8b39f7406c Change the reent verify check option to document disabling it
- also change the handling of default_newlib_reent_check_verify to
  be the same as other default variables in configure.host
- regenerate newlib/configure
2020-01-21 15:12:34 -05:00
Jeff Johnston f5da56ab5c Default newlib_reent_check_verify to yes in configure.host 2020-01-21 14:55:25 -05:00
Dimitar Dimitrov a1f617466d PRU: Align libmath to PRU ABI
The TI proprietary toolchain uses nonstandard names for some math
library functions. In order to achieve ABI compatibility between
GNU and TI toolchains, add support for the TI function names.

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
2019-10-31 15:02:33 -04:00
Dimitar Dimitrov 0c7734673a Initial PRU port for libgloss and newlib
Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
2019-10-31 14:47:19 -04:00
Jeff Johnston cfc4955234 Add patch from Joel Sherrill for i386 and x86_64 fenv support 2019-10-08 16:59:04 -04:00
Jeff Johnston e06f2fbde7 Allow verifying _REENT_CHECK macros memory allocation
- change sys/reent.h to replace _REENT_CHECK_DEBUG with
  _REENT_CHECK_VERIFY which when set asserts that any memory
  allocated is non-NULL and calls __assert_func directly
- add new --enable-newlib-reent-check-verify configure option
- add support for configure.host to specify default for
  newlib_reent_check_verify
- add _REENT_CHECK_VERIFY macro support to acconfig.h and newlib.hin
2019-10-07 15:36:03 -04:00
Giacomo Tesio b674052101 Merge of upstream-master 2019-08-12 01:41:02 +02:00
Jeff Johnston 007bc1923c Add gfortran support for AMD GCN
From: Kwok Cheung Yeung <kcy@codesourcery.com>

This patch adds enough support for constructors/destructors and OS functions
to be able to link and run gfortran programs on AMD GCN.

There's no actual ability to do I/O operations on this targets, besides
"write" to stdout and stderr, so most of the functions are just stubs.
2019-06-07 13:55:43 -04:00
Jeff Johnston 1787e9d033 AMD GCN Port contributed by Andrew Stubbs <ams@codesourcery.com>
Add support for the AMD GCN GPU architecture.  This is primarily intended for
use with OpenMP and OpenACC offloading.  It can also be used for stand-alone
programs, but this is intended mostly for testing the compiler and is not
expected to be useful in general.

The GPU architecture is highly parallel, and therefore Newlib must be
configured to use dynamic re-entrancy, and thread-safe malloc.

The only I/O available is a via a shared-memory interface provided by libgomp
and the gcn-run tool included with GCC.  At this time this is limited to
stdout, argc/argv, and the return code.
2019-01-15 10:48:08 -05:00
Giacomo Tesio a000564873 jehanne: merge upstream changes 2018-11-26 16:27:49 +01:00
Stafford Horne 8ac94ca7bb newlib/configure.host: Set have_init_fini to no for OpenRISC
The new GCC port for OpenRISC will use the init_fini_array only and not
provide the init() and fini() functions.  Disable the function usage by
default as its no longer needed.

Signed-off-by: Stafford Horne <shorne@gmail.com>
2018-11-05 10:02:20 +01:00
Sebastian Huber 5835688440 RTEMS: Use function and data sections
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2018-10-22 11:26:39 +02:00
Christophe Lyon f53ce01125 Define _COMPILING_NEWLIB on aarch64 to define function prototypes from unistd.h.
2018-10-01  Christophe Lyon  <christophe.lyon@linaro.org>

    	* newlib/configure.host: Define _COMPILING_NEWLIB for aarch64.
2018-10-05 13:27:34 +01:00
Hans-Peter Nilsson e3ddbeb84c Committed, CRIS port: fix fallout from time_t defaulting to 64 bits, part 2
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.

newlib:
	* configure.host (cris, crisv32): Default to "long" time_t.

Signed-off-by: Hans-Peter Nilsson <hp@axis.com>
2018-09-13 17:58:01 +02:00
Jon Beniston a9cfb33b6c Add --disable-newlib-fno-builtin to allow compilation without -fno-builtin for smaller and faster code. 2018-08-31 15:40:42 -04:00
Sebastian Huber 6158b30e3e RISC-V: Do not use _init/_fini
Introduce new host configuration variable "have_init_fini" which is set
to "yes" by default.  Override it for RISC-V to "no".

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2018-07-30 10:47:57 +02:00
Jeff Johnston cd31fbb2ae Add nvptx port.
- From: Cesar Philippidis <cesar@codesourcery.com>
  Date: Tue, 10 Apr 2018 14:43:42 -0700
  Subject: [PATCH] nvptx port

  This port adds support for Nvidia GPU's, which are primarily used as
  offload accelerators in OpenACC and OpenMP.
2018-04-13 15:42:37 -04:00
Jaap de Wolff fdc5f52808 Add define _COMPILING_NEWLIB for arm to configure.host, as it is obviously needed
Signed-off-by: Jaap de Wolff <jaap@stretch.de-wolff.org>
2018-02-16 12:16:07 +01:00
Jim Wilson a6633677b9 RISC-V: Add nanosleep functionality 2017-12-26 12:24:45 -08:00
Joel Sherrill b1a388799d newlib/.../getreent.c: Allow to be provided by host and do so for RTEMS
RTEMS provides the option to have a global or per-thread reentrancy
as part of application configuration. As part of this, RTEMS provides
the implementation of __getreent() as appropriate. Allow the target
to determine if this method is present in libc.a.
2017-11-13 10:19:23 +01:00
Joel Sherrill 076ce7098f newlib/configure.host: Remove obsolete definition of _I386MACH_ALLOW_HW_INTERRUPTS
The *-*-rtems* targets defined this even though the conditional
was no longer present in i386/setjmp.S.
2017-11-02 09:27:15 +01:00
Giacomo Tesio 8a57809fe4 jehanne: add fcntl 2017-09-27 00:39:07 +02:00
Giacomo Tesio 95383ee144 jehanne: define SIGNAL_PROVIDED in configure.host 2017-09-14 00:07:08 +02:00
Sebastian Huber f9205f1d47 Let RTEMS provide clock()
Newlib uses _times_r() in clock().  The problem is that the _times_r()
clock frequency is defined by sysconf(_SC_CLK_TCK).  The clock frequency
of clock() is the constant CLOCKS_PER_SEC.

FreeBSD uses getrusage() for clock().  Since RTEMS has only one process,
the implementation can be simplified.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-09-07 07:41:07 +02:00
Giacomo Tesio 185a319fdc jehanne: enable posix and unix functions in configure.host 2017-08-21 00:15:07 +02:00
Giacomo Tesio 075aeba3a9 jehanne: enable posix build 2017-08-19 16:09:36 +02:00
Giacomo Tesio 8fbd328317 jehanne: first try to enable posix (BROKEN) 2017-08-18 01:02:24 +02:00
Giacomo Tesio 1680e696ac Merge branch 'upstream-master' 2017-08-17 22:40:51 +02:00
Kito Cheng 363dbb9e44 Add RISC-V port for newlib
Contributor list:
    - Andrew Waterman  <andrew@sifive.com>
    - Palmer Dabbelt  <palmer@dabbelt.com>
    - Kito Cheng  <kito.cheng@gmail.com>
    - Scott Beamer  <sbeamer@eecs.berkeley.edu>
2017-08-16 18:00:58 -04:00
Giacomo Tesio 6ba8da3d11 jehanne: use upstream print functions with -O0 and --disable-newlib-fvwrite-in-streamio 2017-04-27 23:48:43 +02:00
Giacomo Tesio 595d23fca2 jehanne: fix uio initializations; disable optimizations in print related functions 2017-04-21 21:27:35 +02:00
Giacomo Tesio 0f0315dbff jehanne: initial port 2017-04-18 23:43:16 +02:00
Jeff Johnston 93f5d7c739 Add port for Phoenix-RTOS in common configure files. 2016-05-09 15:23:58 -04:00
Igor Venevtsev 5d3ad3b123 Add Intel MCU target
Intel MCU System V ABI are incompartible with i386 System V ABI:
    o Minimum instruction set is Intel Pentium ISA minus x87 instructions
    o No x87 or vector registers
    o First three args are passed in %eax, %edx and %ecx
    o Full specification available here:
      https://github.com/hjl-tools/x86-psABI/wiki/iamcu-psABI-0.7.pdf

newlib/
    * configure.host: Add new ix86-*-elfiamcu target

newlib/libc/include/
    * setjmp.h: Change _JBLEN for Intel MCU target

newlib/libc/machine/i386/
    * memchr.S:  (memchr)  Target-specific size-optimized version
    * memcmp.S:  (memcmp)  Likewise
    * memcpy.S:  (memcpy)  Likewise
    * memmove.S: (memmove) Likewise
    * memset.S:  (memset)  Likewise
    * setjmp.S:  (setjmp)  Likewise
    * strchr.S:  (strchr)  Likewise
    * strlen.S:  (strlen)  Likewise

newlib/libc/stdlib/
    * srtold.c:  (__flt_rounds) Disable for Intel MCU
2016-04-04 16:32:07 +02:00
Joel Sherrill 4db48d17eb newlib/configure.host: Turn off sti/cli for i386 setjmp for i386-rtems*
When running RTEMS paravirtualized in user space, the cli/sti instructions
can't be used. But I can't see why they are needed in either user or
supervisor state. Turning the use of them off for RTEMS.

This code is unmodified since the beginning of the repository, so I have
no insight into why it was done. I may even have been the one to add them.
Absolutely no idea except they aren't necessary.
2016-03-22 09:45:08 -05:00
Corinna Vinschen b9217601f8 Enable HW interrupt setup on x86/x86_64 systems by default
* configure.host: Define _I386MACH_DISABLE_HW_INTERRUPTS on rdos.
	Remove setting _I386MACH_ALLOW_HW_INTERRUPTS anywhere else.
	* libc/machine/i386/i386mach.h: Replace test for
	_I386MACH_ALLOW_HW_INTERRUPTS with test for
	!_I386MACH_DISABLE_HW_INTERRUPTS.
	* libc/machine/x86_64/x86_64mach.h: Ditto.
	* libc/sys/linux/machine/i386/i386mach.h: Ditto.
	* libm/machine/i386/i386mach.h: Ditto.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-02-26 18:52:46 +01:00
Joel Sherrill 678f774727 newlib/configure.host: Turn off sti/cli for i386 setjmp for i386-rtems* 2016-02-25 14:11:27 -06:00
Anton Kolesov c0a99f0293 Add support for ARC to newlib
newlib/ChangeLog:
2015-11-12  Anton Kolesov  <Anton.Kolesov@synopsys.com>

	* configure.host: Add ARC support.
	* libc/include/machine/setjmp.h: Likewise.
	* libc/machine/configure: Likewise.
	* libc/machine/configure.in: Likewise.
	* libc/machine/arc/Makefile.am: Likewise.
	* libc/machine/arc/Makefile.in: Likewise.
	* libc/machine/arc/aclocal.m4: Likewise.
	* libc/machine/arc/asm.h: Likewise.
	* libc/machine/arc/configure: Likewise.
	* libc/machine/arc/configure.in: Likewise.
	* libc/machine/arc/memcmp-bs-norm.S: Likewise.
	* libc/machine/arc/memcmp-stub.c: Likewise.
	* libc/machine/arc/memcmp.S: Likewise.
	* libc/machine/arc/memcpy-archs.S: Likewise.
	* libc/machine/arc/memcpy-bs.S: Likewise.
	* libc/machine/arc/memcpy-stub.c: Likewise.
	* libc/machine/arc/memcpy.S: Likewise.
	* libc/machine/arc/memset-archs.S: Likewise.
	* libc/machine/arc/memset-bs.S: Likewise.
	* libc/machine/arc/memset-stub.c: Likewise.
	* libc/machine/arc/memset.S: Likewise.
	* libc/machine/arc/setjmp.S: Likewise.
	* libc/machine/arc/strchr-bs-norm.S: Likewise.
	* libc/machine/arc/strchr-bs.S: Likewise.
	* libc/machine/arc/strchr-stub.c: Likewise.
	* libc/machine/arc/strchr.S: Likewise.
	* libc/machine/arc/strcmp-archs.S: Likewise.
	* libc/machine/arc/strcmp-stub.c: Likewise.
	* libc/machine/arc/strcmp.S: Likewise.
	* libc/machine/arc/strcpy-bs-arc600.S: Likewise.
	* libc/machine/arc/strcpy-bs.S: Likewise.
	* libc/machine/arc/strcpy-stub.c: Likewise.
	* libc/machine/arc/strcpy.S: Likewise.
	* libc/machine/arc/strlen-bs-norm.S: Likewise.
	* libc/machine/arc/strlen-bs.S: Likewise.
	* libc/machine/arc/strlen-stub.c: Likewise.
	* libc/machine/arc/strlen.S: Likewise.
	* libc/machine/arc/strncpy-bs.S: Likewise.
	* libc/machine/arc/strncpy-stub.c: Likewise.
	* libc/machine/arc/strncpy.S: Likewise.
2015-11-12 14:14:17 +01:00
Anton Kolesov e945a19cb2 Remove obsolete ARC system
ARC architecture specific files has been added ages ago in newlib/libc/sys,
but with invention of libgloss those files should be moved from newlib to
libgloss.

newlib/ChangeLog:
2015-11-12  Anton Kolesov  <Anton.Kolesov@synopsys.com>

	* configure.host: Remove ARC system.
	* libc/sys/configure: Likewise.
	* libc/sys/configure.in: Likewise.
	* libc/sys/arc/Makefile.am: Likewise.
	* libc/sys/arc/Makefile.in: Likewise.
	* libc/sys/arc/aclocal.m4: Likewise.
	* libc/sys/arc/configure: Likewise.
	* libc/sys/arc/configure.in: Likewise.
	* libc/sys/arc/crt0.S: Likewise.
	* libc/sys/arc/dummy.S: Likewise.
	* libc/sys/arc/isatty.c: Likewise.
	* libc/sys/arc/mem-layout.c: Likewise.
	* libc/sys/arc/sbrk.c: Likewise.
	* libc/sys/arc/sys/syscall.h: Likewise.
	* libc/sys/arc/syscalls.c: Likewise.
2015-11-12 14:03:05 +01:00
Jeff Johnston f296bb3569 Minimize newlib code size for ft32
* configure.host (ft32): minimise newlib code size
2015-09-22 18:12:23 -04:00
Jeff Johnston 948b5f0043 Add support for ft32 to newlib. 2015-09-04 14:37:37 -04:00
Eric Botcazou bf8f43ae8a * COPYING.LIBGLOSS: Add Controls and Data Services copyright.
* COPYING.NEWLIB: Likewise.
libgloss/
	* configure.in: Add Visium support.
	* configure: Regenerate.
	* visium/: New directory.
newlib/
	* configure.host: Add Visium support.
	* libc/machine/configure.in: Likewise.
	* libc/machine/configure: Regenerate.
	* libc/machine/visium/: New directory.
	* libc/include/machine/setjmp.h (_JBLEN): Define for Visium.
	* libc/include/machine/ieeefp.h (__IEEE_BIG_ENDIAN): Likewise.
	* libc/include/machine/time.h (_CLOCKS_PER_SEC_): Likewise.
2015-01-21 18:27:47 +00:00
Corinna Vinschen d0695096ba * configure.host: Add extra system for OpenRISC baremetal. 2015-01-20 09:59:40 +00:00
Corinna Vinschen 0cbcde7bdb * configure.host: Add libm nds32 machine directory.
* libm/machine/configure: Regenerated.
	* libm/machine/configure.in: Add nds32 AC_CONFIG.
	* libm/machine/nds32/Makefile.am: New file.
	* libm/machine/nds32/Makefile.in: Generated.
	* libm/machine/nds32/aclocal.m4: Generated.
	* libm/machine/nds32/configure: Generated.
	* libm/machine/nds32/configure.in: New file.
	* libm/machine/nds32/w_sqrt.S: New file.
	* libm/machine/nds32/wf_sqrt.S: New file.
2014-12-15 13:27:38 +00:00
Jeff Johnston f58bc5991f 2014-12-12 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
* configure.host: or1knd support, OpenRISC without delay slot
        * libc/include/machine/setjmp.h: Add or1knd
        * libc/machine/or1k/setjmp.S: Optional delay slot
2014-12-12 21:14:06 +00:00
Nick Clifton d5692c713f PR target/63901
* configure.host (msp430): Add -mhwmult=none to newlib_cflags.
2014-11-21 11:55:39 +00:00