[posix] POSIX standard implementation for PSE51 (#5384)

* [posix] POSIX standard implementation for PSE51

- add some posix's interfaces that we haven't before.
- these PR have passed the interface definition test across gcc platfrom;
- have tested base on qemu-a9 and stm32h750-art-pi.

* [newlib] only enable POSIX.1-1990

* update projects
This commit is contained in:
Man, Jianting (Meco)
2021-12-17 02:34:17 -05:00
committed by GitHub
parent 417efc370f
commit 6369e89502
480 changed files with 25486 additions and 21117 deletions

View File

@@ -5,7 +5,6 @@ src = []
cwd = GetCurrentDir()
group = []
LIBS = ['m'] # link libm
CPPDEFINES = ['RT_USING_NEWLIB']
CPPPATH = [cwd]
if rtconfig.PLATFORM == 'gcc':
@@ -15,6 +14,9 @@ if rtconfig.PLATFORM == 'gcc':
else:
src += ['syscalls.c']
# identify this is Newlib, and only enable POSIX.1-1990
CPPDEFINES = ['RT_USING_NEWLIB', '_POSIX_C_SOURCE=1']
group = DefineGroup('libc', src, depend = [], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES, LIBS = LIBS)
Return('group')

View File

@@ -4,9 +4,4 @@
#include <rtconfig.h>
#define _CLOCKS_PER_SEC_ RT_TICK_PER_SECOND
#ifdef __SPU__
#include <sys/_timespec.h>
int nanosleep (const struct timespec *, struct timespec *);
#endif
#endif /* _MACHTIME_H_ */