Commit Graph

17832 Commits

Author SHA1 Message Date
Giacomo Tesio 08c85f7606 jehanne: add sys/resource.h and getrusage 2017-09-03 22:19:40 +02:00
Giacomo Tesio ed6683643a jehanne: add lstat (as alias of stat), dup and dup2 2017-09-03 22:18:20 +02:00
Giacomo Tesio bae05fec4e jehanne: add chmod functions (just calling libposix) 2017-08-31 01:16:40 +02:00
Giacomo Tesio ac8a82024f jehanne: add access(2) 2017-08-28 01:51:37 +02:00
Giacomo Tesio 27e59324a7 jehanne: initialize timeval and timezone reader 2017-08-25 23:29:01 +02:00
Giacomo Tesio 0ec8faf91e jehanne: fix open_translator 2017-08-24 00:10:39 +02:00
Giacomo Tesio 779da685df jehanne: define mkdir, chdir and fchdir 2017-08-23 04:59:30 +02:00
Giacomo Tesio 58696ccd34 jehanne: configure AT_FDCWD 2017-08-23 03:08:07 +02:00
Giacomo Tesio 60b472da26 jehanne: fix build 2017-08-23 02:24:29 +02:00
Giacomo Tesio 7917cb8537 jehanne: handle POSIX_chmod and POSIX_fchmod in default_error_translator 2017-08-23 01:07:32 +02:00
Giacomo Tesio 9daa35f217 jehanne: implement open_translator according to the new specification in libposix 2017-08-22 03:33:20 +02:00
Giacomo Tesio 075dc184a0 jehanne: introduce libposix_getdents machinery 2017-08-21 01:19:27 +02:00
Giacomo Tesio 79333d77e6 jehanne: add getcwd, getlogin, getlogin_r, getpass, pread and pwrite 2017-08-21 00:16:08 +02:00
Giacomo Tesio 185a319fdc jehanne: enable posix and unix functions in configure.host 2017-08-21 00:15:07 +02:00
Giacomo Tesio de37f0ac51 jehanne: rm useless local.h 2017-08-19 16:35:46 +02:00
Giacomo Tesio 075aeba3a9 jehanne: enable posix build 2017-08-19 16:09:36 +02:00
Giacomo Tesio 025678147e jehanne: fix sys/dirent.h (still BROKEN) 2017-08-19 00:08:48 +02:00
Giacomo Tesio 8fbd328317 jehanne: first try to enable posix (BROKEN) 2017-08-18 01:02:24 +02:00
Giacomo Tesio 8059e6c9db jehanne: introduced pause 2017-08-18 00:15:26 +02:00
Giacomo Tesio 1680e696ac Merge branch 'upstream-master' 2017-08-17 22:40:51 +02:00
Kito Cheng c496cbb6bd Add RISC-V port for libgloss
Contributor list:
    - Andrew Waterman  <andrew@sifive.com>
    - Palmer Dabbelt  <palmer@dabbelt.com>
    - Kito Cheng  <kito.cheng@gmail.com>
    - Alex Suykov  <alex.suykov@gmail.com>
2017-08-17 14:51:05 -04:00
Kito Cheng 7040b2de08 Add RISC-V port for libm
Contributor list:
    - Michael Neilly  <mneilly@yahoo.com>
    - Kito Cheng  <kito.cheng@gmail.com>
2017-08-17 12:54:56 -04:00
Eric Blake 979d467ff6 headers: avoid bareword attributes
Always use the __-decorated form of an attribute name in public
headers, as the bareword form is in the user's namespace, and we
don't want compilation to break just because the user defines the
bareword to mean something else.

Signed-off-by: Eric Blake <eblake@redhat.com>
2017-08-17 07:10:03 -05:00
Eric Blake 7b3d8b9485 headers: avoid bareword attributes
Always use the __-decorated form of an attribute name in public
headers, as the bareword form is in the user's namespace, and we
don't want compilation to break just because the user defines the
bareword to mean something else.

