]> sourceware.org Git - newlib-cygwin.git/log
newlib-cygwin.git
7 months agolibgloss: merge v850 into top-level Makefile
Mike Frysinger [Wed, 27 Dec 2023 01:47:38 +0000 (20:47 -0500)]
libgloss: merge v850 into top-level Makefile

Avoid a recursive make to speed things up a bit.
A v850e-elf build shows installed objects & libs produce same code.

7 months agolibgloss: merge moxie into top-level Makefile
Mike Frysinger [Wed, 27 Dec 2023 01:21:28 +0000 (20:21 -0500)]
libgloss: merge moxie into top-level Makefile

Avoid a recursive make to speed things up a bit.
A moxie-elf build shows installed objects & libs produce same code.

7 months agolibgloss: moxie: delete unused/invalid assembly file
Mike Frysinger [Wed, 27 Dec 2023 01:25:18 +0000 (20:25 -0500)]
libgloss: moxie: delete unused/invalid assembly file

This is a .c file, not assembly, and it's a duplicate (same content)
as the existing sim-lseek.c.  Delete it since it's unused and doesn't
actually compile.

7 months agolibgloss: fix up incorrect "it's"
Mike Frysinger [Mon, 25 Dec 2023 23:17:38 +0000 (18:17 -0500)]
libgloss: fix up incorrect "it's"

7 months agonewlib: libc: Improved the readability of strspn with minor optimization
Xiao Zeng [Tue, 2 Jan 2024 05:56:15 +0000 (13:56 +0800)]
newlib: libc: Improved the readability of strspn with minor optimization

Signed-off-by: Xiao Zeng <zengxiao@eswincomputing.com>
7 months agoChanges for newlib 4.4.0 snapshot newlib-4.4.0
Jeff Johnston [Sun, 31 Dec 2023 17:00:18 +0000 (12:00 -0500)]
Changes for newlib 4.4.0 snapshot

- bump up version to 4.4.0

7 months agoMinor improvement to H8 startup code
Jeff Law [Sun, 31 Dec 2023 16:08:21 +0000 (09:08 -0700)]
Minor improvement to H8 startup code

Basically the startup code needs to clear memory from _edata to _end. In the
past it's been done with a fairly naive copy loop.  This changes the code to
just call memset and let memset figure out a sensible way to handle the
operation given the size and alignment requirements.

I don't have performance data on this.  I cobbled it together some time ago in
response to seeing some of the GCC tests with larger .bss sections taking an
insane amount of time to just get from _start to main.  With the fixes to the
H8 decoder in the simulator it may not matter nearly as much anymore.

This has been in my tester for months.  Naturally it does not cause any
regressions in the H8 port.

7 months agoFix various c99/gcc-14 issues in generic libgloss code
Jeff Law [Sat, 30 Dec 2023 04:31:27 +0000 (21:31 -0700)]
Fix various c99/gcc-14 issues in generic libgloss code

Similar to what's been done in the ports, but this time in generic code.

Add missing #includes to pick up prototypes.  Add prototypes for various
internal functions where needed.  Fix signatures of various functions to match
what's provided by the headers (read, sbrk, write, unlink).

Nearly done with this effort ;-)

Pushed to the trunk,

7 months agoFix another missing header file for mcore libgloss
Jeff Law [Sat, 30 Dec 2023 04:23:26 +0000 (21:23 -0700)]
Fix another missing header file for mcore libgloss

I guess I must have missed this when working through the trivial port specific
changes.

This adds an include of stdlib.h to get a prototype for exit().

Pushed to the trunk.

7 months agolibgloss: sparc: add missing m4 include
Mike Frysinger [Fri, 29 Dec 2023 05:33:05 +0000 (00:33 -0500)]
libgloss: sparc: add missing m4 include

