SYS funcs and GCC12 fixes (#1186)

* SYS functions and GCC 12 fixes

* Add implementation of _gettimeofday and settimeofday, _times
* Remove some GCC warnings about unimplemented SYS functions (e.g. _open) by making weak implementations that return errors.
* Removed _exit from crt0.S since we have a weak version in runtime.c and we don't want two weak impls since the linker can't pick. If the user omits runtime.c then they'll need to provide _exit or get the error
* Add sys/time.h to arch/cc.h for lwIP as it seems under GCC12 this is not getting included
This commit is contained in:
Graham Sanderson
2023-01-24 09:00:26 -06:00
committed by GitHub
parent a66ba7a942
commit 177b0303dd
5 changed files with 70 additions and 9 deletions

View File

@ -32,6 +32,8 @@
#ifndef __CC_H__
#define __CC_H__
#include <sys/time.h>
#if NO_SYS
// todo really we should just not allow SYS_LIGHTWEIGHT_PROT for nosys mode (it doesn't do anything anyway)
typedef int sys_prot_t;