Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-08-18newlib: add Xtensa portAlexey Lapshin
2023-04-19Add posix_spawn_file_actions_add{f}chdir_npCorinna Vinschen
These are defined as _np functions and available in glibc, musl, macOS, FreeBSD, Solaris ≥ 11.3 They are likely to be standardized without the _np suffix as a result of Austin Group issue 1208. if so, both names will be kept as aliases. Introduce HAVE_CHDIR and HAVE_FCHDIR to allow building on systems not providing these calls. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-19nvptx: Remove newlib ELIX level 1 restrictionThomas Schwinge
Such a hard-coded ELIX level restriction is only being applied for nvptx newlib -- but we'd actually like higher levels' functions available there, too. (Users continue to be able to override this via newlib 'configure', as for every other newlib target.) This already enables GCC test cases that currently FAIL due to 'unresolved symbol strndup' ('gcc.dg/builtin-dynamic-object-size-0.c'), or 'unresolved symbol mempcpy' ('gcc.dg/torture/pr45636.c'), for example. Co-authored-by: Andrew Stubbs <ams@codesourcery.com>
2023-01-18amdgcn: Add vectorized math routinesKwok Cheung Yeung
This implements a set of vectorized math routines to be used by the compiler auto-vectorizer. Versions for vectors with 2 lanes up to 64 lanes (in powers of 2) are provided. These routines are based on the scalar versions of the math routines in libm/common, libm/math and libm/mathfp. They make extensive use of the GCC C vector extensions and GCN-specific builtins in GCC.
2022-12-16Revert "amdgcn: Add vectorized math routines"Jeff Johnston
This reverts commit 125e39bfea1a39341a60348c93a65cf4894e0f2a.
2022-12-16amdgcn: Add vectorized math routinesKwok Cheung Yeung
This implements a set of vectorized math routines to be used by the compiler auto-vectorizer. Versions for vectors with 2 lanes up to 64 lanes (in powers of 2) are provided. These routines are based on the scalar versions of the math routines in libm/common, libm/math and libm/mathfp. They make extensive use of the GCC C vector extensions and GCN-specific builtins in GCC.
2022-09-19Implement sysconf for ArmJeff Johnston
- add support for using sysconf to get page size in _mallocr.c via HAVE_SYSCONF_PAGESIZE flag set in configure.host - set flag in configure.host for arm and add a default sysconf implementation in libc/sys/arm that returns the page size - the default implementation can be overridden outside newlib to allow a different page size to improve malloc on devices with a small footprint without needing to rebuild newlib - this patch is based on a contribution from Torbjorn Svensson and Niklas Dahlquist (https://ecos.sourceware.org/ml/newlib/current/017616.html)
2022-08-03Cygwin: drop requirement to build newlib's stdio64Corinna Vinschen
Given that 64 bit Cygwin defines all file access types (off_t, fpos_t, and derived types) as 64 bit anyway, there's no reason left to rely on the stdio64 part of newlib. Use base functions and base types. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-03-29newlib: drop phoenix supportMike Frysinger
This code has not been updated since 2016, and it looks like it has rotted quite a bit since. It does not build against the current set of phoenix sources -- I had to hack both the kernel headers and the newlib headers up to get it to build, and I still have no idea if it actually links or runs. It seems like the project itself has moved away from newlib and to its own C library: https://phoenix-rtos.com/documentation/libc/README.md So since there's no interest from the phoenix folks to maintain this, and it has a significant amount of non-standard code that we try to keep up-to-date (without actually testing it), just punt it all.
2022-02-16newlib: drop support for decstation & sunos systemsMike Frysinger
These targets don't actually cross-compile -- they try to pull some objects out of the host's /lib/libc.a, /lib/libm.a, and /lib/crt0.o directly and merge them into newlib's own libraries. This is hard to keep working and impossible to test. Considering the vintage of such targets, and gcc dropping them many many years ago, drop them from newlib too. This will make cleaning up the build a lot easier.
2022-02-10newlib: drop support for $oextMike Frysinger
This was needed only to support libtool in case objects ended in .lo instead of .o, but we dropped libtool, so drop this too.
2022-02-10newlib: drop support for $aextMike Frysinger
This was needed only to support libtool in case the library ended in .la instead of .a, but we dropped libtool, so drop this too.
2022-02-10newlib: drop libtool supportMike Frysinger
This was only ever used for i?86-pc-linux-gnu targets, but that's been broken for years, and has since been dropped. So clean this up too. This also deletes the funky objectlist logic since it only existed for the libtool libraries. Since it was the only thing left in the small Makefile.shared file, we can punt that too.
2022-02-10newlib: drop i?86-pc-linux-* target supportMike Frysinger
This was added 20+ years ago. It seems to have very few (or no users) as it only works on 32-bit x86 GNU/Linux (i.e. glibc) systems, and even then only with old versions of glibc. It hasn't compiled in at least 5 years, but most likely been broken for more like 15 years -- it relies on internal glibc APIs (like linuxthreads), and that code has changed and been deleted significantly since. This single target ends up dragging in a lot of non-trivial code that is hard to keep working, and currently impossible to verify -- the libtool and iconvdata and sys/linux/ code isn't used by anything else, but ends up touching just about every build file in the tree. Punt the target so we can start stripping out all these unique code paths. This commit by itself just disables the target. We'll start deleting the individual unused pieces in followups.
2022-02-02newlib: rename libc_cv_ prefix to newlib_cv_Mike Frysinger
We've been using both libc_cv_ and newlib_cv_ for our cache vars. Let's consolidate on newlib_cv_ to avoid conflicts with glibc which is already using the libc_cv_ prefix.
2022-01-29newlib: fix cygwin -I pathMike Frysinger
This code snippet assumed it was only ever run in the top configure script where srcdir would point to newlib/ which is parallel to the winsup/ tree. This is incorrect for all of the subdir configure scripts leading to bad -I flags in $(CC). Switch it over to the new abs_newlib_basedir which should work in all subdirs.
2022-01-20newlib: internalize HAVE_INITFINI_ARRAYMike Frysinger
This define is only used by newlib internally, so stop exporting it as HAVE_INITFINI_ARRAY since this can conflict with defines packages use themselves. We don't really need to add _ to HAVE_INIT_FINI too since it isn't exported in newlib.h, but might as well be consistent here. We can't (easily) add this to newlib_cflags like HAVE_INIT_FINI is because this is based on a compile-time test in the top configure, not on plain shell code in configure.host. We'd have to replicate the test in every subdir in order to have it passed down.
2021-11-16change _COMPILING_NEWLIB to _LIBCMike Frysinger
Use the same name as glibc & gnulib to indicate "newlib itself is being compiled". This also harmonizes the codebase a bit in that _LIBC was already used in places instead of _COMPILING_NEWLIB. Building for bfin-elf, mips-elf, and x86_64-pc-cygwin produces the same object code.
2021-11-12define _COMPILING_NEWLIB for all targets when compilingMike Frysinger
The _COMPILING_NEWLIB symbol is for declaring "the code is being compiled for newlib itself" so headers can change behavior vs the header being used by users (who should get the normal clean API). Unfortunately, this symbol is defined inconsistently leading to it only being useful for a few subsections of the tree. Pull it out so that it's defined all the time for all targets.
2021-08-25nvptx: Emulate clock and other machine stubs.Roger Sayle
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-06-09pru: Enable -ffunction-sections and -fdata-sectionsDimitar Dimitrov
Recent binutils support --gc-sections for pru, so let's make use of them. Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
2021-04-13configure.host: define shared ix86 and x86_64 directoryCorinna Vinschen
Add a directory libc/machine/shared_x86 to share header files between ix86 and x86_64 architectures. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2021-04-13Add build mechanism to share common header files between machinesCorinna Vinschen
So far the build mechanism in newlib only allowed to either define machine-specific headers, or headers shared between all machines. In some cases, architectures are sufficiently alike to share header files between them, but not with other architectures. A good example is ix86 vs. x86_64, which share certain traits with each other, but not with other architectures. Introduce a new configure variable called "shared_machine_dir". This dir can then be used for headers shared between architectures. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2020-09-23Port of C-SKY for newlibJojo R
Contributor list:   - Lifang Xia <lifang_xia@c-sky.com>   - Jojo R <jiejie_rong@c-sky.com>   - Xianmiao Qu <xianmiao_qu@c-sky.com>   - Yunhai Shang <yunhai_shang@c-sky.com>
2020-07-03mips fenv supportEshan dhawan via Newlib
Signed-off-by: Eshan dhawan <eshandhawan51@gmail.com>
2020-07-03SPARC fenv supportEshan dhawan via Newlib
Signed-off-by: Eshan dhawan <eshandhawan51@gmail.com>
2020-06-03hard float support for PowerPC taken from FreeBSDEshan dhawan via Newlib
Signed-off-by: Eshan dhawan <eshandhawan51@gmail.com>
2020-01-21Change the reent verify check option to document disabling itJeff Johnston
- 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-21Default newlib_reent_check_verify to yes in configure.hostJeff Johnston
2019-10-31PRU: Align libmath to PRU ABIDimitar Dimitrov
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-31Initial PRU port for libgloss and newlibDimitar Dimitrov
Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
2019-10-08Add patch from Joel Sherrill for i386 and x86_64 fenv supportJeff Johnston
2019-10-07Allow verifying _REENT_CHECK macros memory allocationJeff Johnston
- 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-06-07Add gfortran support for AMD GCNJeff Johnston
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-01-15AMD GCN Port contributed by Andrew Stubbs <ams@codesourcery.com>Jeff Johnston
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.
2018-11-05newlib/configure.host: Set have_init_fini to no for OpenRISCStafford Horne
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-10-22RTEMS: Use function and data sectionsSebastian Huber
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2018-10-05Define _COMPILING_NEWLIB on aarch64 to define function prototypes from unistd.h.Christophe Lyon
2018-10-01 Christophe Lyon <christophe.lyon@linaro.org> * newlib/configure.host: Define _COMPILING_NEWLIB for aarch64.
2018-09-13Committed, CRIS port: fix fallout from time_t defaulting to 64 bits, part 2Hans-Peter Nilsson
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-08-31Add --disable-newlib-fno-builtin to allow compilation without -fno-builtin ↵newlib-snapshot-20180831Jon Beniston
for smaller and faster code.
2018-07-30RISC-V: Do not use _init/_finiSebastian Huber
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-04-13Add nvptx port.Jeff Johnston
- 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-02-16Add define _COMPILING_NEWLIB for arm to configure.host, as it is obviously ↵Jaap de Wolff
needed Signed-off-by: Jaap de Wolff <jaap@stretch.de-wolff.org>
2017-12-26RISC-V: Add nanosleep functionalityJim Wilson
2017-11-13newlib/.../getreent.c: Allow to be provided by host and do so for RTEMSJoel Sherrill
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-02newlib/configure.host: Remove obsolete definition of ↵Joel Sherrill
_I386MACH_ALLOW_HW_INTERRUPTS The *-*-rtems* targets defined this even though the conditional was no longer present in i386/setjmp.S.
2017-09-07Let RTEMS provide clock()Sebastian Huber
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-08-17Add RISC-V port for newlibKito Cheng
Contributor list: - Andrew Waterman <andrew@sifive.com> - Palmer Dabbelt <palmer@dabbelt.com> - Kito Cheng <kito.cheng@gmail.com> - Scott Beamer <sbeamer@eecs.berkeley.edu>
2016-05-09Add port for Phoenix-RTOS in common configure files.Jeff Johnston
2016-04-04Add Intel MCU targetIgor Venevtsev
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