Signed-off-by: Eric Blake <eblake@redhat.com>
2017-08-17 07:10:03 -05:00
Szabolcs Nagy cfa64a86d1 Fix crt0 init fini code
__USES_INITFINI__ ifdef was incorrectly copied from arm
(it's an arm backend thing in gcc, not meaningful on aarch64)
2017-08-17 13:45:26 +02:00
Kito Cheng 363dbb9e44 Add RISC-V port for newlib
Contributor list:
    - Andrew Waterman  <andrew@sifive.com>
    - Palmer Dabbelt  <palmer@dabbelt.com>
    - Kito Cheng  <kito.cheng@gmail.com>
    - Scott Beamer  <sbeamer@eecs.berkeley.edu>
2017-08-16 18:00:58 -04:00
Alexander Fedotov-B55613 7e69f983a4 fix typo in AArch64 crt0 2017-08-15 16:19:25 +02:00
Alexander Fedotov-B55613 1f6644876e use stack from linker script when nosys 2017-08-14 10:18:14 +02:00
Corinna Vinschen 9d602b98f8 newlib: regenerate libc/stdlib/Makefile.am
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-11 10:17:16 +02:00
Yao Qi 32ca315312 Don't fetch command line options without semi-hosting
Nowadays, the code fetching command line options via semi-hosting are
unconditionally pulled in, so that the semi-hosting code is still
there even I compile with option --specs=nosys.specs.

gdb ./aarch64-none-elf/libgloss/aarch64/crt0.o

(gdb) disassemble _start

   0x0000000000000050 <+80>:	ldr	x1, 0x128 <_cpu_init_hook+48>
   0x0000000000000054 <+84>:	mov	w0, #0x15
   0x0000000000000058 <+88>:	hlt	#0xf000

This patch fixes this problem by wrapping the code by ARM_RDI_MONITOR.
When semi-hosting is not used, set command line options to NULL.
2017-08-09 17:43:09 +02:00
Tamar Christina 61ddc7a436 Fix crt0 overwriting.
On AArch64 we currently always link in crt0 regardless of if another
one is being provided by something else, like rdimon.a. This was never
an issue before as nosys was not supported on AArch64.

This updates the specs to supply a different crt0 when a semihosting
call is required.

Signed-off-by: Tamar Christina <tamar.christina@arm.com>
2017-08-09 14:50:13 +02:00
Ken Brown d7821c045e Define sigsetjmp/siglongjmp only if __POSIX_VISIBLE 2017-08-07 16:07:46 +02:00
Sebastian Huber b0f271d1db Proper locking for getchar() and putchar()
Add internal inline functions _getchar_unlocked() and
_putchar_unlocked() if __CUSTOM_FILE_IO__ is not defined.  These
functions get _REENT only once.  Use them for getchar_unlocked() and
putchar_unlocked().  Define getchar() and putchar() to these unlocked
internal functions if __SINGLE_THREAD__ is defined, otherwise use the
external functions to use proper locking of the FILE object.

Assumes that __SINGLE_THREAD__ is not defined if __CYGWIN__ is defined.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-08-07 07:54:58 +02:00
Corinna Vinschen 65c13851b3 cygwin: pthread timed locks: actually timeout on timeout
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-03 23:14:21 +02:00
Corinna Vinschen f378384804 cygwin: pthread_rwlock_rdlock: don't set errno, just return error code
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-03 23:09:57 +02:00
Corinna Vinschen 8128f5482f cygwin: Implement pthread_rwlock_timedrdlock, pthread_rwlock_timedwrlock
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-03 21:31:38 +02:00
Corinna Vinschen eb206317a8 cygwin: Bump DLL version to 2.9.0
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-03 19:17:45 +02:00
Corinna Vinschen 37738448a0 cygwin: Implement pthread_mutex_timedlock
- pthread_mutex::lock now takes a PLARGE_INTEGER timeout pointer
  and uses that in the call to cygwait.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-03 19:13:21 +02:00
Corinna Vinschen 68217c3178 cygwin: simplify pthread timedwait handling
- Introduce inline helper pthread_convert_abstime.  It converts
  an absolute timespec to a Windows LARGE_INTEGER timestamp,
  depending on the used clock.

- Use this function from pthread_cond_timedwait and semaphore::timedwait

- Merge semaphore::_wait and semaphore::_timedwait into single _wait
  method, taking a LARGER_INTEGER timestamp.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-03 19:08:31 +02:00
Corinna Vinschen a346a26790 cygwin/signal.h: Remove SI_QUEUE unimplemented comment
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-03 14:56:24 +02:00
Corinna Vinschen f41d402bd4 Revert "cygwin/signal.h: Remove SI_QUEUE unimplemented comment"
This reverts commit 54ed68a781.
2017-08-03 14:55:21 +02:00
Corinna Vinschen 54ed68a781 cygwin/signal.h: Remove SI_QUEUE unimplemented comment
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-03 14:54:02 +02:00
Aditya Upadhyay a1c2491f70 Importing wcstoumax inttypes method from FreeBSD. 2017-08-02 13:02:26 +02:00
Aditya Upadhyay 88abc0958b Importing wcstoimax inttypes method from FreeBSD. 2017-08-02 13:02:26 +02:00
Aditya Upadhyay fd1981a7df Importing strtoumax inttypes method from FreeBSD. 2017-08-02 13:02:26 +02:00
Aditya Upadhyay 910cc30c10 Importing strtoimax inttypes method from FreeBSD. 2017-08-02 13:02:26 +02:00
Yaakov Selkowitz 109a3a02a3 cygwin: add explicit_bzero, elf.h changes to release
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-08-02 04:38:01 -05:00
Yaakov Selkowitz 4aaec3cb88 Add elf.h to newlib
This is copied from musl (MIT license).  This is newer and more thorough
than that of FreeBSD currently shipped only on Cygwin.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-08-02 01:18:55 -05:00
Yaakov Selkowitz 2c83bc950f cygwin: Export explicit_bzero
This was added to newlib together with timingsafe_*cmp but never exported.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-08-02 01:09:49 -05:00
Corinna Vinschen 60546ae529 cygwin: generate Alt-Numpad characters independent of NumLock state
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-08-01 14:10:50 +02:00