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-01-22newlib: move to ../config/multi.m4 for multilib logicMike Frysinger
The current newlib multilib logic is almost exactly the same as the config/multi.m4, and the differences should be minor, so switch over to that to delete custom logic on ourside.
2022-01-21newlib: punt unused template fileMike Frysinger
This was needed by ancient versions of automake, but that hasn't been the case since at least automake-1.5, so punt this unused stub.
2022-01-21newlib: switch to autoconf long double macroMike Frysinger
Now that we require a recent version of autoconf, we can rely on this macro working. This change was already made to libm, but these other dirs were missed as I didn't notice it being duplicated in 3 places.
2022-01-20newlib: switch newlib.h to autoheaderMike Frysinger
Now that newlib.hin has been brought up to date and all of its defines are produced by configure, we can switch it to using autoheader without manual editing. This relies on a few pieces: * Moving the header & footer into configure.ac via AH_TOP & AH_BOTTOM. * Running a post-process step on newlib.h to delete all the defines we didn't export ourselves. Basically, anything without a _ prefix. This will leave behind some spurious comments in newlib.h related to the defines we filtered out, but should be harmless, so it's probably not worth the effort to construct a more complicated sed expression to also strip those out.
2022-01-20newlib: iconv: autogenerate iconv define listMike Frysinger
The list of iconv to/from defines is hand maintained in newlib.hin. Lets leverage mkdeps.pl to generate this list automatically from the list of known encodings. The newlib.hin list is up-to-date, so the list in iconv.m4 matches the list already generated.
2022-01-20newlib: add missing _NANO_MALLOC to newlib.hinMike Frysinger
This was added to configure, but never to the header file. Nothing uses this currently, so it's not a big deal (as all the dynamic logic is via automake conditionals), but might as well restore it now to keep autoheader output in sync.
2022-01-20newlib: move version defines out of the config headersMike Frysinger
This will make it easier to move newlib.h to use autoheader directly. We only want the newlib version defines in our hand curated version file, _newlib_version.h, not in the template header, newlib.h, so using AC_DEFINE doesn't make much sense.
2022-01-20newlib: sort newlib.h outputMike Frysinger
Sort the symbols lexically like autoheader does. There are no other changes in here. This will make it easier to sync with autoheader.
2022-01-20newlib: clean up autoheader templatesMike Frysinger
Sync these back from newlib.hin to configure.ac, and touchup some of the forms to be consistent (like being full sentences). Also use the AC_DEFINE-vs-AC_DEFINE_UNQUOTED macros correctly. This will make it easier to re-enable autoheader for managing newlib.hin.
2022-01-20newlib: merge acconfig.h changes into newlib.hinMike Frysinger
The acconfig.h header was used to run autoheader and then manually sync the output into newlib.hin. Based on how the files have fallen out of sync (with newlib.hin having many more templates), this has not been run in a long time, and attempts to do so now would break newlib.hin. Further, if you try to run autoheader now, it will automatically replace _newlib_version.hin since it's the first entry in the call to AC_CONFIG_HEADERS. So let's throw away acconfig.h entirely. It only had 2 slightly better comments, and the rest were either worse, missing, or stale. This has the side benefit of avoiding autoheader warning about the deprecated use of acconfig.h since newer autoconf only wants macro calls in configure.ac.
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.
2022-01-20newlib: libm: switch to autoconf long double macroMike Frysinger
Now that we require a recent version of autoconf, we can rely on this macro working. We shift the call in configure.ac down a little to help keep the generated diff minimal -- there should be no functional difference otherwise. This is because the autoconf macros will call a bunch of standard toolchain macros first, and arguably the current code is incorrect in how it does its testing.
2022-01-19newlib: iconv: sort ccsbi.c contentsMike Frysinger
The current output doesn't happen to match what is produced on my system, so force _iconv_ccs to be sorted like is already done in the ccsbi.h header.
2022-01-19newlib: iconv: sync mkdeps.pl with aliasesbi.c changesMike Frysinger
Some changes were made to aliasesbi.c, but not to this file which dynamically generates it. Add those fixes to this file too.
2022-01-19newlib: drop autoconf-2.59 workaroundMike Frysinger
As the file comments say, this was a backport of an autoconf-2.60 fix, and shouldn't matter for >autoconf-2.59 versions. Drop it since we use and require autoconf-2.69 now.
2022-01-19newlib: enable automake subdir-objects in all dirsMike Frysinger
Currently this is only enabled in the top-level as that's the only place where it seemed to be used. But the libc/sys/phoenix/ dir also uses this functionality, but fails to explicitly enable it. Automake workedaround it, but generated warnings. Move the option to NEWLIB_CONFIGURE so all dirs get it automatically iff they end up using the option. If they don't use the option, there's no difference to the generated code.
2022-01-19newlib: avoid duplicate awk checksMike Frysinger
Since AM_INIT_AUTOMAKE calls AC_PROG_AWK, and some configure.ac scripts call it too, we end up testing for awk multiple times. If we change NEWLIB_CONFIGURE to require the macro instead, then it makes sure it's always expanded, but only once. While we're here, do the same thing with AC_PROG_INSTALL since it is also called by AM_INIT_AUTOMAKE, although it doesn't currently result in duplicate configure checks.
2022-01-19newlib: merge old AC_LIBTOOL_WIN32_DLL macro into LT_INITMike Frysinger
The AC_LIBTOOL_WIN32_DLL macro has been deprecated for a while and code should call LT_INIT with win32-dll instead. Update the calls to match. The generated code is noisy not because of substantial differences, but because the order of some macros change (i.e. instead of calling AS and then CC, CC is called first and then AS).
2022-01-19newlib: update libtool macro nameMike Frysinger
Replace old AM_PROG_LIBTOOL name with LT_INIT. There's no change to the generated files since they're aliases internally.
2022-01-19newlib: delete (most) redundant lib_a_CCASFLAGS=$(AM_CCASFLAGS)Mike Frysinger
Since automake already sets per-library CCASFLAGS to $(AM_CCASFLAGS) by default, there's no need to explicitly set it here. Many of these dirs don't have .S files in the first place, so the rule doesn't even do anything. That can easily be seen when Makefile.in has no changes as a result. For the dirs with .S files, the custom rules are the same as the pattern .S.o rules, so this is a nice cleanup. The only dir that was adding extra flags (newlib/libc/machine/mn10300/) to the per-library setting can have it moved to the global AM_CCASFLAGS since the subdir only has one target. Although the setting just adds extra debugging flags, so maybe it should be deleted in general. There are a few dirs that we leave the redundant setting in place. This is to workaround an automake limitation in subdirs that support building with & w/out libtool: https://www.gnu.org/software/automake/manual/html_node/Objects-created-both-with-libtool-and-without.html
2022-01-15newlib: update to automake-1.15Mike Frysinger
This matches what the other GNU toolchain projects have done already. The generated diff in practice isn't terribly large. This will allow more use of subdir local.mk includes due to fixes & improvements that came after the 1.11 release series.
2022-01-14require autoconf-2.69 exactlyMike Frysinger
The newlib & libgloss dirs are already generated using autoconf-2.69. To avoid merging new code and/or accidental regeneration using diff versions, leverage config/override.m4 to pin to 2.69 exactly. This matches what gcc/binutils/gdb are already doing. The README file already says to use autoconf-2.69. To accomplish this, it's just as simple as adding -I flags to the top-level config/ dir when running aclocal. This is because the override.m4 file overrides AC_INIT to first require the specific autoconf version before calling the real AC_INIT.
2022-01-12libtool.m4: fix nm BSD flag detectionNick Alcock
Libtool needs to get BSD-format (or MS-format) output out of the system nm, so that it can scan generated object files for symbol names for -export-symbols-regex support. Some nms need specific flags to turn on BSD-formatted output, so libtool checks for this in its AC_PATH_NM. Unfortunately the code to do this has a pair of interlocking flaws: - it runs the test by doing an nm of /dev/null. Some platforms reasonably refuse to do an nm on a device file, but before now this has only been worked around by assuming that the error message has a specific textual form emitted by Tru64 nm, and that getting this error means this is Tru64 nm and that nm -B would work to produce BSD-format output, even though the test never actually got anything but an error message out of nm -B. This is fixable by nm'ing *nm itself* (since we necessarily have a path to it). - the test is entirely skipped if NM is set in the environment, on the grounds that the user has overridden the test: but the user cannot reasonably be expected to know that libtool wants not only nm but also flags forcing BSD-format output. Worse yet, one such "user" is the top-level Cygnus configure script, which neither tests for nor specifies any BSD-format flags. So platforms needing BSD-format flags always fail to set them when run in a Cygnus tree, breaking -export-symbols-regex on such platforms. Libtool also needs to augment $LD on some platforms, but this is done unconditionally, augmenting whatever the user specified: the nm check should do the same. One wrinkle: if the user has overridden $NM, a path might have been provided: so we use the user-specified path if there was one, and otherwise do the path search as usual. (If the nm specified doesn't work, this might lead to a few extra pointless path searches -- but the test is going to fail anyway, so that's not a problem.) (Tested with NM unset, and set to nm, /usr/bin/nm, my-nm where my-nm is a symlink to /usr/bin/nm on the PATH, and /not-on-the-path/my-nm where *that* is a symlink to /usr/bin/nm.) ChangeLog 2021-09-27 Nick Alcock <nick.alcock@oracle.com> PR libctf/27967 * libtool.m4 (LT_PATH_NM): Try BSDization flags with a user-provided NM, if there is one. Run nm on itself, not on /dev/null, to avoid errors from nms that refuse to work on non-regular files. Remove other workarounds for this problem. Strip out blank lines from the nm output.
2022-01-12libtool.m4: augment symcode for Solaris 11Nick Alcock
This reports common symbols like GNU nm, via a type code of 'C'. ChangeLog 2021-09-27 Nick Alcock <nick.alcock@oracle.com> PR libctf/27967 * libtool.m4 (lt_cv_sys_global_symbol_pipe): Augment symcode for Solaris 11.
2022-01-12Add support for the haiku operating system. These are the os support patches ↵Alexander von Gluck IV
we have been grooming and maintaining for quite a few years over on git.haiku-os.org. All of these architectures are working and most have been stable for quite some time.
2022-01-12GCC: Check if AR works with --plugin and rcH.J. Lu
AR from older binutils doesn't work with --plugin and rc: [hjl@gnu-cfl-2 bin]$ touch foo.c [hjl@gnu-cfl-2 bin]$ ar --plugin /usr/libexec/gcc/x86_64-redhat-linux/10/liblto_plugin.so rc libfoo.a foo.c [hjl@gnu-cfl-2 bin]$ ./ar --plugin /usr/libexec/gcc/x86_64-redhat-linux/10/liblto_plugin.so rc libfoo.a foo.c ./ar: no operation specified [hjl@gnu-cfl-2 bin]$ ./ar --version GNU ar (Linux/GNU Binutils) 2.29.51.0.1.20180112 Copyright (C) 2018 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) any later version. This program has absolutely no warranty. [hjl@gnu-cfl-2 bin]$ Check if AR works with --plugin and rc before passing --plugin to AR and RANLIB. PR ld/27173 * configure: Regenerated. * libtool.m4 (_LT_CMD_OLD_ARCHIVE): Check if AR works with --plugin and rc before enabling --plugin. config/ PR ld/27173 * gcc-plugin.m4 (GCC_PLUGIN_OPTION): Check if AR works with --plugin and rc before enabling --plugin. libiberty/ PR ld/27173 * configure: Regenerated. zlib/ PR ld/27173 * configure: Regenerated.
2022-01-12GCC: Pass --plugin to AR and RANLIBH.J. Lu
Detect GCC LTO plugin. Pass --plugin to AR and RANLIB to support LTO build. * Makefile.tpl (AR): Add @AR_PLUGIN_OPTION@ (RANLIB): Add @RANLIB_PLUGIN_OPTION@. * configure.ac: Include config/gcc-plugin.m4. AC_SUBST AR_PLUGIN_OPTION and RANLIB_PLUGIN_OPTION. * libtool.m4 (_LT_CMD_OLD_ARCHIVE): Pass --plugin to AR and RANLIB if possible. * Makefile.in: Regenerated. * configure: Likewise. config/ * gcc-plugin.m4 (GCC_PLUGIN_OPTION): New. libiberty/ * Makefile.in (AR): Add @AR_PLUGIN_OPTION@ (RANLIB): Add @RANLIB_PLUGIN_OPTION@. (configure_deps): Depend on ../config/gcc-plugin.m4. * aclocal.m4: Include ../config/gcc-plugin.m4. * configure.ac: AC_SUBST AR_PLUGIN_OPTION and RANLIB_PLUGIN_OPTION. * configure: Regenerated. zlib/ * configure: Regenerated.
2022-01-12libtool.m4: update GNU/Hurd test from upstream. In upstream libtool, ↵Samuel Thibault
47a889a4ca20 ("Improve GNU/Hurd support.") fixed detection of shlibpath_overrides_runpath, thus avoiding unnecessary relink. This backports it. . * libtool.m4: Match gnu* along other GNU systems. */ChangeLog: * configure: Re-generate.
2022-01-12newlib: regen aclocal.m4 after autoconf updateMike Frysinger
The configure scripts were regenerated with 2.69 for the newlib-4.2.0 release in 484d2ebf8d825b28af47b8ee88cd845f1d2c7c6e, but the aclocal files were not. Do that now to avoid confusion between the two as to which version of autoconf was used.
2022-01-12posix_spawn: fix get/set uid/gid calls for 32 bit CygwinCorinna Vinschen
32 bit Cygwin still exports function calls to support old applications. E. g., when switching from 16 to 32 bit uid/gid values, new function like getuid32 have been added and the old getuid function still only provides 16 bit values. Newly built applications using getuid are actually calling getuid32. However, this link magic isn't performed inside Cygwin itself, so if newlib functions call getuid, they actually call the old getuid, not the new getuid32. This leads to truncated uid/gid values. https://cygwin.com/pipermail/cygwin/2022-January/250453.html reports how this leads to problems in posix_spawn. Fix this temporarily. i686 support will go away soon in Cygwin and the fix can be dropped. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-01-11powerpc/setjmp: Improve RTEMS supportSebastian Huber
For some RTEMS multilibs, the FPU and Altivec units are disabled during interrupt handling. Do not save and restore the corresponding registers in this case.
2022-01-10Fix documented argv and envp params for posix_spawnKeith Thompson
2022-01-07newlib: use .texi with libc & libm manualsMike Frysinger
Newer automake warns that .texinfo extensions are discouraged in favor of .texi, so rename the manuals to match.
2022-01-06newlib: README: libgloss no longer uses '--cygnus' automake optionJon Turney
2022-01-06newlib: fix silent build in a few subdirsMike Frysinger
A few subdirs have custom compile rules. Utilize AM_V_xxx settings so they respect the silent build option.
2022-01-06newlib: migrate from INCLUDES to AM_CPPFLAGSMike Frysinger
Since automake deprecated the INCLUDES name in favor of AM_CPPFLAGS, change all existing users over. The generated code is the same since the two variables have been used in the same exact places by design. There are other cleanups to be done, but lets focus on just renaming here so we can upgrade to a newer automake version w/out triggering new warnings.
2022-01-05update OpenBSD string functionsGuilherme Janczak
A lot of the 3rd party code in the string library is around 20 years old and has been worked on since. I've updated the OpenBSD functions at least.
2021-12-31Update newlib to 4.2.0newlib-snapshot-20211231Jeff Johnston
2021-12-31newlib: require automake-1.11.6Mike Frysinger
This is simply reflecting reality: all the subdirs in here are already using automake-1.11.6, so making it a requirement will allow us to stop suggesting we might support automake-1.9 or 1.10 (which I'm fairly sure do not work today). This is why only acinclude.m4 changes in this patch: the generated files are exactly the same as the directives here are automake constraints, not generated code logic.
2021-12-30newlib: Regenerate autotools filesJon Turney
2021-12-30newlib: Remove automake option 'cygnus'Jon Turney
The 'cygnus' option was removed from automake 1.13 in 2012, so the presence of this option prevents that or a later version of automake being used. A check-list of the effects of '--cygnus' from the automake 1.12 documentation, and steps taken (where possible) to preserve those effects (See also this thread [1] for discussion on that): [1] https://lists.gnu.org/archive/html/bug-automake/2012-03/msg00048.html 1. The foreign strictness is implied. Already present in AM_INIT_AUTOMAKE in newlib/acinclude.m4 2. The options no-installinfo, no-dependencies and no-dist are implied. Already present in AM_INIT_AUTOMAKE in newlib/acinclude.m4 Future work: Remove no-dependencies and any explicit header dependencies, and use automatic dependency tracking instead. Are there explicit rules which are now redundant to removing no-installinfo and no-dist? 3. The macro AM_MAINTAINER_MODE is required. Already present in newlib/acinclude.m4 Note that maintainer-mode is still disabled by default. 4. Info files are always created in the build directory, and not in the source directory. This appears to be an error in the automake documentation describing '--cygnus' [2]. newlib's info files are generated in the source directory, and no special steps are needed to keep doing that. [2] https://lists.gnu.org/archive/html/bug-automake/2012-04/msg00028.html 5. texinfo.tex is not required if a Texinfo source file is specified. (The assumption is that the file will be supplied, but in a place that automake cannot find.) This effect is overriden by an explicit setting of the TEXINFO_TEX variable (the directory part of which is fed into texi2X via the TEXINPUTS environment variable). 6. Certain tools will be searched for in the build tree as well as in the user's PATH. These tools are runtest, expect, makeinfo and texi2dvi. For obscure automake reasons, this effect of '--cygnus' is not active for makeinfo in newlib's configury. However, there appears to be top-level configury which selects in-tree runtest, expect and makeinfo, if present. So, if that works as it appears, this effect is preserved. If not, this may cause problem if anyone is building those tools in-tree. This effect is not preserved for texi2dvi. This may cause problems if anyone is building texinfo in-tree. If needed, explicit checks for those tools looking in places relative to $(top_srcdir)/../ as well as in PATH could be added. 7. The check target doesn't depend on all. This effect is not preseved. The check target now depends on the all target. This concern seems somewhat academic given the current state of the testsuite. Also note that this doesn't touch libgloss.
2021-12-30newlib: Regenerate autotools filesJon Turney
2021-12-30newlib: Make effects of 'cygnus' explicitJon Turney
Add all the effects of 'cygnus' for which there exists an explicit way to request that behaviour: * Implied foreign strictness and options no-installinfo, no-dependencies and no-dist are added to AM_INIT_AUTOMAKE in newlib/acinclude.m4. * macro AM_MAINTAINER_MODE is added to newlib/acinclude.m4. * For the implied TEXINFO_TEX of '$(top_srcdir)/../texinfo/texinfo.tex', an explicit TEXINFO_TEX is always relative to $(srcdir), so write the same pathname in that form. This is to prepare for the removal of the automake option '--cygnus'.
2021-12-13README: configure.in -> configure.acJon Turney
These files were renamed from that long deprecated name in commit 92061799.
2021-12-10newlib: Regenerate all autotools filesJon Turney
Regenerate all aclocal.m4, configure and Makefile.in files.
2021-12-10newlib: Enable automake silent rulesJon Turney
Use AM_SILENT_RULES, to enable automake silent rules (by default), if we are using a version of automake which supports it (>=1.11). Silent rules can be disabled by configuring with '--disable-silent-rules', or invoking 'make V=1'. For ease of reviewing, this patch doesn't contain configure and Makefile.in regeneration. Future work: There are a few compilations which are not silenced by this, as they use custom rules.
2021-12-03ldtoa: Import gdtoa from OpenBSD.Takashi Yano
- This patch uses gdtoa imported from OpenBSD if newlib configure option "--enable-newlib-use-gdtoa=no" is NOT specified. gdtoa provides more accurate output and faster conversion than legacy ldtoa, while it requires more heap memory.
2021-12-03frexpl: Support smaller long double of LDBL_MANT_DIG == 53.Takashi Yano
- Currently, frexpl() supports only the following cases. 1) LDBL_MANT_DIG == 64 or 113 2) 'long double' is equivalent to 'double' This patch add support for LDBL_MANT_DIG == 53.
2021-12-03Revert "ctype: use less short names in public header"Corinna Vinschen
This patch fixed a problem which isn't in newlib, but in projects incorrectly using symbols from the reserved namespace. This reverts commit 3ba1bd0d9dbc015c14a0aaafcef042f706d1249a.
2021-11-30Modifying patch from: marian.buschsieweke@ovgu.deJeff Johnston
The code accessing the floating point control/status register, namely #define __cfc1(__fcsr) __asm __volatile("cfc1 %0, $31" : "=r" (__fcsr) does not compile with mips16. This changed the makefile to pass -mno-mips16 to avoid the following compiler error: mips-mti-elf fails with "Error: unrecognized opcode `cfc1 $3,$31'"