Commit Graph

21030 Commits

Author SHA1 Message Date
Thomas Schwinge 52cb937004 nvptx: Provide stub 'gettimeofday'
Instead of them FAILing due to 'unresolved symbol gettimeofday', this
makes PASS a number of GCC 'gfortran.dg' test cases, for example.
2023-01-19 21:50:57 +01:00
Jeff Johnston 8af65b8c14 Add amdgcn vectorized math routines to NEWS 2023-01-19 15:14:44 -05:00
Victor L. Do Nascimento a7be7d8b75 COPYING.NEWLIB: Arm licence entry amendment
Add relevant SPDX-License-Identifier to Arm licence entry in
COPYING.NEWLIB.
2023-01-19 15:05:05 -05:00
Victor L. Do Nascimento 66dfdc5aaf NEWS: report arm ABI break
Add details of ABI-conformance fix to setjmp implementation under
Major changes in newlib version 4.3.0
2023-01-19 15:03:24 -05:00
Sebastian Huber 2e80e1282a NEWS: Add news items 2023-01-19 14:57:17 -05:00
Corinna Vinschen 03bbde566a Cygwin: Add 3.4.5 release message
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-19 18:33:40 +01:00
Corinna Vinschen 1d4110e347 Cygwin: fix build of cygcheck and strace
adding <target>_LDFLAGS overrides AM_LDFLAGS and thus fails to
build cygcheck and strace statically.  Fix it.

Fixes: 8d318bf142 ("Cygwin: disable high-entropy VA for cygcheck and strace")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-19 18:28:16 +01:00
Takashi Yano 9522166db1 Cygwin: dsp: Fix a problem that fcntl() does not take effect.
Previously, fhandler_dev_dsp (OSS) has a problem that fcntl() does
not take effect at all. This patch fixes the issue.

Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
Reviewed-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-19 22:54:12 +09:00
Corinna Vinschen 3c2ac163da Cygwin: fix two comments in heap.cc and memory_layout.h
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-18 20:13:38 +01:00
Corinna Vinschen e1fcd10b48 Cygwin: memory_init: initialize user heap here
Eventually move user heap initialization to memory_init.
The call order is not changed. Drop a now useless comment.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-18 20:13:38 +01:00
Corinna Vinschen 7e332208a0 Cygwin: open_shared: always bump next_address
The new loop in open_shared has a subtil performance problem.
Next_address is bumped only if mapping at this address
failed.  Every subsequent call to open_shared has a high probability
having to call MapViewOfFileEx twice, because next_address is still
set to the address of the last successful mapping.

Avoid this by bumping next_address every time.

While at it, fix a comment.

Fixes: dc0fe7742b ("Cygwin: open_shared: try harder allocating a shared region")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-18 20:13:36 +01:00
Kwok Cheung Yeung e18743072b amdgcn: Add vectorized math routines
This implements a set of vectorized math routines to be used by the
compiler auto-vectorizer.  Versions for vectors with 2 lanes up to
64 lanes (in powers of 2) are provided.

