mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
2b2506c052
Before the build system used something like echo "int main(){} void _exit(int n) {(void)n;while(1);}" | LC_ALL=C $(LINK) -xc - -o /dev/null -lc -Wall -Wextra -pedantic <FLAGS_TO_TEST> to check for flags supported by the compiler (used as linker frontend). This however no longer works with newlib 4.3.0, which requires the symbols `_sbrk_r`, `_close_r`, `_lseek_r`, `_read_r`, and `_write_r` to be present. Instead, now a new file `minimal_linkable.c` was added that adds all the missing symbols and is used in the linker feature tests instead.
56 lines
741 B
C
56 lines
741 B
C
#include <reent.h>
|
|
|
|
int main(void)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
void _exit(int n)
|
|
{
|
|
(void)n;
|
|
while(1);
|
|
}
|
|
|
|
void *_sbrk_r(struct _reent *r, ptrdiff_t incr)
|
|
{
|
|
(void)r;
|
|
(void)incr;
|
|
return NULL;
|
|
}
|
|
|
|
int _close_r(struct _reent *r, int fd)
|
|
{
|
|
(void)r;
|
|
(void)fd;
|
|
return 0;
|
|
}
|
|
|
|
_off_t _lseek_r(struct _reent *r, int fd, _off_t off, int whence)
|
|
{
|
|
(void)r;
|
|
(void)fd;
|
|
(void)off;
|
|
(void)whence;
|
|
return 0;
|
|
}
|
|
|
|
_ssize_t _read_r(struct _reent *r, int fd, void *buffer, size_t count)
|
|
{
|
|
(void)r;
|
|
(void)fd;
|
|
(void)buffer;
|
|
(void)count;
|
|
|
|
return 0;
|
|
}
|
|
|
|
_ssize_t _write_r(struct _reent *r, int fd, const void *data, size_t count)
|
|
{
|
|
(void)r;
|
|
(void)fd;
|
|
(void)data;
|
|
(void)count;
|
|
|
|
return 0;
|
|
}
|