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
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-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 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 libc/ dir itself, so by moving the recursive configure and make calls into it, we can cut off this logic entirely and save the overhead. For arches that don't have a machine subdir, it means they can skip the logic entirely. Although there's prob not too many of those.
2022-01-24newlib: powerpc: move libc machine list to MakefileMike Frysinger
This makes the makefile logic a bit cleaner so we don't have two files maintaining lists of sources & objects. Since the logic is tied to cpu capabilities, past those boolean settings down from the configure logic to the makefile logic. This will also make it easier to throw away the configure script in a follow up commit and just keep the makefile.
2022-01-24newlib: update preprocessor configure checksMike Frysinger
The nds32 & spu dirs are using compile tests to look for some preprocessor defines, but we don't need to compile the code, just preprocess it. So switch to AC_PREPROC_IFELSE. The sh dir is using a preprocessor test via grep, but let's switch it to AC_PREPROC_IFELSE too to be consistent. This should allow us to drop the uncommon AC_NO_EXECUTABLES call.
2022-01-22newlib: stop clobbering LDFLAGS with non-standard $ldflagsMike Frysinger
It's unclear why this was added originally, but assuming it was needed 20 years ago, it shouldn't be explicitly required nowadays. Current versions of autotools already take care of exporting LDFLAGS to the Makefile as needed (things are actually getting linked). That's why the configure diffs show LDFLAGS still here, but shifted to a diff place in the output list. A few dirs stop exporting LDFLAGS, but that's because they don't do any linking, only compiling, so it's correct. As for the use of $ldflags instead of the standard $LDFLAGS, I can't really explain that at all. Just use the right name so users don't have to dig into why their setting isn't respected, and then use a non-standard name instead. Adjust the testsuite to match.
2022-01-22newlib: stop checking --enable-multilib in subdirsMike Frysinger
None of the subdirs actually use the multilib arg, so include the logic only in the top-level configure.
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-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-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.
2021-12-31Update newlib to 4.2.0newlib-snapshot-20211231Jeff Johnston
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-10newlib: Regenerate all autotools filesJon Turney
Regenerate all aclocal.m4, configure and Makefile.in files.
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-11-10newlib: mips: delete glibc-specific logicMike Frysinger
This code looks like it's written to be copied & pasted between diff C libraries and relies on _LIBC only being used with glibc. This will break when newlib changes from _COMPILING_NEWLIB to _LIBC, so delete the glibc-specific logic ahead of time.
2021-11-06libgloss/newlib: update configure.ac in Makefile.in filesMike Frysinger
The maintainer rules refer to configure.in directly, so update that after renaming all the configure.ac files.
2021-09-13libgloss/newlib: rename configure.in to configure.acMike Frysinger
The .in name has been deprecated for a long time in favor of .ac.
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-05-26aarch64: support binary mode for opening filesRichard Earnshaw
Newlib for aarch64 uses libgloss for the backend. One common libgloss implementation is the 'rdimon' implementation, which uses the Arm Semihosting protocol. In order to support a remote host that runs on Windows we need to know whether a file is to be opened in binary or text mode. That means that we need to preserve this information via O_BINARY until we know what the libgloss binding will be. This patch simply copies the arm implementation from sys/arm/sys and puts it in machine/aarch64/sys, because we don't have a 'sys' subtree on aarch64.
2021-04-13Cygwin: don't export _feinitialise from newlibCorinna Vinschen
Use the more official fesetenv(FE_DFL_ENV) from _dll_crt0, thus allowing to drop the _feinitialise declaration from fenv.h. Provide a no-op _feinitialise in Cygwin as exportable symbol for really old applications when _feinitialise was called from mainCRTStartup in crt0.o. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2021-04-13fenv: drop Cygwin-specific implementation in favor of newlib codeCorinna Vinschen
Drop the Cygwin-specific fenv.cc and fenv.h file and use the equivalent newlib functionality now, so we have at least one example of a user for this new mechanism. fenv.c: allow _feinitialise to be called from Cygwin startup code fenv.h: add declarations for fegetprec and fesetprec for Cygwin only. Fix a comment. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2021-04-13fenv: Move shared x86 sys/fenv.h from x86_64 to shared_x86Corinna Vinschen
drop matching symlink in i386 Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2021-04-13fenv: add missing declarations to x86 fenv.hCorinna Vinschen
feenableexcept, fedisableexcept and fegetexcept were accidentally missing in the x86 fenv.h Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2021-02-25RISC-V: Fix optimized strcmp on big endianMarcus Comstedt
2021-02-05Removed Soft float from MIPSEshan dhawan
This Patch removes Soft Float code from MIPS. Instead It adds the soft float code from RISCV The code came from FreeBSD and assumes the FreeBSD softfp implementation not the one with GCC. That was an overlooked and fixed in the other fenv code already. Signed-off-by: Eshan Dhawan <eshandhawan51@gmail.com>
2020-12-19Bump up newlib version to 4.1.0newlib-4.1.0Jeff Johnston
2020-12-15arm: Fix memchr() for Armv8-RSebastian Huber
The Cortex-R52 processor is an Armv8-R processor with a NEON unit. This fix prevents conflicting architecture profiles A/R errors issued by the linker. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2020-12-11Bump newlib release to 4.0.0Jeff Johnston
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-29arm: Fix fenv supportEshan dhawan
The previous fenv support for ARM used the soft-float implementation of FreeBSD. Newlib uses the one from libgcc by default. They are not compatible. Having an GCC incompatible soft-float fenv support in Newlib makes no sense. A long-term solution could be to provide a libgcc compatible soft-float support. This likely requires changes in the GCC configuration. For now, provide a stub implementation for soft-float multilibs similar to RISC-V. Move implementation to one file and delete now unused files. Hide implementation details. Remove function parameter names from header file to avoid name conflicts. Provide VFP support if __SOFTFP__ is not defined like glibc. Reviewed-by: Sebastian Huber <sebastian.huber@embedded-brains.de> Signed-off-by: Eshan dhawan <eshandhawan51@gmail.com>
2020-07-27riscv: fix integer wraparound in memcpyPkmX via Newlib
This patch fixes a bug in RISC-V's memcpy implementation where an integer wraparound occurs when src + size < 8 * sizeof(long), causing the word-sized copy loop to be incorrectly entered. Signed-off-by: Chih-Mao Chen <cmchen@andestech.com>
2020-07-06Removed #ifndef _ARM_PCS_VFP_ from sys/fenv.h for armEshan dhawan via Newlib
Signed-off-by: Eshan dhawan <eshandhawan51@gmail.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-07-02fenv aarch64 supportEshan dhawan via Newlib
Signed-off-by: Eshan dhawan <eshandhawan51@gmail.com>