aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-01-22Cygwin: mount: allow any valid character in UNC pathsCorinna Vinschen2-3/+15
The current code only allows server and share names to start with ASCII chars [a-zA-Z0-9],, which is not correct. Rather, check for a valid share character. Fixes: 1fd5e000ace55 ("import winsup-2000-02-17 snapshot") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-22Cygwin: fsync: Fix EINVAL for block device.Takashi Yano2-1/+7
The commit af8a7c13b516 has a problem that fsync returns EINVAL for block device. This patch treats block devices as a special case. https://cygwin.com/pipermail/cygwin/2023-January/252916.html Fixes: af8a7c13b516 ("Cygwin: fsync: Return EINVAL for special files.") Reported-by: Yano Ray <yanorei@hotmail.co.jp> Reviewed-by: Corinna Vinschen <corinna@vinschen.de> Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
2023-01-21Cygwin: tape: tapes are character devices, not block devicesCorinna Vinschen2-258/+258
Fixes: 727a81f4d93f ("* devices.h (device::exists_func): Redefine field.") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-20Bump up newlib to 4.3.0newlib-4.3.0Jeff Johnston2-13/+13
2023-01-19nvptx: In offloading execution, map '_exit' to 'abort' [GCC PR85463]Thomas Schwinge1-3/+12
This is still not properly resolving <https://gcc.gnu.org/PR85463> '[nvptx] "exit" in offloaded region doesn't terminate process', but is one step into that direction, and allows for simplifying some GCC code.
2023-01-19nvptx: Provide stub 'getpid', 'kill', 'stat'Thomas Schwinge1-0/+17
... as implemented for GCN in 'newlib/libc/sys/amdgcn/*' files, but (for now) still adding to the catch-all 'newlib/libc/machine/nvptx/misc.c' file. This is necessary for the GCC/Fortran I/O system, for example. Co-authored-by: Andrew Stubbs <ams@codesourcery.com>
2023-01-19nvptx: Remove newlib ELIX level 1 restrictionThomas Schwinge2-5/+1
Such a hard-coded ELIX level restriction is only being applied for nvptx newlib -- but we'd actually like higher levels' functions available there, too. (Users continue to be able to override this via newlib 'configure', as for every other newlib target.) This already enables GCC test cases that currently FAIL due to 'unresolved symbol strndup' ('gcc.dg/builtin-dynamic-object-size-0.c'), or 'unresolved symbol mempcpy' ('gcc.dg/torture/pr45636.c'), for example. Co-authored-by: Andrew Stubbs <ams@codesourcery.com>
2023-01-19nvptx: Don't use global constructor for SSP setupThomas Schwinge1-2/+2
Given that nvptx newlib currently restricts itself to ELIX level 1, this is not already a problem. However, in the following we'd like to lift that restriction, and then run into: [...]/newlib/libc/ssp/stack_protector.c: In function ‘__stack_chk_init’: [...]/newlib/libc/ssp/stack_protector.c:31:1: sorry, unimplemented: global constructors not supported on this target 31 | } | ^ GCC patch "nvptx: Support global constructors/destructors via 'collect2'" has been posted, but not yet accepted. Until that is resolved, use the same manual SSP setup as for GCN.
2023-01-19nvptx: Provide stub 'gettimeofday'Thomas Schwinge1-0/+7
Instead of them FAILing due to 'unresolved symbol gettimeofday', this makes PASS a number of GCC 'gfortran.dg' test cases, for example.
2023-01-19Add amdgcn vectorized math routines to NEWSJeff Johnston1-0/+1
2023-01-19COPYING.NEWLIB: Arm licence entry amendmentVictor L. Do Nascimento1-0/+2
Add relevant SPDX-License-Identifier to Arm licence entry in COPYING.NEWLIB.
2023-01-19NEWS: report arm ABI breakVictor L. Do Nascimento1-0/+2
Add details of ABI-conformance fix to setjmp implementation under Major changes in newlib version 4.3.0
2023-01-19NEWS: Add news itemsSebastian Huber1-0/+6
2023-01-19Cygwin: Add 3.4.5 release messageCorinna Vinschen1-0/+5
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-19Cygwin: fix build of cygcheck and straceCorinna Vinschen1-2/+2
adding <target>_LDFLAGS overrides AM_LDFLAGS and thus fails to build cygcheck and strace statically. Fix it. Fixes: 8d318bf142f7 ("Cygwin: disable high-entropy VA for cygcheck and strace") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-19Cygwin: dsp: Fix a problem that fcntl() does not take effect.Takashi Yano2-0/+14
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-18Cygwin: fix two comments in heap.cc and memory_layout.hCorinna Vinschen2-4/+3
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-18Cygwin: memory_init: initialize user heap hereCorinna Vinschen1-2/+1
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-18Cygwin: open_shared: always bump next_addressCorinna Vinschen1-12/+8
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: dc0fe7742b8c ("Cygwin: open_shared: try harder allocating a shared region") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-18amdgcn: Add vectorized math routinesKwok Cheung Yeung96-46/+9990
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-18Cygwin: drop fixed addresses for standard shared regionsCorinna Vinschen2-51/+18
With the previous commit 9ddd48ee1b8d ("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-17Cygwin: /proc/<PID>/maps: print real shared region addressesCorinna Vinschen5-3/+24
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-17Cygwin: disable high-entropy VA for cygcheck and straceCorinna Vinschen1-0/+2
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: 60675f1a7eb2 ("Cygwin: decouple shared mem regions from Cygwin DLL") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-17Cygwin: open_shared: try harder allocating a shared regionCorinna Vinschen2-11/+53
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: 60675f1a7eb2 ("Cygwin: decouple shared mem regions from Cygwin DLL") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-17Cygwin: Move shared regions, rename PINFO... to MYSELF_REGION_ADDRESSCorinna Vinschen2-9/+11
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-17Cygwin: open_shared: don't reuse shared_locations parameter as outputCorinna Vinschen4-29/+31
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-17Cygwin: autoload: clean up arguments to LoadDllFunc*Corinna Vinschen1-234/+237
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-16Cygwin: /proc/cpuinfo: always print trailing empty line, as on LinuxCorinna Vinschen1-2/+2
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-16Cygwin: /proc/cpuinfo: Always print topology infoCorinna Vinschen2-3/+18
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: e0d48debedfa ("Fix /proc/cpuinfo topology and cache size info") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-14Cygwin: newgrp: improve doumentationCorinna Vinschen1-11/+17
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-14Cygwin: add newgrp(1) to release message for 3.5.0Corinna Vinschen2-0/+24
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-14Cygwin: newgrp: first full versionCorinna Vinschen3-39/+212
- 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-13libgloss: csky: fix pointer-to-integer warningMike Frysinger1-1/+1
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-13libgloss: merge csky into top-level MakefileMike Frysinger6-181/+506
Avoid a recursive make to speed things up a bit. A csky-elf build shows installed objects & libs produce same code.
2023-01-13Cygwin: add very simple newgrp(1) toolCorinna Vinschen2-0/+102
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-13Cygwin: CI: Run cygserver for testsJon Turney1-3/+13
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-13Cygwin: testsuite: Drop appending 'ntsec' to CYGWIN in cygrun wrapperJon Turney1-16/+0
Don't append 'ntsec' to the CYGWIN env var in the cygrun wrapper. It doesn't have any effect anymore.
2023-01-13Cygwin: testsuite: Update pthread tests for default SCHED_FIFOJon Turney3-11/+11
Update for default (and only) thread scheduler policy is SCHED_FIFO.
2023-01-13Cygwin: testsuite: Update mutex tests for changed default mutex typeJon Turney4-6/+3
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-13Cygwin: testsuite: 64-bit fixes in pthread testcasesJon Turney17-77/+77
Fix warnings and 64-bit issues in pthread testcases. See pthread-win32 commit 1183e5ac etc.
2023-01-13Cygwin: testsuite: Fix compilation warningsJon Turney14-40/+40
Fix the warnings the previous change surfaces. See ltp commit d5c2112f for mmap fixes.
2023-01-13Cygwin: testsuite: Build testcases using automakeJon Turney7-67/+325
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-13Cygwin: testsuite: automake doesn't define objdirJon Turney1-1/+1
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-13libgloss: csky: use atexit to call fini-array functions.Xianmiao Qu1-0/+2
__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-12libgloss: merge nios2 into top-level MakefileMike Frysinger6-142/+475
Avoid a recursive make to speed things up a bit. A nios2-elf build shows installed objects & libs produce same code.
2023-01-12Cygwin: wincap.h: clarify NO_COPY_RO usageCorinna Vinschen2-1/+7
...and drop one unnecessary usage of NO_COPY_RO. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-12Cygwin: wincap: make capability flags readonlyCorinna Vinschen2-30/+14
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: 8937c103ed141 ("* 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-11libgloss: merge d30v into top-level MakefileMike Frysinger6-168/+112
Avoid a recursive make to speed things up a bit.
2023-01-11libgloss: merge arc into top-level MakefileMike Frysinger6-175/+122
Avoid a recursive make to speed things up a bit.
2023-01-11libgloss: merge arm into top-level MakefileMike Frysinger9-425/+627
Avoid a recursive make to speed things up a bit.