Commit 8d758283785042589e95c93d7899cecf28ef00ea ("libgloss: merge
sparc configure script up a level") missed including the sparc
acinclude.m4 file which meant none of the sparc-specific vars were
propagating to the sub-makefile.

7 months agolibgloss: xtensa: fix crt0.o rule
Mike Frysinger [Wed, 27 Dec 2023 07:37:30 +0000 (02:37 -0500)]
libgloss: xtensa: fix crt0.o rule

Don't hardcode a custom rule for this -- reuse libobjs_a_SOURCES
which was designed for this exact scenario.

7 months agonewlib MMIX: Fix compilation warnings that recent gcc treats as errors
Hans-Peter Nilsson [Thu, 28 Dec 2023 03:31:19 +0000 (04:31 +0100)]
newlib MMIX: Fix compilation warnings that recent gcc treats as errors

Without this, when building with recent gcc, we'll see errors when
compiling for --target mmix the first being:
  CC       libc/sys/mmixware/libc_a-chmod.o
In file included from /x/newlib/libc/sys/mmixware/chmod.c:17:
/x/newlib/libc/sys/mmixware/chmod.c: In function 'chmod':
/x/newlib/libc/sys/mmixware/sys/syscall.h:139:6: error: implicit declaration \
of function 'sprintf' [-Wimplicit-function-declaration]
  139 |      sprintf (buf, "UNIMPLEMENTED %s in %s\n", __FUNCTION__,
 __FILE__); \

Other warnings also quelled.

* libc/sys/mmixware/sys/syscall.h: Include stdio.h, string.h
and unistd.h.
* libc/sys/mmixware/_exit.c: Call __unreachable after simulator exit.
* libc/sys/mmixware/chown.c (chown): Match declaration in unistd.h.
* libc/sys/mmixware/getpid.c (_getpid): Ditto.
* libc/sys/mmixware/kill.c (_kill): Ditto.
* libc/sys/mmixware/link.c (_link): Ditto.
* libc/sys/mmixware/read.c (_read): Ditto.
* libc/sys/mmixware/sbrk.c (_sbrk): Ditto.
* libc/sys/mmixware/unlink.c (_unlink): Ditto.
* libc/sys/mmixware/write.c (_write): Ditto.

7 months agoGCN: Implement '_exit' instead of 'exit'
Thomas Schwinge [Mon, 6 Nov 2023 15:48:20 +0000 (16:48 +0100)]
GCN: Implement '_exit' instead of 'exit'

... so that all of 'exit', '_exit', '_Exit' work.  'exit' thus becomes the
standard 'newlib/libc/stdlib/exit.c'.  (Getting 'atexit' functional needs
further work elsewhere.)

See also commit 5841b2f6a4208682264d03e3edfa0a09881932a6
"nvptx: Implement '_exit' instead of 'exit'".

8 months agoFix epiphany libgloss for c99/gcc-14
Jeff Law [Sat, 23 Dec 2023 04:29:56 +0000 (21:29 -0700)]
Fix epiphany libgloss for c99/gcc-14

So in this case we mostly need to include an internal header
(epiphany-syscalls.h).  In a few cases an explicit prototype is added.  We've
also got a return with no value in a function with a non-void return type.
Finally the asm_syscall interface expects a pointer as its first argument.  In
a few cases we've actually got an int (file descriptor) which we just cast to a
void *.

It's slightly more than Jeff J's pre-approval, but I think still reasonable.

8 months agoFix most of m32r libgloss for c99/gcc-14
Jeff Law [Sat, 23 Dec 2023 04:21:52 +0000 (21:21 -0700)]
Fix most of m32r libgloss for c99/gcc-14

Make implicit its explicit, add missing prototypes and header includes.  This
does not fix m32r-stub.c which needs more than the trivial work that Jeff J has
pre-approved.

8 months agoFix mcore libgloss port for c99/gcc-14
Jeff Law [Sat, 23 Dec 2023 04:17:36 +0000 (21:17 -0700)]
Fix mcore libgloss port for c99/gcc-14

Missing headers and prototypes, much like other ports.

8 months agoFix rl78 libgloss port for c99/gcc-14
Jeff Law [Sat, 23 Dec 2023 04:00:35 +0000 (21:00 -0700)]
Fix rl78 libgloss port for c99/gcc-14

Needed a prototype for SYS_write and the prototype for write was incorrect
(returns an int, not a char *).

8 months agoFix c6x libgloss port for c99/gcc-14
Jeff Law [Sat, 23 Dec 2023 03:57:47 +0000 (20:57 -0700)]
Fix c6x libgloss port for c99/gcc-14

Just one missing header in this case...

8 months agoFix ft32 libgloss for c99/gcc-14
Jeff Law [Sat, 23 Dec 2023 03:48:21 +0000 (20:48 -0700)]
Fix ft32 libgloss for c99/gcc-14

Just one missing header for this libgloss port.

8 months agoFix frv libgloss bits for c99/gcc-14\
Jeff Law [Sat, 23 Dec 2023 03:40:21 +0000 (20:40 -0700)]
Fix frv libgloss bits for c99/gcc-14\

Same as we've seen elsewhere.  Add missing prototype and header include.

8 months agoFix newlib H8/300 bits for C99/gcc-14
Jeff Law [Sat, 23 Dec 2023 03:25:10 +0000 (20:25 -0700)]
Fix newlib H8/300 bits for C99/gcc-14

Similar to other patches.  This adds a missing prototype and #include to some
H8/300 specific code in newlib.  Pushed to the trunk given Jeff J's
pre-approval for these kinds of changes.

8 months agoFix v850 libgloss for c99/gcc-14
Jeff Law [Sat, 23 Dec 2023 03:19:58 +0000 (20:19 -0700)]
Fix v850 libgloss for c99/gcc-14

So the prior patch for sysnecv850 was in newlib.  This time we're fixing v850
bits in libgloss.

Like other patches submitted recently, this converts implicit ints to explicit
ints, adds a missing prototype and header includes.

8 months agoFix iq2000 libgloss for c99/gcc-14
Jeff Law [Thu, 21 Dec 2023 19:43:27 +0000 (12:43 -0700)]
Fix iq2000 libgloss for c99/gcc-14

Similar to the others in this space.  Make implicit ints explicit ints. Add
prototype for _write in sbrk.c.

8 months agoOptimize strpbrk.c
Jeff Johnston [Thu, 21 Dec 2023 19:04:31 +0000 (14:04 -0500)]
Optimize strpbrk.c

8 months agoRe: libgloss c99 fixes for mn10300-elf
Jeff Law [Thu, 21 Dec 2023 07:01:54 +0000 (00:01 -0700)]
Re: libgloss c99 fixes for mn10300-elf

Very similar to other patches in this space.  Avoid implicit int types and add
missing #includes so that this code works with gcc-14.

8 months agoRegenarate libgloss/Makefile.in
Jeff Johnston [Wed, 20 Dec 2023 22:13:18 +0000 (17:13 -0500)]
Regenarate libgloss/Makefile.in

8 months agonewlib: Fix long double for unsupported rounding modes and exceptions
Craig Blackmore [Wed, 20 Dec 2023 20:32:24 +0000 (20:32 +0000)]
newlib: Fix long double for unsupported rounding modes and exceptions

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>
8 months agonewlib: libc: Improved the readability of strcspn with minor optimization
Xiao Zeng [Fri, 15 Dec 2023 08:31:01 +0000 (16:31 +0800)]
newlib: libc: Improved the readability of strcspn with minor optimization

Signed-off-by: Xiao Zeng <zengxiao@eswincomputing.com>
8 months agoFix various v850 problems
Jeff Law [Wed, 20 Dec 2023 03:54:37 +0000 (20:54 -0700)]
Fix various v850 problems

These fixes fall into a few different buckets.  First c99 doesn't allow a
parameter without a type.  So in cases where the type had previously been an
implicit int, make it an explicit int.  Second, for return values, don't allow
them to be implicit ints either, make them explicit. In a few cases change c89
function definitions to c99 function definitions.   Lastly include <stdlib.h>
in sbrk.c to get the prototype for abort () which we call when we detect a
heap/stack collision.

8 months agolibgloss: doc: generate single page & split html manuals
Mike Frysinger [Sun, 15 Oct 2023 08:22:06 +0000 (14:07 +0545)]
libgloss: doc: generate single page & split html manuals

By default, only split node html manuals are generated.  Change the
default to single page, and add an extra rule to also generate the
split page manual.

8 months agolibgloss: drop $(INCLUDES) when using $(AS)
Mike Frysinger [Mon, 4 Dec 2023 07:03:07 +0000 (02:03 -0500)]
libgloss: drop $(INCLUDES) when using $(AS)

Since $(AS) is the assembler, passing it a list of preprocessor include
flags doesn't make much sense.  The files aren't preprocessed which means
`#include` lines aren't respected, and while it would affect `.include`
usage, we never use that, and it's extremely unlikely to change.  Plus,
it's extremely unlikely we'd have .s files in common places to include vs
contained entirely within a specific arch dir, and at that point, it can
be included directly (with no flags), or the arch can add the unique set
of include paths that it needs for itself.

8 months agoAdd generated files for Revert patch
Jeff Johnston [Tue, 19 Dec 2023 18:58:12 +0000 (13:58 -0500)]
Add generated files for Revert patch

8 months agoRevert "Fix libgloss/newlib build to conditionally use top include dir"
Mike Frysinger [Mon, 4 Dec 2023 07:03:06 +0000 (02:03 -0500)]
Revert "Fix libgloss/newlib build to conditionally use top include dir"

This reverts commit 17ac400c11bab30ac2c0bef12cbf7788f0b6f954.

The build failures were due to incorrectly using $(INCLUDES) when
running $(AS).  Let's roll this back and drop $(INCLUDES) from the
$(AS) invocations.

8 months agoRemove curly braces in `@author` tag in .texi files
Freddie Chopin [Sun, 17 Dec 2023 09:01:45 +0000 (10:01 +0100)]
Remove curly braces in `@author` tag in .texi files

Curly braces cause documentation build failure with texinfo 7.1 (works fine
up to 7.0.3):

8 months agolibgloss fix for bfin port
Jeff Law [Tue, 19 Dec 2023 04:29:12 +0000 (21:29 -0700)]
libgloss fix for bfin port

gcc-14 will complain loudly both for calling a function without an in-scope
prototype or when the in scope prototype differs from the known signature.

"main" happens to be one of the functions the compiler knows about.  So not
only do we need to prototype it, we need to make sure the prototype matches
what GCC thinks it should be.

This fixes the bfin libgloss port to do the right thing for bfin-elf.

8 months agoRe: Fix moxie libgloss issues with c99
Jeff Law [Sun, 17 Dec 2023 04:11:10 +0000 (21:11 -0700)]
Re: Fix moxie libgloss issues with c99

Two libgloss issues specific to moxie-elf that show up build with GCC trunk.

First, putnum.c uses "print" without a prototype.  So I added one based on the
function's definition in print.c.  Second sim-inbyte.c uses read, which comes
from unistd.h, so this adds a suitable #include.

8 months agoFix fr30 libgloss build
Jeff Law [Thu, 14 Dec 2023 17:30:13 +0000 (10:30 -0700)]
Fix fr30 libgloss build

gcc-14 will default to c99 and as a result a fair amount of old code in newlib
(particularly libgloss) is failing to build.  I don't offhand know how many
patches will be necessary to fix the various failures. I'll just pick them off
one by one from my tree.

This particular patch works around the return-mismatch problem syscalls.c for
fr30.

That file is a bit odd in that most functions are declared as returning an
integer, but the implementations look like:

> int
> _read (file, ptr, len)
>      int    file;
>      char * ptr;
>      int    len;
> {
>   asm ("ldi:8 %0, r0" :: "i" (SYS_read) : "r0");
>   asm ("int   #10");
>
>   return;
> }

Note the lack of a value on the "return" statement.  The assumption is that the
interrupt handler implementing syscalls will put the return value into the
proper register, so falling off the end of the C function or returning with no
value works in the expected way.  It's not good code, but it probably works.

Working from that assumption I decided to just use a pragma to disable the
upgraded diagnostic from GCC -- essentially preserving existing behavior.

This is the only fr30 specific issue that needs to be resolved and the only
issue (so far) I've seen of this specific nature.

8 months agonewlib cris: Fix compilation warnings that recent gcc treats as errors
Hans-Peter Nilsson [Sat, 2 Dec 2023 01:20:17 +0000 (02:20 +0100)]
newlib cris: Fix compilation warnings that recent gcc treats as errors

For the newlib part, warnings are all from lack of sync between
libc/machine/cris/sys/signal.h and libc/include/sys/signal.h.  This
commit gets them sufficiently in sync again, functionality-wise and
declaration-wise.  Still, nothing is declared that isn't supported at
the system level (i.e. in libgloss system calls and handled by the
CRIS simulator in the gdb project).

8 months agolibgloss/cris: Make C declarations present and match them
Hans-Peter Nilsson [Mon, 4 Dec 2023 17:00:26 +0000 (18:00 +0100)]
libgloss/cris: Make C declarations present and match them

This is the libgloss part.
Recently, there was a change in gcc such that implicit function
declarations and type mismatches are now errors, no longer just
warnings.  Fix by adding and correcting declarations warned about;
including the right header or adding a declaration (for "main" in
lcrt0.c) and adjust to those types as necessary.

8 months agoCygwin: fallocate(2): fix debug output
Corinna Vinschen [Tue, 5 Dec 2023 21:11:18 +0000 (22:11 +0100)]
Cygwin: fallocate(2): fix debug output

Fixes: e01c50c7b0a6 ("Cygwin: introduce fallocate(2)")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 months agoCygwin: fallocate(2): fix offset and length sanity check
Corinna Vinschen [Tue, 5 Dec 2023 21:08:42 +0000 (22:08 +0100)]
Cygwin: fallocate(2): fix offset and length sanity check

- len must not be <= 0
- offset + len must not exceed off_t (max. file size)

Fixes: e01c50c7b0a6 ("Cygwin: introduce fallocate(2)")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 months agoCygwin: posix_fallocate(3): fix offset and length sanity check
Corinna Vinschen [Tue, 5 Dec 2023 21:08:01 +0000 (22:08 +0100)]
Cygwin: posix_fallocate(3): fix offset and length sanity check

- len must not be <= 0
- offset + len must not exceed off_t (max. file size)

Fixes: 7636b5859062 ("* autoload.cc (NtSetInformationFile): Define.")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 months agopru: libm: Fix incorrect function name
Dimitar Dimitrov [Mon, 4 Dec 2023 15:42:42 +0000 (17:42 +0200)]
pru: libm: Fix incorrect function name

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>
8 months agoRISC-V: Support long double math
Kito Cheng [Mon, 4 Dec 2023 07:41:39 +0000 (15:41 +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.

8 months agoRISC-V: Fix -Wint-conversion warning
Kito Cheng [Mon, 4 Dec 2023 07:41:28 +0000 (15:41 +0800)]
RISC-V: Fix -Wint-conversion warning

Upstream GCC has change this warning into error by default, so...we need
to explicitly convert the type from pointer from/to integer, generally
it's unsafe, but we know what we are doing here.

However it's not safe for ilp32 on RV64, but we didn't support that yet, so I
think this fix is good enough now :)

8 months agoCygwin: fallocate(2): drop useless zeroing pointer
Corinna Vinschen [Sat, 2 Dec 2023 13:38:28 +0000 (14:38 +0100)]
Cygwin: fallocate(2): drop useless zeroing pointer

The out pointer is only used if data_chunk_count is > 0,
so there's no reason to set it to NULL in the error case.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 months agoCygwin: CI: drop IRC notification from AppVeyor via notifico
Jon Turney [Fri, 24 Nov 2023 13:17:32 +0000 (13:17 +0000)]
Cygwin: CI: drop IRC notification from AppVeyor via notifico

Drop IRC status notification from AppVeyor via notifico, as we no longer
run tests there.

8 months agonewlib: libc: Fix indentation
Kuan-Wei Chiu [Sat, 2 Dec 2023 04:21:07 +0000 (12:21 +0800)]
newlib: libc: Fix indentation

Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
8 months agonewlib: libc: Fix memory leak in computematchjumps()
Kuan-Wei Chiu [Fri, 1 Dec 2023 16:13:21 +0000 (00:13 +0800)]
newlib: libc: Fix memory leak in computematchjumps()

In cases where malloc fails for the 'g->matchjump' allocation, the code
path does not handle the failure gracefully, potentially leading to a
memory leak. This fix ensures proper cleanup by freeing the allocated
memory for 'pmatches' before returning.

Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
8 months agoCygwin: drop stray fs_info::check_ssd declaration
Corinna Vinschen [Fri, 1 Dec 2023 08:55:33 +0000 (09:55 +0100)]
Cygwin: drop stray fs_info::check_ssd declaration

This is just a leftover from development

Fixes: 8b01c5d6903f ("Cygwin: fs_info: check for SSD")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 months agoCygwin: doc: add missing change to posix_spawnp
Corinna Vinschen [Thu, 30 Nov 2023 21:38:59 +0000 (22:38 +0100)]
Cygwin: doc: add missing change to posix_spawnp

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 months agoCygwin: sparse support: enable automatic sparsifying of files on SSDs
Corinna Vinschen [Thu, 30 Nov 2023 21:36:35 +0000 (22:36 +0100)]
Cygwin: sparse support: enable automatic sparsifying of files on SSDs

Given that SSDs don't have a seek penalty, we can enable
automatic sparsifying of files on SSDs, even if the "sparse"
mount option is not set.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 months agoCygwin: fs_info: check for SSD
Corinna Vinschen [Thu, 30 Nov 2023 21:13:49 +0000 (22:13 +0100)]
Cygwin: fs_info: check for SSD

During fs_info::update, check for the file being on an SSD.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 months agoCygwin: ntdll.h: add missing NtQueryVolumeInformationFile definitions
Corinna Vinschen [Thu, 30 Nov 2023 21:12:13 +0000 (22:12 +0100)]
Cygwin: ntdll.h: add missing NtQueryVolumeInformationFile definitions

In preparation of using the FileFsSectorSizeInformation info class,
add a couple of missing definitions.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 months agoCygwin: ntdll.h: add missing POBJECT_NAME_INFORMATION
Corinna Vinschen [Thu, 30 Nov 2023 21:11:26 +0000 (22:11 +0100)]
Cygwin: ntdll.h: add missing POBJECT_NAME_INFORMATION

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 months agoCygwin: revert autoloading of DiscardVirtualMemory
Corinna Vinschen [Thu, 30 Nov 2023 20:14:48 +0000 (21:14 +0100)]
Cygwin: revert autoloading of DiscardVirtualMemory

Commit a3ae2a734892 ("Cygwin: don't autoload some kernel32 functions")
erroneously removed DiscardVirtualMemory from the list of autloaded
functions.  DiscardVirtualMemory is not available on Windows 8.1.

Fixes: a3ae2a734892 ("Cygwin: don't autoload some kernel32 functions")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 months agoCygwin: Add '--names-only' flag to cygcheck
Jon Turney [Fri, 24 Nov 2023 16:17:05 +0000 (16:17 +0000)]
Cygwin: Add '--names-only' flag to cygcheck

Add '--names-only' flag to cygcheck, to output just the bare package
names.

8 months agoRISC-V: Fix timeval conversion in _gettimeofday()
Kuan-Wei Chiu [Wed, 29 Nov 2023 03:57:14 +0000 (11:57 +0800)]
RISC-V: Fix timeval conversion in _gettimeofday()

Replace multiplication with division for microseconds calculation from
nanoseconds in _gettimeofday function.

Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
8 months agonewlib: filter out versions from newlib.h to simplify autoreconf
Mike Frysinger [Sun, 15 Oct 2023 09:29:13 +0000 (15:14 +0545)]
newlib: filter out versions from newlib.h to simplify autoreconf

We've been manually editing newlib.hin after generating it with
autoheader to drop the version defines that we keep in the separate
_newlib_version.h header.  This is confusing for people, and is an
easy source of mistakes/errors.

Since we're already running sed on newlib.h during configure to
filter out defines we don't want to expose, add the version macros
there too.  This way we don't have to manually edit newlib.hin.

This simplifies the autoreconf step in exchange for a slightly more
complicated configure+sed step, but seems worth the trade-off.

8 months agoCygwin: fallocate(2): handle FALLOC_FL_PUNCH_HOLE and FALLOC_FL_ZERO_RANGE
Corinna Vinschen [Tue, 28 Nov 2023 09:42:52 +0000 (10:42 +0100)]
Cygwin: fallocate(2): handle FALLOC_FL_PUNCH_HOLE and FALLOC_FL_ZERO_RANGE

Split fhandler_disk_file::fallocate into multiple methods, each
implementing a different aspect of fallocate(2), thus adding
FALLOC_FL_PUNCH_HOLE and FALLOC_FL_ZERO_RANGE handling.

For more correctly implementing posix_fallocate(3) semantics, make
sure to re-allocate holes in the given range if the file is sparse.

While at it, change the way checking when to make a file sparse.
The rule is now, make file sparse if the hole created by the action
spans at least one sparse block, taking the allocation granularity
of sparse files into account.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 months agoCygwin: pwrite(2): sparsify file
Corinna Vinschen [Mon, 27 Nov 2023 21:48:50 +0000 (22:48 +0100)]
Cygwin: pwrite(2): sparsify file

write(2) sparsifies a file after an lseek far enough beyond EOF.

Let pwrite(2) sparsify as well if offset is far enough beyond EOF.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 months agoCygwin: fallocate(2): fix evaluating return value
Corinna Vinschen [Mon, 27 Nov 2023 20:17:12 +0000 (21:17 +0100)]
Cygwin: fallocate(2): fix evaluating return value

fallocate is not supposed to return an errno code, it has to
return -1 and set errno.

Fixes: dd90ede40510 ("Cygwin: introduce fallocate(2)")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 months agoCygwin: open(2): reset sparseness on O_TRUNCated files
Corinna Vinschen [Mon, 27 Nov 2023 20:14:49 +0000 (21:14 +0100)]
Cygwin: open(2): reset sparseness on O_TRUNCated files

open(2) implements O_TRUNC by just reducing the size of the file
to 0, to make sure EAs stay available.

Turns out, file sparseness is not removed this way either, so add
code to do just that.

Fixes: 603ef545bdbd ("* fhandler.cc (fhandler_base::open): Never open files with FILE_OVERWITE/FILE_OVERWRITE_IF.")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 months agoCygwin: introduce fallocate(2)
Corinna Vinschen [Sun, 26 Nov 2023 20:05:07 +0000 (21:05 +0100)]
Cygwin: introduce fallocate(2)

First cut of the new, Linux-specific fallocate(2) function.
Do not add any functionality yet, except of basic handling
of FALLOC_FL_KEEP_SIZE.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 months agoCygwin: fcntl.h: Use cdefs.h macros
Corinna Vinschen [Sun, 26 Nov 2023 14:41:41 +0000 (15:41 +0100)]
Cygwin: fcntl.h: Use cdefs.h macros

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 months agoCygwin: fhandler: rename ftruncate method to fallocate
Corinna Vinschen [Sun, 26 Nov 2023 11:50:38 +0000 (12:50 +0100)]
Cygwin: fhandler: rename ftruncate method to fallocate

also, take mode flags parameter instead of just a bool.
Introduce __FALLOC_FL_TRUNCATE mode flag as internal flag to
indictae being called from ftruncate(2).

This is in preparation of an upcoming change introducing the
Linx-specific fallocate(2) call.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 months agoCygwin: posix_fallocate: return ENODEV
Corinna Vinschen [Sat, 25 Nov 2023 19:56:52 +0000 (20:56 +0100)]
Cygwin: posix_fallocate: return ENODEV

The fhandler method ftruncate returns either EISDIR if it has been
called on directories, or EINVAL if called on files other than
regular files.  This matches what ftruncate(2) is supposed to return,
but it doesn't match posix_fallocate(3), which is supposed to return
ENODEV in both cases.

To accomplish that, return ENODEV from fhandler_base::ftruncate()
and convert it to EINVAL in ftruncate(2). In posix_fallocate(3),
convert EISDIR to ENODEV.

Fixes: 7636b58590621 ("* autoload.cc (NtSetInformationFile): Define.")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 months agoCygwin: lseek: check for file sparseness, not for mount point sparseness
Corinna Vinschen [Sat, 25 Nov 2023 17:07:10 +0000 (18:07 +0100)]
Cygwin: lseek: check for file sparseness, not for mount point sparseness

The code introducing the lseek(2) code for the GNU extensions
SEEK_DATA and SEEK_HOLE accidentally checks if the mount point
has the "sparse" flag set and, if not, emulates SEEK_DATA/SEEK_HOLE
per the Linux specs.

However, the mount point "sparse" flag only determines whether
files should be made sparse or not.  Files may be sparse independently
of that, obviously.

Fix that by checking for the FILE_ATTRIBUTE_SPARSE_FILE attribute
instead.

Fixes: edfa581d3c5a ("Cygwin: lseek: implement SEEK_DATA and SEEK_HOLE for files")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 months agonewlib: nl_langinfo: Fix a bug of time stuff.
Takashi Yano [Thu, 23 Nov 2023 11:00:55 +0000 (20:00 +0900)]
newlib: nl_langinfo: Fix a bug of time stuff.

Previously, e.g. nl_langinfo(_NL_TIME_WMONTH_1) returns "February"
due to the bug. Similarly, nl_langinfo(_NL_TIME_WWDAY_1) returns
"Mon". This occurs because wide char month and weekday arrays are
pointed off-by-one (e.g. the array wmon[12] is reffered as wmon[1-12]
rather than wmon[0-11]). This patch fixes that.

Fixes: d47d5b850bed ("Extend locale support to maintain wide char values of native strings")
Reviewed-by: Corinna Vinschen <corinna@vinschen.de>
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
9 months agoCygwin: /dev/disk: Append '#N' if the same name appears more than once
Christian Franke [Tue, 21 Nov 2023 18:28:02 +0000 (19:28 +0100)]
Cygwin: /dev/disk: Append '#N' if the same name appears more than once

No longer drop ranges of identical link names.  Append '#0, #1, ...'
to each name instead.  Enhance charset allowed in label names.
No longer ignore null volume serial numbers.

Signed-off-by: Christian Franke <christian.franke@t-online.de>
9 months agoaarch64: Remove duplicated optimized memmove()
Sebastian Huber [Fri, 27 Oct 2023 16:25:35 +0000 (18:25 +0200)]
aarch64: Remove duplicated optimized memmove()

The optimized aarch64/memcpy.S already provides a memmove() implementation.

9 months agostdio: drop unnecessary calls to ORIENT
Corinna Vinschen [Mon, 20 Nov 2023 19:49:53 +0000 (20:49 +0100)]
stdio: drop unnecessary calls to ORIENT

Now that the low-level functions set and test stream orientation,
a few calls in API functions are redundant.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 months agostdio: set and test stream orientation in low-level input function __srget_r
Corinna Vinschen [Mon, 20 Nov 2023 19:47:52 +0000 (20:47 +0100)]
stdio: set and test stream orientation in low-level input function __srget_r

This allows to set and test orientation correctly if input is only
using macros from stdio.h.  Wide-char-oriented functions must call
__srefill_r directly.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 months agostdio: split byte- and wide-char-oriented low-level output functions
Corinna Vinschen [Mon, 20 Nov 2023 19:46:14 +0000 (20:46 +0100)]
stdio: split byte- and wide-char-oriented low-level output functions

Introduce function __swbufw_r and macros/inline-functions called
__swputc_r.  Call these functions/macros exclusively from wide-char
functions.

This allows to set and test the stream orientation correctly even if
output is only performed using byte-oriented macros from stdio.h.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 months agostdio: Fix bugs in commit 3d94e07c49b5
Takashi Yano [Fri, 10 Nov 2023 16:09:47 +0000 (01:09 +0900)]
stdio: Fix bugs in commit 3d94e07c49b5

The commit 3d94e07c49b5 has a few bugs which cause testsuite failure
in libstdc++. This is due to excess orientation check in __srefill_r()
and _ungetc_r(). Further, sscanf() family also calls ssvfscanf() family
with fp->_file == -1. This causes undesired orientation set/check for
sscanf() family. This patch fixes these problems.

Also, as in GLibC, do not set orientation in ungetc, and only set, but
do not check orientation in ungetwc.

Fixes: 3d94e07c49b5 ("newlib: libc: Fix crash on fprintf to a wide-oriented stream.")
Reported-by: Christophe Lyon <christophe.lyon@linaro.org>
Reported-by: Joel Sherrill <joel@rtems.org>
Co-developed-by: Corinna Vinschen <corinna@vinschen.de>
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 months agoCygwin: /dev/disk/by-uuid: Fix NTFS serial number print format
Christian Franke [Mon, 20 Nov 2023 14:40:42 +0000 (15:40 +0100)]
Cygwin: /dev/disk/by-uuid: Fix NTFS serial number print format

Signed-off-by: Christian Franke <christian.franke@t-online.de>
9 months agoReclaim _REENT_MP_P5S in _reclaim_reent
Chris Johns [Mon, 20 Nov 2023 01:04:58 +0000 (12:04 +1100)]
Reclaim _REENT_MP_P5S in _reclaim_reent

The _REENT_MP_P5S blocks are allocated using Balloc via i2b and linked in the
pow5mult call. As a result these blocks are not on the freelist managed by the
Bfree call. This change fixes a memory leak in threads that clean up using
_reclaim_reent.

RTEMS: Closes #4967

9 months agoCygwin: Document /dev/disk/by-* subdirectories
Christian Franke [Fri, 17 Nov 2023 17:41:08 +0000 (18:41 +0100)]
Cygwin: Document /dev/disk/by-* subdirectories

Signed-off-by: Christian Franke <christian.franke@t-online.de>
9 months agoCygwin: Add /dev/disk/by-label and /dev/disk/by-uuid symlinks
Christian Franke [Fri, 17 Nov 2023 14:22:52 +0000 (15:22 +0100)]
Cygwin: Add /dev/disk/by-label and /dev/disk/by-uuid symlinks

The new directories '/dev/disk/by-label' and '/dev/disk/by-uuid'
provide symlinks for each disk related volume label and serial
number:
'VOLUME_LABEL' -> '../../sdXN'
'VOLUME_SERIAL' -> '../../sdXN'

Signed-off-by: Christian Franke <christian.franke@t-online.de>
9 months ago__sfvwrite_r: call __sputc_r rather than putc in __SCLE case
Corinna Vinschen [Fri, 17 Nov 2023 16:00:54 +0000 (17:00 +0100)]
__sfvwrite_r: call __sputc_r rather than putc in __SCLE case

__sfvwrite_r is called under lock.  There's no reason to call
putc, locking the file recursively.  Add a comment that locking
is required when calling __sfvwrite_r.

Fixes: 49d64538cd20 ("* libc/include/stdio.h (FILE): define __SCLE for "convert line endings" for Cygwin.")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 months agov{fs}printf/v{fs}wprintf: create external output helpers
Corinna Vinschen [Thu, 16 Nov 2023 19:34:55 +0000 (20:34 +0100)]
v{fs}printf/v{fs}wprintf: create external output helpers

So far, the printf family of functions has two output helper functions
called __sprint_r and __sfputs_r.  Both are called from all variants of
vfprintf as well as vfwprintf.  There are also analogue helper functions
 for the string-creating functions vsprintf/vswprintf called __ssprint_r
and __ssputs_r.

However, the helpers are built once when building vfprintf/vsprintf with
the INTEGER_ONLY flag, and then they are part of the vfiprintf.c and
vsiprintf.c files.

The problem is this:

Even if a process only calls vfwprintf or the non-INTEGER_ONLY vfprintf
it will always have to include the INTEGER_ONLY vfiprintf. Otherwise the
helper functions are undefined.  Analogue for the string-creating
functions.

That's a useless waste of space by including one (or two) big, unused
function, if newlib is linked in statically.

Create new files to define the printf output helpers separately and
split them into byte-oriented and wide-char-oriented functions.  This
allows to link only the required functions.

Also, simplify the string output helpers and fix a potential (but
unlikely) buffer overflow in __ssprint_r.

Fixes: 8a0efa53e449 ("import newlib-2000-02-17 snapshot")
Fixes: 6121968b198d ("* libc/include/stdio.h (__VALIST): Guard against multiple definition.")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 months agonewlib.hin: regenerate
Corinna Vinschen [Thu, 16 Nov 2023 19:06:19 +0000 (20:06 +0100)]
newlib.hin: regenerate

The last two patches to configure.ac missed regeneration of newlib.hin.

Fixes: 64a11fded15b ("Fix problem with _newlib_version.h not being filled in correctly")
Fixes: 39f734a857e2 ("newlib: fix AC_DEFINE quoting style with version macros")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 months agoCygwin: Add /dev/disk/by-drive and /dev/disk/by-voluuid symlinks
Christian Franke [Thu, 16 Nov 2023 16:51:08 +0000 (17:51 +0100)]
Cygwin: Add /dev/disk/by-drive and /dev/disk/by-voluuid symlinks

The new directory '/dev/disk/by-drive' provides symlinks for each
disk related drive letter:
'x' -> '../../sdXN'
The new directory '/dev/disk/by-voluuid' provides symlinks for each
disk related storage volume:
'MBR_SERIAL-OFFSET' -> '../../sdXN'
'VOLUME_GUID' -> '../../sdXN'
Both directories provide Windows specific information and do not
exist on Linux.

Signed-off-by: Christian Franke <christian.franke@t-online.de>
9 months agoCygwin: rand(3): implement in terms of random(3)
Corinna Vinschen [Tue, 14 Nov 2023 16:52:48 +0000 (17:52 +0100)]
Cygwin: rand(3): implement in terms of random(3)

This makes rand(3) ISO C compliant and adds locking to avoid
race conditions.

Reported-by: Bruno Haible <bruno@clisp.org>
Fixes: 8a0efa53e4491 ("import newlib-2000-02-17 snapshot")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 months agoFix profiler error() definition and usage
Mark Geisert [Tue, 14 Nov 2023 08:58:33 +0000 (00:58 -0800)]
Fix profiler error() definition and usage

Minor updates to profiler and gmondump, which share some code:
- fix operation of error() so it actually works as intended
- resize 4K-size auto buffer reservations to BUFSIZ (==1K)
- remove trailing '\n' from 2nd arg on error() calls everywhere
- provide consistent annotation of Windows error number displays

Fixes: 9887fb27f6126 ("Cygwin: New tool: profiler")
Fixes: 087a3d76d7335 ("Cygwin: New tool: gmondump")
Signed-off-by: Mark Geisert <mark@maxrnd.com>
9 months agoAdd release text for random(3) fix
Corinna Vinschen [Mon, 13 Nov 2023 19:01:36 +0000 (20:01 +0100)]
Add release text for random(3) fix

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 months agoCygwin: random: drop unused function srandomdev()
Corinna Vinschen [Mon, 13 Nov 2023 18:37:56 +0000 (19:37 +0100)]
Cygwin: random: drop unused function srandomdev()

Also drop includes only required for srandomdev().

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 months agoCygwin: random: make random(3) functions thread-safe
Corinna Vinschen [Mon, 13 Nov 2023 18:41:08 +0000 (19:41 +0100)]
Cygwin: random: make random(3) functions thread-safe

Add locking to the random(3) family of functions to gain
thread-safety per POSIX. Use NetBSD version of the file as
role-model.

Reported-by: Bruno Haible <bruno@clisp.org>
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 months agonewlib: libc: Fix crash on fprintf to a wide-oriented stream.
Takashi Yano [Thu, 5 Oct 2023 15:04:49 +0000 (00:04 +0900)]
newlib: libc: Fix crash on fprintf to a wide-oriented stream.

Previously, fprintf() on a wide-oriented stream crashes or outputs
garbage. This is because a narrow char string which can be odd bytes
in length is cast into a wide char string which should be even
bytes in length in __sprint_r/__sfputs_r based on the __SWID flag.
As a result, if the length is odd bytes, the reading buffer runs over
the buffer length, which causes a crash. If the length is even bytes,
garbage is printed.

With this patch, any output to the stream which is set to different
orientation fails with error just like glibc. Note that it behaves
differently from other libc implementations such as BSD, musl and
Solaris.

Reviewed-by: Corinna Vinschen <corinna@vinschen.de>
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
9 months agoCygwin: /dev/disk/by-id: Remove leading spaces from identify fields
Christian Franke [Wed, 8 Nov 2023 16:03:57 +0000 (17:03 +0100)]
Cygwin: /dev/disk/by-id: Remove leading spaces from identify fields

Various drives align the serial number to the right of the fixed
length field.

Signed-off-by: Christian Franke <christian.franke@t-online.de>
9 months agoCygwin: Document /dev/disk/by-id and /dev/disk/by-partuuid
Christian Franke [Tue, 7 Nov 2023 14:25:54 +0000 (15:25 +0100)]
Cygwin: Document /dev/disk/by-id and /dev/disk/by-partuuid

Signed-off-by: Christian Franke <christian.franke@t-online.de>
9 months agoCygwin: Add /dev/disk/by-partuuid symlinks
Christian Franke [Tue, 7 Nov 2023 09:57:15 +0000 (10:57 +0100)]
Cygwin: Add /dev/disk/by-partuuid symlinks

The new directory '/dev/disk/by-partuuid' provides symlinks for each
MBR or GPT disk partition:
'MBR_SERIAL-OFFSET' -> '../../sdXN'
'GPT_GUID' -> '../../sdXN'

Signed-off-by: Christian Franke <christian.franke@t-online.de>
9 months agoCygwin: Add /dev/disk/by-id symlinks
Christian Franke [Sun, 5 Nov 2023 14:54:23 +0000 (15:54 +0100)]
Cygwin: Add /dev/disk/by-id symlinks

The new directory '/dev/disk/by-id' provides symlinks for each
disk and its partitions:
'BUSTYPE-[VENDOR_]PRODUCT_SERIAL[-partN]' -> '../../sdX[N]'.
This is based on strings provided by STORAGE_DEVICE_DESCRIPTOR.
If this information is too short, a 128-bit hash of the
STORAGE_DEVICE_UNIQUE_IDENTIFIER raw data is added.
Administrator privileges are not required.

Signed-off-by: Christian Franke <christian.franke@t-online.de>
9 months agoamdgcn: remove unnecessary scalar cache flush
Andrew Stubbs [Fri, 20 Oct 2023 11:54:17 +0000 (12:54 +0100)]
amdgcn: remove unnecessary scalar cache flush

The exit code isn't actually written via the scalar cache so the cache flush
is not actually needed.

9 months agoCygwin: let feraiseexcept actually raise an exception
Corinna Vinschen [Tue, 31 Oct 2023 12:07:36 +0000 (13:07 +0100)]
Cygwin: let feraiseexcept actually raise an exception

The exception handling inside of Cygwin functions marked as SIGFE
covers exceptions and lets the library code handle them gracefully.
If these functions want to raise an exception, they have to send a
signal explicitely via raise(3).

That's not what we want in feraiseexcept(). It triggers a floating
point exception explicitely by calling the i387 op "fwait".  Being
marked as SIGFE, this exception will be suppressed and the normal
exception handling won't kick in.

Fix this by moving feraiseexcept into the NOSIGFE realm.

Fixes: 0f81b5d4bcaa ("* Makefile.in (DLL_OFILES): Add new fenv.o module.")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 months agoCygwin: cwd: avoid releasing the cwdstuff SRW Lock twice
Corinna Vinschen [Mon, 30 Oct 2023 18:40:31 +0000 (19:40 +0100)]
Cygwin: cwd: avoid releasing the cwdstuff SRW Lock twice

cwdstuff::set has a code snippet handling the case where a process
can't create a handle to a directory, e. g., due to permissions.

Commit 88443b0a22589 ("cwdstuff: Don't leave from setting the CWD
prematurely on init") introduced a special case to handle this
situation at process initialization. It also introduces an early
mutex release, which is not required, but ok, because we're in the
init phase. Releasing the mutex twice is no problem since the mutexes
are recursive.

Fast forward to commit 0819679a7a210 ("Cygwin: cwd: use SRWLOCK
instead of muto"). The mechanical change from a recursive mutex
to a non-recursive SRWLOCK failed to notice that this very specific
situation will release the SRWLOCK twice.

Remove the superfluous release action. While at it, don't set dir to
NULL, but h, since dir will get the value of h anyway later on.
Setting h to NULL may not be necessary, but better safe than sorry.

Reported-by: tryandbuy >tryandbuy@proton.me>
Fixes: 88443b0a22589 ("cwdstuff: Don't leave from setting the CWD prematurely on init")
Fixes: 0819679a7a210 ("Cygwin: cwd: use SRWLOCK instead of muto")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
9 months agoCygwin: dsp: Improve minimum buffser size estimation.
Takashi Yano [Thu, 5 Oct 2023 12:52:59 +0000 (21:52 +0900)]
Cygwin: dsp: Improve minimum buffser size estimation.

The commit 322c7150b25e restricts buffer size with a fixed length,
however, the minimum buffer size should be varied by the sample rate.
With this patch, it is estimated using sample rate, sample width
and number of channels so that the buffer length is not less than
80 msec which is almost the minimum value of Win MME to work.

Fixes: 322c7150b25e ("Cygwin: dsp: Avoid setting buffer that is too small.")
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
10 months agonewlib: fix AC_DEFINE quoting style with version macros
Mike Frysinger [Sun, 15 Oct 2023 09:25:52 +0000 (15:10 +0545)]
newlib: fix AC_DEFINE quoting style with version macros

configure.ac files use [] for quoting by default, not "", which
means the "" are passed through as literals.  We don't want that
for these comments, so change the "..." to [...].

10 months agosparc: Improve setjmp()
Sebastian Huber [Fri, 6 Oct 2023 05:29:05 +0000 (07:29 +0200)]
sparc: Improve setjmp()

Flush the windows in setjmp().  This helps if the stack is changed after
the setjmp() and we want to jump back to the original stack using
longjmp().

10 months agoriscv: Fix fenv.h support
Sebastian Huber [Thu, 12 Oct 2023 09:59:32 +0000 (11:59 +0200)]
riscv: Fix fenv.h support

Use the same C preprocessor expressions to define FE_RMODE_MASK and
__RISCV_HARD_FLOAT.

The problem was noticed on GCC 10 which does not define __riscv_f.

This page took 0.0745 seconds and 5 git commands to generate.