From: Sebastian Huber Date: Wed, 8 Aug 2018 06:36:13 +0000 (+0200) Subject: RTEMS: Add aligned_alloc() to crt0 X-Git-Tag: cygwin-2_11_0-release~93 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=dedeea99658ed476a1fdb06ed46576808c59d3b6;p=newlib-cygwin.git RTEMS: Add aligned_alloc() to crt0 This is necessary to build the latest GCC 7 branch. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85904 Signed-off-by: Sebastian Huber --- diff --git a/newlib/libc/sys/rtems/crt0.c b/newlib/libc/sys/rtems/crt0.c index ff3e7e6a3..6ab4dcb4b 100644 --- a/newlib/libc/sys/rtems/crt0.c +++ b/newlib/libc/sys/rtems/crt0.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -32,6 +33,7 @@ RTEMS_STUB(void *,realloc(void* p, size_t s), { return 0; }) RTEMS_STUB(void, free(void* ptr), { }) RTEMS_STUB(void *, calloc(size_t s1, size_t s2), { return 0; }) RTEMS_STUB(int, posix_memalign(void **p, size_t si, size_t s2), { return -1; }) +RTEMS_STUB(void *, aligned_alloc(size_t s1, size_t s2), { return 0; }) /* Stubs for routines from RTEMS */ RTEMS_STUB(void, _Mutex_Acquire(struct _Mutex_Control *p), { }) @@ -189,7 +191,7 @@ RTEMS_STUB(int, issetugid (void), { return 0; }) RTEMS_STUB(void *, _realloc_r(struct _reent *r, void *p, size_t s), { return 0; }) RTEMS_STUB(void *, _calloc_r(struct _reent *r, size_t s1, size_t s2), { return 0; }) RTEMS_STUB(void *, _malloc_r(struct _reent * r, size_t s), { return 0; }) -RTEMS_STUB(void, _free_r(struct _reent *r, void **p), { }) +RTEMS_STUB(void, _free_r(struct _reent *r, void *p), { }) /* stubs for functions required by libc/stdlib */ RTEMS_STUB(void, __assert_func(const char *file, int line, const char *failedexpr), { })