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
2024-01-23newlib: docs: add "Function " to every function nodeMike Frysinger
When creating a split manual with one-node-per-page, the main index.html ends up getting clobbered by the page for the index() function because it uses "@node index" which, for html, also creates an index.html page. To remedy this, add "Function " to every function node so now we output "Function-index.html" and avoid clobbering. It also namespaces every other function and helps make sure we don't clobber anything else. Otherwise, there isn't really much rendering difference as @node text is mostly internal. Node title text comes from @section instead.
2024-01-23newlib: docs: print the function indexMike Frysinger
The generated function documentation makes sure to include entries for every function in the function index via @findex, but then the manuals forget to actually print the index.
2023-12-31Changes for newlib 4.4.0 snapshotnewlib-4.4.0Jeff Johnston
- bump up version to 4.4.0
2023-12-21newlib: Fix long double for unsupported rounding modes and exceptionsCraig Blackmore
RISC-V newlib fails to build for soft float multilibs since long double support was enabled in: commit 04798b7bb69571452d2cfc7e0b052a9bbd3b619d Author: Kito Cheng <kito.cheng@sifive.com> Date: Mon Dec 4 15:41:39 2023 +0800 RISC-V: Support long double math Long double for RISC-V is using 128 bit IEEE 754 format like Aarch64, so we reference AArch64 to support that. The RISC-V soft floating point environment only supports the FE_TONEAREST rounding mode and does not support exceptions. Guard long double rounding and exception support with ifdefs based on the presence of the relevant rounding modes and exceptions. Tested on gcc/g++ testsuite using RISC-V GNU Newlib Toolchain built by riscv-gnu-toolchain with multilibs: riscv-sim/-march=rv32i/-mabi=ilp32/-mcmodel=medlow riscv-sim/-march=rv32iac/-mabi=ilp32/-mcmodel=medlow riscv-sim/-march=rv32im/-mabi=ilp32/-mcmodel=medlow riscv-sim/-march=rv32imac/-mabi=ilp32/-mcmodel=medlow riscv-sim/-march=rv32imafc/-mabi=ilp32f/-mcmodel=medlow riscv-sim/-march=rv64imac/-mabi=lp64/-mcmodel=medlow Co-authored-by: Simon Cook <simon.cook@embecosm.com>
2023-12-19Remove curly braces in `@author` tag in .texi filesFreddie Chopin
Curly braces cause documentation build failure with texinfo 7.1 (works fine up to 7.0.3):
2023-12-04pru: libm: Fix incorrect function nameDimitar Dimitrov
Upstream GCC changed -Wimplicit-function-declaration warning into an error. The build break about missing fpclassifyf function prototype exposed a bug in the PRU port of libm. The fix is to use the fpclassify macro for both double and float types. Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
2023-12-04RISC-V: Support long double mathKito Cheng
Long double for RISC-V is using 128 bit IEEE 754 format like Aarch64, so we reference AArch64 to support that.
2023-10-10Delete check in catan, catanf, and catanl functions.Joseph Faulls
The check incorrectly results in catan returning nan + inf i when real part is +/- 1 and imaginary part is 0. The same occurs for real 0.8 and imaginary 0.6. The change ends up matching glibc behaviour.
2023-08-18newlib: add Xtensa portAlexey Lapshin
2023-07-27Fix rounding results in lrint() & llrint() when close to 0Jesse Huang via Newlib
soft-fp should round floating pointer numbers according to the current rounding mode. However, in the current code of lrint() and llrint(), there are if statements before the actual rounding computation if(j0 < -1) return 0; Where j0 is the exponent of the floating point number. It means any number having a exponent less than -1 (i.e. interval (-0.5, 0.5)) will be rounded to 0 regardeless of the rounding mode. The bug already fixed in glibc in 2006 by moving the check afterwards the rounding computation, but still persists in newlib. This patch fixed it in a similar way to glibc Ref Commit in glibc: 6624dbc07b5a9fb316ed188ef01f65b8eea8b47c
2023-07-26RISC-V: Support Zfinx/Zdinx extension.Kito Cheng via Newlib
Zfinx/Zdinx are new extensions ratified in 2022, it similar to F/D extensions, support hard float operation for single/double precision, but the difference between Zfinx/Zdinx and F/D is Zfinx/Zdinx is operating under general purpose registers rather than dedicated floating-point registers. This patch improve the hard float support detection for RISC-V port, so that Zfinx/Zdinx can have better/right performance. Co-authored-by: Jesse Huang <jesse.huang@sifive.com>
2023-05-16newlib: Add non LDBL_EQ_DBL math support for aarch64, i386, and x86_64Jennifer Averett
Rename s_nearbyint.c, s_fdim.c and s_scalbln.c to remove conflicts Remove functions that are not needed from above files Modify include paths Add includes missing in cygwin build Add missing types Create Makefiles Create header files to resolve dependencies between directories Modify some instances of unsigned long to uint64_t for 32 bit platforms Add HAVE_FPMATH_H
2023-05-16newlib: Add FreeBSD files for non LDBL_EQ_DBL supportJennifer Averett
FreeBSD files to add long double support for i386, aarch64 and x86_64.
2023-05-05Move signgm.c from libc/reent to libm/mathJennifer Averett
2023-04-13Replace always true if with elseAndoni Arregi
2023-04-13Compare j as unsignedAndoni Arregi
j is int32_t and thus j<<31 is undefined if j==1. Taken from FreeBSD commit bdd8abc6d6a93ce3ab8ad5db716222ee3110c4a3
2023-04-13Fix x close to 1, y between 2^31 and 2^64Andoni Arregi
E.g. known errors: x = 0x1.000002c5e2e99p+0, y = 0x1.c9eee35374af6p+31 had an error of 639 ULP and is now correctly rounded. x = 0x1.fffffd2e3e669p-1, y = 0x1.344c9823eb66cp+32 had an error of 428 ULP and is now correctly rounded.
2023-04-13Fix missing sign for overflow/underflow where x is negative and y is large ↵Andoni Arregi
odd integer
2023-03-30Bump newlib version in the manual to 4.3.0Tobias Burnus
While commit 9e09d6ed8 (tag: newlib-4.3.0) bumped the newlib version to 4.3.0, this commit updates the version/date in the libc/libm manuals to match.
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-16Fix 3 other instances of Reme typo (should be Remez)Jeff Johnston
2022-12-16Revert "amdgcn: Add vectorized math routines"Jeff Johnston
This reverts commit 125e39bfea1a39341a60348c93a65cf4894e0f2a.
2022-12-16Fix a typo in the comment.Nadav Rotem
The implementation of expf() explains how approximation in the range [0 - 0.34] is done. The comment describes the "Reme" algorithm for constructing the polynomial. This is a typo and should be the "Remez" algorithm. The remez algorithm (or minimax) is used to calculate the coefficients of polynomials in other implementations of exp(0 and log(). See more: https://en.wikipedia.org/wiki/Remez_algorithm
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-07-13Add --enable-newlib-reent-thread-local optionMatt Joyce
By default, Newlib uses a huge object of type struct _reent to store thread-specific data. This object is returned by __getreent() if the __DYNAMIC_REENT__ Newlib configuration option is defined. The reentrancy structure contains for example errno and the standard input, output, and error file streams. This means that if an application only uses errno it has a dependency on the file stream support even if it does not use it. This is an issue for lower end targets and applications which need to qualify the software according to safety standards (for example ECSS-E-ST-40C, ECSS-Q-ST-80C, IEC 61508, ISO 26262, DO-178, DO-330, DO-333). If the new _REENT_THREAD_LOCAL configuration option is enabled, then struct _reent is replaced by dedicated thread-local objects for each struct _reent member. The thread-local objects are defined in translation units which use the corresponding object.
2022-05-05Silence xsltproc when writing manpagesJon Turney
Unless make is invoked with V=1, have xmlto pass the parameter 'man.output.quietly=1' to xsltproc to suppress "Note: Writing foo.N" output from the manpages stylesheet. (This doesn't quite do what it says: The output is not silenced if V has any value, including 0. You could consider that either a bug or a feature.)
2022-05-05Add build avoidance for 'make man'Jon Turney
This will generate multiple manpage files as an output, but we don't know what they will be called, so use a timestamp for build avoidance.
2022-05-05Simplify rules for creating man pagesJon Turney
Simplify rules for creating docbook XML used to create manpages: Updating the output using move-if-change and then unconditionally touching the .stamp file doesn't make much sense.
2022-03-17newlib: libm: integrate tests subdirMike Frysinger
Integrate the old libm/test/ subdir into the main build. It hasn't been used in a long time causing the code to rot a bit. I've fixed some of those, but it still fails for many ports, so it's disabled by default. People who want to take a closer look can run: $ make libm/test/test
2022-02-18newlib: libm: merge build up a directoryMike Frysinger
Convert all the libm/ subdir makes into the top-level Makefile. This allows us to build all of libm from the top Makefile without using any recursive make calls. This is faster and avoids the funky lib.a logic where we unpack subdir archives to repack into a single libm.a. The machine override logic is maintained though by way of Makefile include ordering, and source file accumulation in libm_a_SOURCES. One thing to note is that this will require GNU Make because of: libm_a_CFLAGS = ... $(libm_a_CFLAGS_$(subst /,_,$(@D))) This was the only way I could find to supporting per-dir compiler settings, and I couldn't find a POSIX compatible way of transforming the variable content. I don't think this is a big deal as other Makefiles in the tree are using GNU Make-specific syntax, but I call this out as it's the only one so far in the new automake code that I've been writing. Automake doesn't provide precise control over the output object names (by design). This is fine by default as we get consistent names in all the subdirs: libm_a-<source>.o. But this relies on using the same set of compiler flags for all objects. We currently compile libm/common/ with different optimizations than the rest. If we want to compile objects differently, we can create an intermediate archive with the subset of objects with unique flags, and then add those objects to the main archive. But Automake will use a different prefix for the objects, and thus we can't rely on ordering to override. But if we leverage $@, we can turn Automake's CFLAGS into a multiplex on a per-dir (and even per-file if we wanted) basis. Unfortunately, since $@ contains /, Automake complains it's an invalid name. While GNU Make supports this, it's a POSIX extension, so Automake flags it. Using $(subst) avoids the Automake warning to get a POSIX compliant name, albeit with a GNU Make extension.
2022-02-17newlib: fix mips fenv.o handlingMike Frysinger
Commit 8fa73a9f8414a4926365324c2fe32a237c2eb91d changed how fenv.c is compiled wrt mips16 targets used the wrong variable to add fenv.o to libm.a. Fix that thinko so it's included in the build again.
2022-02-16newlib/libgloss: drop unused $(CROSS_CFLAGS)Mike Frysinger
This is used in a bunch of places, but nowhere is it ever set, and nowhere can I find any documentation, nor can I find any other project using it. So delete the flags to simplify.
2022-02-14Improve lgammaf range for very small casesAndoni Arregi
The original cut for small arguments at |x|<2**-70 (copied from the double version) produces that when computing nadj we get a subnormal number for t*x and thus, the division of pi/subnormal will be INF and the logarithm of it too, which is wrong as a result for lgammaf in this range. The proposed new limit seems to be safe and has been tested to produce accurate results. (Courtesy of Andreas Jung, ESA)
2022-02-11newlib: remove unused fenv flagsMike Frysinger
These look like they were just copied & pasted from common/Makefile.am. The funcs in this dir are all stubs that don't actually call any math or builtin functions, and a simple compile shows they produce identical object code. So delete to simplify the build rules.
2022-02-10Fix expf overflow limitAndoni Arregi
Correct the overflow limit in the variable o_threshold to be consistent with the FLT_UWORD_LOG_MAX variable used by the internal implementation of the expf algorithm itself. The u_threshold variable has also been modified to be written in the same format. Note that this fix improves the situation but does not completely correct the inconsistencies regarding the overflow and underflow limits between the expf wrapper (wf_exp.c) and the expf algorithm itself (ef_exp.c). Currently these limits are different for the _FLT_LARGEST_EXPONENT_IS_NORMAL and _FLT_NO_DENORMALS cases as well as for the case where __OBSOLETE_MATH is not defined (only for the underflow limit in this case).
2022-02-10newlib: libm: fix rebase conflictsMike Frysinger
I missed this cleanup when rebasing on top of the latest branch.
2022-02-10newlib: libm: move configure into top-levelMike Frysinger
This kills off the last configure script under libm/ and folds it into the top newlib configure script. The vast majority of logic was already in the top configure script, so move the little that is left into a libm/acinclude.m4 file.
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: fix mkdoc dependenciesMike Frysinger
Make sure we depend on the right name of mkdoc all the time, and that the rules that need it (e.g. .def files) depend on it. Reported-by: Jon Turney <jon.turney@dronecode.org.uk>
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-09newlib: drop autoconf-2.13 hackMike Frysinger
We require autoconf-2.69 now, so we don't need this old install hack.
2022-02-09newlib: drop cygnus EXEEXT hackMike Frysinger
Now that we rely on AC_NO_EXECUTABLES to disable link tests, we don't need this hack to disable exeext probing.
2022-02-09newlib: switch to AM_PROG_ARMike Frysinger
Now that we require automake-1.15, we can use this macro rather than do the tool search ourselves.
2022-02-09newlib: switch to standard AM_PROG_ASMike Frysinger
Now that we require a recent automake version, rely on it to provide AS and CCAS and CCASFLAGS for us.
2022-02-09newlib: switch to standard AC_PROG_CCMike Frysinger
Now that we use AC_NO_EXECUTABLES, and we require a recent version of autoconf, we don't need to define our own copies of these macros. So switch to the standard AC_PROG_CC.
2022-02-09newlib: move AC_NO_EXECUTABLES logic up to common codeMike Frysinger
This logic was added to libc & libm to get it working again after some reworks in the CPP handling, but now that that's settled, let's move this to the common newlib configure logic. This will make it easier to consolidate all the configure calls into the top-level newlib dir. This does create a lot of noise in the generate scripts, but that's because of the ordering of the calls, not because of correctness. We will try to draw that back down in follow up commits as we modernize the toolchain calls in here.
2022-02-09newlib: simplify nds32 automake checksMike Frysinger
This code is a bit more convoluted than it needs to be. GPR_SOURCES is never set to anything, and the automake checks use negative logic to add the SP & DP source files to dedicated variables that are only expanded once. Get rid of the unused variable, use normal boolean logic, and collapse the source settings into a single variable.
2022-02-05newlib: drop shared documentation rulesMike Frysinger
Now that the top-level makefile handles these, don't need to copy these into every single subdir.
2022-02-05newlib: move man page generation into top-level buildMike Frysinger
This allows building the libc & libm pages in parallel, and drops the duplication in the subdirs with the chew/chapter settings. The unused rules in Makefile.shared are left in place to minimize noise in the change.