public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
From: Sebastian Huber <sh@sourceware.org>
To: newlib-cvs@sourceware.org
Subject: [newlib-cygwin] RTEMS: Add aligned_alloc() to crt0
Date: Wed, 08 Aug 2018 06:43:00 -0000	[thread overview]
Message-ID: <20180808064302.14317.qmail@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=dedeea99658ed476a1fdb06ed46576808c59d3b6

commit dedeea99658ed476a1fdb06ed46576808c59d3b6
Author: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date:   Wed Aug 8 08:36:13 2018 +0200

    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 <sebastian.huber@embedded-brains.de>

Diff:
---
 newlib/libc/sys/rtems/crt0.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/newlib/libc/sys/rtems/crt0.c b/newlib/libc/sys/rtems/crt0.c
index ff3e7e6..6ab4dcb 100644
--- a/newlib/libc/sys/rtems/crt0.c
+++ b/newlib/libc/sys/rtems/crt0.c
@@ -15,6 +15,7 @@
 #include <sys/uio.h>
 #include <reent.h>
 #include <signal.h>
+#include <stdlib.h>
 #include <time.h>
 #include <unistd.h>
 #include <machine/_arc4random.h>
@@ -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 <sys/lock.h> */
 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), { })


                 reply	other threads:[~2018-08-08  6:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180808064302.14317.qmail@sourceware.org \
    --to=sh@sourceware.org \
    --cc=newlib-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).