These routines are based on the scalar versions of the math routines in
libm/common, libm/math and libm/mathfp.  They make extensive use of the GCC
C vector extensions and GCN-specific builtins in GCC.
2023-01-18 13:22:58 -05:00
Corinna Vinschen 31302b267b Cygwin: drop fixed addresses for standard shared regions
With the previous commit 9ddd48ee1b ("Cygwin: /proc/<PID>/maps:
print real shared region addresses"), the real addresses of
the standard shared regions (cygwin, user, myself, shared console)
are read from the printed process itself.  We don't need fixed
addresses anymore, so drop the definitions and simplify open_shared.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-18 13:16:50 +01:00
Corinna Vinschen 9ddd48ee1b Cygwin: /proc/<PID>/maps: print real shared region addresses
So far, the addresses printed for the shared regions of a process
were faked.  The assumption was that the shared regions are always
in the same place in all processes, so we just printed the addresses
of the current process.  This is no safe bet.  The only safe bet is
the address of the cygheap.  So keep track of the addresses in the
cygheap and read the addresses from the cygheap of the observed
processes.  Add output for the shared console.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-17 22:00:48 +01:00
Corinna Vinschen 8d318bf142 Cygwin: disable high-entropy VA for cygcheck and strace
It's not a good idea to enable high-entropy VA for tools loading the
Cygwin DLL dynamically.  The addresses used by HEVA tend to collide with
fixed address areas managed by Cygwin.

Fixes: 60675f1a7e ("Cygwin: decouple shared mem regions from Cygwin DLL")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-17 18:41:10 +01:00
Corinna Vinschen dc0fe7742b Cygwin: open_shared: try harder allocating a shared region
For fixed regions (cygwin/user/myself/shared console), try fixed
address first.  Fallback to non-fixed region.  Don't even try fixed
address if the Cygwin DLL gets dynamically loaded.

For non-fixed regions, try to allocate in a loop within the area
from SHARED_REGIONS_ADDRESS_LOW to SHARED_REGIONS_ADDRESS_HIGH.

Fixes: 60675f1a7e ("Cygwin: decouple shared mem regions from Cygwin DLL")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-17 18:41:10 +01:00
Corinna Vinschen 50cbbb1c0e Cygwin: Move shared regions, rename PINFO... to MYSELF_REGION_ADDRESS
Fix comments accordingly.

This is in preparation for a change in open_shared, handling shared
regions more cleanly.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-17 17:07:11 +01:00
Corinna Vinschen 93508e5bb8 Cygwin: open_shared: don't reuse shared_locations parameter as output
For ages, open_shared uses the shared_locations parameter as
output to indicate if the mapping for a shared region has been
created or just opened.  Split this into two parameters.  Use
the shared_locations parameter as input only, return the creation
state of the mapping in a bool reference parameter.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-17 16:32:14 +01:00
Corinna Vinschen 77680cac94 Cygwin: autoload: clean up arguments to LoadDllFunc*
The number of args multiplied by 4 was only required for
32 bit x86 to construct the symbol name correctly.  Drop it.

In the assembler code, split the numerical values for "notimp"
and "err" into half words for cleaner layout.

Fix description accordingly.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-17 16:32:14 +01:00
Corinna Vinschen 49b52521f3 Cygwin: /proc/cpuinfo: always print trailing empty line, as on Linux
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-16 21:40:59 +01:00
Corinna Vinschen 75c375e86d Cygwin: /proc/cpuinfo: Always print topology info
vmstat from proc-ps-4.0.x prints "Unable to create system stat structure"
if the /proc/cpuinfo output fails to contain topology info.  While
Linux always prints topology info if the kernel has been built with
CONFIG_SMP, Cygwin only prints topology info if the CPU is known to
be multi-core (i. e., the HT feature flag is set).

Fix that by printing topology info all the time, even for single-core
CPUs.

Fixes: e0d48debed ("Fix /proc/cpuinfo topology and cache size info")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-16 14:23:38 +01:00
Corinna Vinschen 34b361c903 Cygwin: newgrp: improve doumentation
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-14 20:13:54 +01:00
Corinna Vinschen 62b9c98f12 Cygwin: add newgrp(1) to release message for 3.5.0
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-14 18:00:35 +01:00
Corinna Vinschen 8bd56ec873 Cygwin: newgrp: first full version
- add '-' option
- make group argument optional
- drop ability to take a numerical group argument
- simplify usage output to bare minimum
- Add manpage and documentation

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-14 17:47:48 +01:00
Mike Frysinger 73e4ded2fe libgloss: csky: fix pointer-to-integer warning
parameters is an array of integers, so assigning NULL (a pointer)
doesn't make sense.  Use 0 instead which produces the same code.
2023-01-13 17:24:17 -05:00
Mike Frysinger 4391d2aed3 libgloss: merge csky into top-level Makefile
Avoid a recursive make to speed things up a bit.
A csky-elf build shows installed objects & libs produce same code.
2023-01-13 17:24:17 -05:00
Corinna Vinschen c8ddd03cb0 Cygwin: add very simple newgrp(1) tool
This tool allows to change the primary group for a child process.
The new primary group MUST be part of the supplementary group list
of newgrp's user token.

The command started as child process is specified on the command line.
If it's missing, start the user's default shell with the new primary
group.

TODO: Implement '-' option.
      Add command description to documentation.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-13 20:59:29 +01:00
Jon Turney 6072dcfc34
Cygwin: CI: Run cygserver for tests
Note that cygserver must be run using the same cygwin1.DLL as test
programs, as they communicate over a named pipe whose name contains the
'installation key' (which is a hash of the cygwin1.dll's path).

We run cygserver via 'cmd' to avoid the special code which handles a
cygwin parent process starting a cygwin child process, which assumes the
same version of cygwin in both.
2023-01-13 17:03:59 +00:00
Jon Turney 0965454822
Cygwin: testsuite: Drop appending 'ntsec' to CYGWIN in cygrun wrapper
Don't append 'ntsec' to the CYGWIN env var in the cygrun wrapper. It
doesn't have any effect anymore.
2023-01-13 17:03:58 +00:00
Jon Turney 663922f618
Cygwin: testsuite: Update pthread tests for default SCHED_FIFO
Update for default (and only) thread scheduler policy is SCHED_FIFO.
2023-01-13 17:03:57 +00:00
Jon Turney 736618054c
Cygwin: testsuite: Update mutex tests for changed default mutex type
Default mutex type is PTHREAD_MUTEX_NORMAL.

Attempting to unlock an unowned mutex of that type is specified as
undefined behaviour, not returning EPERM.

mutex7e verfies that attempting to unlock an unowned mutex of type
PTHREAD_MUTEX_ERRORCHECK returns EPERM.
2023-01-13 17:03:56 +00:00
Jon Turney 52983af631
Cygwin: testsuite: 64-bit fixes in pthread testcases
Fix warnings and 64-bit issues in pthread testcases.

See pthread-win32 commit 1183e5ac etc.
2023-01-13 17:03:55 +00:00
Jon Turney 01a0e3e491
Cygwin: testsuite: Fix compilation warnings
Fix the warnings the previous change surfaces.

See ltp commit d5c2112f for mmap fixes.
2023-01-13 17:03:54 +00:00
Jon Turney daeeaa97b3
Cygwin: testsuite: Build testcases using automake
Build all the testcase executables directly using automake, rather than
passing the compiler information into DejaGnu to have it build them.

(This means you get build avoidance for these executables, so they only
get built once, rather than every time you run the test, and makes it
much easier to run them in isolatation against the installed Cygwin,
which is really nice to have when trying to fix broken tests...)

Rename the 'cygrun' subdirectory to 'mingw', and build all the testsuite
MinGW executables there.

Drop sample-miscompile.c (testing that compile failure is detected is
perhaps useful, but not here...)
2023-01-13 17:03:52 +00:00
Jon Turney 50a741e2f1
Cygwin: testsuite: automake doesn't define objdir
objdir isn't a predefined output variable in Automake (any more?), so
this was just using the absolute path /testsuite as the test's temporary
directory.  Use builddir instead.
2023-01-13 17:03:50 +00:00
Xianmiao Qu 7f4c04755e libgloss: csky: use atexit to call fini-array functions.
__libc_fini_array should be called upon exit to call the
global termination functions in fini-array, use atexit to
register it at __start.
2023-01-13 14:08:23 +01:00
Mike Frysinger 3ef006f056 libgloss: merge nios2 into top-level Makefile
Avoid a recursive make to speed things up a bit.
A nios2-elf build shows installed objects & libs produce same code.
2023-01-12 05:26:57 -05:00
Corinna Vinschen e5880bef39 Cygwin: wincap.h: clarify NO_COPY_RO usage
...and drop one unnecessary usage of NO_COPY_RO.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-12 10:51:39 +01:00
Corinna Vinschen e7d0f0eb41 Cygwin: wincap: make capability flags readonly
So far the capability bits were stored in the .cygwin_dll_common
R/W section because we overwrite the is_server bit.  Just don't.
Move the bit to class wincapc instead and define all wincaps
bitfields const.

Fixes: 8937c103ed ("* wincap.cc (all wincaps): Store in .cygwin_dll_common section same as wincap.  Add comment to explain why.")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-12 10:34:32 +01:00
Mike Frysinger 0e1c0a02cf libgloss: merge d30v into top-level Makefile
Avoid a recursive make to speed things up a bit.
2023-01-11 08:42:19 -05:00
Mike Frysinger 5401db924f libgloss: merge arc into top-level Makefile
Avoid a recursive make to speed things up a bit.
2023-01-11 08:42:16 -05:00
Mike Frysinger 275b39e219 libgloss: merge arm into top-level Makefile
Avoid a recursive make to speed things up a bit.
2023-01-11 01:00:21 -05:00
Mike Frysinger 26f9cfd7a8 libgloss: arm: break newlib dependency
The libgloss port has been reaching back into newlib internals for a
single header whose contents have been frozen for almost a decade.
To break this backwards libgloss->newlib dependency, move the acle
header to the srcroot include/ so everyone can use the same copy.
2023-01-11 01:00:15 -05:00
Victor L. Do Nascimento 31e5ce10db newlib: libc: setjmp M-profile PACBTI-enablement
Add function prologue/epilogue to conditionally add BTI landing pads
and/or PAC code generation & authentication instructions depending on
compilation flags.  Save the PAC value in the jump buffer so that
longjmp can only return to the authenticated location.
2023-01-10 16:47:02 +00:00
Victor L. Do Nascimento adc36ede11 newlib: libc: aeabi_memset M-profile PACBTI-enablement
Add function prologue/epilogue to conditionally add BTI landing pads
and/or PAC code generation & authentication instructions depending on
compilation flags.
2023-01-10 14:16:05 +00:00
Victor L. Do Nascimento bddfd64ec2 newlib: libc: aeabi_memmove M-profile PACBTI-enablement
Add function prologue/epilogue to conditionally add BTI landing pads
and/or PAC code generation & authentication instructions depending on
compilation flags.
2023-01-10 14:16:05 +00:00
Victor L. Do Nascimento 60a50c2846 newlib: libc: memcpy M-profile PACBTI-enablement
Add function prologue/epilogue to conditionally add BTI landing pads
and/or PAC code generation & authentication instructions depending on
compilation flags.
2023-01-10 14:16:05 +00:00
Victor L. Do Nascimento db30cbee41 newlib: libc: memchr M-profile PACBTI-enablement
Add function prologue/epilogue to conditionally add BTI landing pads
and/or PAC code generation & authentication instructions depending on
compilation flags.
2023-01-10 14:16:05 +00:00
Victor L. Do Nascimento 5582536896 newlib: libc: strlen M-profile PACBTI-enablement
Add function prologue/epilogue to conditionally add BTI landing pads
and/or PAC code generation & authentication instructions depending on
compilation flags.

This patch enables PACBTI for all relevant variants of strlen:
     * Newlib for armv8.1-m.main+pacbti
     * Newlib for armv8.1-m.main+pacbti+mve
     * Newlib-nano
2023-01-10 14:16:05 +00:00
Victor L. Do Nascimento ebd922e77a newlib: libc: strcmp M-profile PACBTI-enablement
Add function prologue/epilogue to conditionally add BTI landing pads
and/or PAC code generation & authentication instructions depending on
compilation flags.

This patch enables PACBTI for all relevant variants of strcmp:
     * Newlib for armv8.1-m.main+pacbti
     * Newlib for armv8.1-m.main+pacbti+mve
     * Newlib-nano
2023-01-10 14:16:05 +00:00