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
path: root/newlib
AgeCommit message (Collapse)Author
2022-02-16newlib: phoenix: merge machine/ configure scripts up a levelMike Frysinger
The machine configure scripts are all effectively stub scripts that pass the higher level options to its own makefile.
2022-02-16newlib: phoenix: merge machine/ trampoline up a levelMike Frysinger
The machine/{configure,Makefile} files exist only to fan out to the specific machine/$arch/ subdir. We already have all that same info in the phoenix/ dir itself, so by moving the recursive configure and make calls into it, we can cut off this logic entirely and save the overhead.
2022-02-16newlib: phoenix: drop missing machine subdirsMike Frysinger
These were never added to the tree, and as we transition from autoconf to automake, it really wants the latter subdirs to always exist. These don't, so delete the logic.
2022-02-16newlib: phoenix: move some logic from configure to the MakefileMike Frysinger
These configure scripts hardcode some settings, so move them to the Makefile to simplify so we can drop the configure scripts entirely.
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: delete unused autotool regen scriptsMike Frysinger
These don't work at all now that we've completely upgraded autotools.
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-10newlib: punt sys/linux supportMike Frysinger
This was only used by the i?86-pc-linux-gnu target which we've removed, and even though it's using a "sys/linux/" dir to make it sound like it only depends on the Linux kernel, it's actually tied to glibc APIs built on top of Linux. Since the code relies on internal glibc APIs and has been broken for some time, punt it all. If someone wants to bring it back, they can try and actually keep the Linux-vs-glibc APIs separate.
2022-02-10newlib: drop unused iconvdataMike 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.
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-09newlib: switch to standard AC_PROG_RANLIBMike Frysinger
This is basically a noop, but switch to the autoconf macro for finding a suitable ranlib tool.
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-09newlib: drop unused xscale subdirMike Frysinger
This target was deleted in 2011 in 25fa7e5ad63d97d00deef1c9eddb346d11, but this directory was missed. Punt it too.
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.
2022-02-05newlib: libc: move manual into top-level buildMike Frysinger
This doesn't migrate all the docs, just the libc's manual (pdf/info). This is to show the basic form of migrating the chew files. For subdirs that didn't have any docs, I've stripped their settings for clarity. If someone wanted to suddenly add docs, they can add the corresponding Makefile.inc files easily.
2022-02-05newlib: libc: include all chapters all the time in the manualMike Frysinger
THe stdio subdir is actually required by the documentation. The stdio/def is handled dynamically, but libc.texi always expects it to be included, and fails if it isn't. So making it required when building docs is safe. The xdr subdir is handled dynamically, but it doesn't include any docs, so the dynamic logic isn't (currently) adding any value. So making it required when building docs is safe. That leaves: iconv, stdio64, posix, and signal subdirs. The chapters have a little disclaimer saying they are system-dependent, but even then, imo having stable manuals regardless of the target is preferable, and we can add more disclaimer language to these chapters if we want. This doesn't touch the man page codepaths, just the info/pdf.
2022-02-05newlib: libm: move manual into top-level buildMike Frysinger
This doesn't migrate all the docs, just the libm's manual (pdf/info). This is to show the basic form of migrating the chew files.
2022-02-04newlib: arm & v850: simplify build rulesMike Frysinger
Let automake manage whether the objects are included in lib.a. This fixes failures after to commit 71086e8b2d70c1e71a8372f35d9901505fc72905 ("newlib: delete (most) redundant lib_a_CCASFLAGS=$(AM_CCASFLAGS)") due to automake generating different set of implicit rules, and the code in here assuming the names of the generated objects.
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-02-02newlib: drop unused cache vars from MakefilesMike Frysinger
These aren't used in any of the makefiles, so there's no point in exporting these. These are only checked in the configure script.
2022-02-02newlib: add AC_CACHE_CHECK sugar around preprocessor checksMike Frysinger
This isn't strictly necessary, but it makes for much clearer logs as to what the target is doing, and provides cache vars for anyone who wants to force the test a different way, and it lets the build cache its own results when rerunning config.status.
2022-02-02newlib: delete unused iconvdata subdir configMike Frysinger
Since commit dcbff9eea71d06454e7d55d6b7e72672c0987d6d ("newlib: merge iconvdata into top-level Makefile"), there is no configure script in the iconvdata/ subdir, so this call will just issue a warning and not do anything useful. Punt it.
2022-02-01newlib: fix preprocessor checksMike Frysinger
Restore the call to AC_NO_EXECUTABLES -- I naively assumed in commit 2e9aa5f56cc26a411014a7f788423c670cfb5646 ("newlib: update preprocessor configure checks") that checking for a preprocessor would not involve linking code. Unfortunately, autoconf will implicitly check that the compiler "works" before allowing it to be used, and that involves a link test, and that fails because newlib provides the C library which is needed to pass a link test. There is some code in NEWLIB_CONFIGURE specifically to help mitigate these, but it's not kicking in here for some reason, so let's just add the AC_NO_EXECUTABLES call back until we can unwind that custom logic. Additionally, we have to call AC_PROG_CPP explicitly. This was being invoked later on, but only in the use_libtool=yes codepath, and that is almost never enabled.
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-29newlib: use abs_newlib_basedir for -I pathsMike Frysinger
When we had configure scripts in subdirs, the newlib_basedir value was computed relative to that, and it'd be the same when used in the Makefile in the same dir. With many subdir configure scripts removed, the top-level configure & Makefile can't use the same relative path. So switch the subdir Makefiles over to abs_newlib_basedir when they use -I to find source headers. Do this for all subdirs, even ones with configure scripts and where newlib_basedir works. This makes the code consistent, and avoids surprises if the configure script is ever removed in the future as part of merging to the higher level. Some of the subdirs were using -I$(newlib_basedir)/../newlib/ for some reason. Collapse those too since newlib_basedir points to the newlib source tree already.
2022-01-29newlib: export abs_newlib_basedir for all subdirsMike Frysinger
When using the top-level configure script but subdir Makefiles, the newlib_basedir value gets a bit out of sync: it's relative to where configure lives, not where the Makefile lives. Move the abs setting from the top-level configure script into acinclude.m4 so we can rely on it being available everywhere. Although this commit doesn't use it anywhere, just lays the groundwork.
2022-01-28newlib: hoist crt0 install up another dirMike Frysinger
Commit dd23de27c8e45513ad276f503a0036c3bc4e487b ("newlib: libc: install CRT0 straight out of subdir") got rid of the libc/sys/ intermediate for copying the file up, but the top-level newlib/ dir was still expecting a libc/crt0.o to exist so it could install. Update that to also look for the crt0 file directly under libc/ like we already do for crt1.
2022-01-28newlib: merge iconvdata into top-level MakefileMike Frysinger
Avoid a recursive make with this tiny subdir to speed things up a bit.
2022-01-28newlib: drop unused saber fileMike Frysinger
I can't find any references to this, and it looks like a generated build log from a specific old sparc system.
2022-01-27newlib: fix info+man page buildsMike Frysinger
The work to merge libc/machine/ up a dir lost the stub doc targets. So when libc/ recursed into machine/, it would stop going deeper as the doc rules were empty. But now that libc/ goes directly into the libc/machine/$arch/ and those have never had doc stubs, the build fails. Add a quick hack to the top dir to ignore all machine/$arch/ dirs when generating docs. A follow up series will delete all of this code as it merges all the doc rules into the top newlib dir.
2022-01-26Fix null-pointer dereference in nano-mallocCyril Yared
If p is NULL, then the free_list is empty and we should return the correct failure values.
2022-01-26newlib: switch to multilib.amMike Frysinger
We use the common config-ml.in for configure, so switch the makefile over to the common multilib.am. It's almost exactly the same code, but there are two differences: * Common code hooks install-exec-local for install-multi, but newlib doesn't currently install any executables, so that doesn't fire. Newlib already has install-data-local that inlined install-multi, so switch that to the common install-multi. * Common code doesn't provide a check-multi at all. Keep ours for now. Some day common code might get it. Or not. Who knows.
2022-01-26newlib: libc: merge machine/ configure scripts up a levelMike Frysinger
The machine configure scripts are all effectively stub scripts that pass the higher level options to its own makefile. There were only three doing custom tests. The rest were all effectively the same as the libc/ configure script. So instead of recursively running configure in all of these subdirs, generate their makefiles from the top-level configure. For the few unique ones, deploy a pattern of including subdir logic via m4: m4_include([machine/nds32/acinclude.m4]) Some of the generated machine makefiles have a bunch of extra stuff added to them, but that's because they were inconsistent in their configure libtool calls. The top-level has it, so it exports some new vars to the ones that weren't already.
2022-01-26newlib: libc: merge most sys/ configure scripts up a levelMike Frysinger
The sys configure scripts are almost all effectively stub scripts that pass the higher level options to its own makefile. The phoenix & linux ones are a bit more complicated with nested subdirs, so those have been left alone for now. Plus, I don't really have a way of testing them.
2022-01-26newlib: libc: install CRT0 straight out of subdirMike Frysinger
There's no need to have a sys/ subdir just to copy the sys/$arch/crt0.o up to sys/crt0.o, and then have libc/ copy sys/crt0.o up again. Just have libc/ refer to sys/$arch/crt0.o directly and drop the intermediate makefile entirely.
2022-01-26newlib: libc: merge sys/ trampoline up a levelMike Frysinger
The sys/{configure,Makefile} files exist to fan out to the specific sys/$arch/ subdir, and to possibly generate a crt0. We already have all that same info in the libc/ dir itself, so by moving the recursive configure and make calls into it, we can cut off some of this logic entirely and save the overhead. For arches that don't have a sys subdir, it means they can skip the logic entirely. The sys subdir itself is kept for the crt0 logic, for now. We'll try and clean that up next.