Commit Graph

17849 Commits

Author SHA1 Message Date
Giacomo Tesio 31d2a8df16 jehanne: define SIGRTMIN and SIGRTMAX 2017-09-13 00:17:01 +02:00
Giacomo Tesio db0b84d2e2 jehanne: add sigprocmask 2017-09-12 00:49:17 +02:00
Giacomo Tesio 7ce34f8fbf jehanne: implement various sigset functions 2017-09-12 00:27:45 +02:00
Giacomo Tesio 861774c0c8 jehanne: drafter sys/signal.h 2017-09-11 00:35:32 +02:00
Giacomo Tesio 7f5b6a5ef1 jehanne: add sigaction (in libposix_conf.c)
This implementation ignores both flags and mask:
- ignoring SA_SIGINFO in sa_flags means that sigaction forward to the signal machinery
- ignoring sa_mask means that no mask is set for the signal (but note that Jehanne's notes
  are not reentrant).
2017-09-10 23:42:01 +02:00
Giacomo Tesio cb02879013 jehanne: add getpgid 2017-09-07 23:34:29 +02:00
Giacomo Tesio 8194f38dc0 jehanne: add rename 2017-09-07 23:32:26 +02:00
Giacomo Tesio 7f64bcd6ac jehanne: let libposix define environ 2017-09-07 22:35:51 +02:00
Giacomo Tesio 775d703f25 jehanne: define _execve (directly used by libc/posix/execve.c) 2017-09-07 19:45:47 +02:00
Giacomo Tesio 4651a34e15 jehanne: add getpgrp 2017-09-07 00:45:20 +02:00
Giacomo Tesio dc3e8f850e jehanne: add chmod and fchmodat 2017-09-06 22:57:34 +02:00
Giacomo Tesio 656e79e567 jehanne: add umask 2017-09-06 22:57:00 +02:00
Giacomo Tesio 2c43a16b92 jehanne: add sys/termios.h 2017-09-06 00:37:03 +02:00
Giacomo Tesio 3cf88753d0 jehanne: added sys/ioctl.h (still to be implemented) 2017-09-05 23:57:41 +02:00
Giacomo Tesio c238125c93 jehanne: add get/set functions for uid, gid, euid, egid, pgid, sid, reuid... 2017-09-05 00:42:26 +02:00
Giacomo Tesio 9e4ae4bc97 jehanne: add readlink and readlinkat 2017-09-03 23:56:10 +02:00
Giacomo Tesio 7928dac6c6 jehanne: add setjmp.h 2017-09-03 22:27:44 +02:00
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