This is a bug in your gcc port. You need to ensure that __rtems__ is defined.
See https://github.com/heshamelmatary/or1k-rtems/blob/master/patches/gcc-4.8.2-or1k-rtems.diff around 220 and compare it to http://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/config/arm/rtems-eabi.h;h=4bdcf0d87ba68940f338f4de3b41b9bd7a47260f;hb=HEAD That defines __rtems__. Without that, the .h files in newlib don't get the right settings. ________________________________________ From: [email protected] [[email protected]] On Behalf Of Joel Sherrill [[email protected]] Sent: Sunday, April 27, 2014 7:17 PM To: Hesham Moustafa Cc: [email protected] Subject: Re: Possible bug at newlib/libc/rtems/sys/crt0.c sigfillset On Apr 27, 2014 6:40 PM, Joel Sherrill <[email protected]> wrote: > > > On Apr 27, 2014 5:12 PM, Hesham Moustafa <[email protected]> wrote: > > > > Hi all, > > > > When I am trying to get newlib compiled while porting newlib to > > rtems/or1k, I met an error that confused me. The error happens for me > > with both: Ubuntu and Fedora. Also it arises when configuring and > > building a standalone newlib library (with configure > > --target=or1k-rtems4.11) or when building gcc with newlib (for the > > same target). By commenting that line, newlib and gcc building process > > works fine. > > > > The error is: > > > > "../../../../../../../gcc-4.8.2-or1k-rtems/newlib/libc/sys/rtems/crt0.c:74:37: > > error: expected ‘)’ before ‘*’ token > > RTEMS_STUB(int, sigfillset(sigset_t *set), { return -1; })" > > > > By expanding the macros with -E option, I got the following expansion > > for the corresponding function: > > > > int rtems_stub_sigfillset(sigset_t *set) { return -1; }; int > > (*(sigset_t *set) = ~(0), 0) { return -1; } > > > > Does that make sense? > > > > I searched for anyone that happened to have the same problem and I > > found this link [1] related to compiling rtems/newlib for microblaze > > This is a new architecture for RTEMS+newlib combination. I recall that there > is a configure script near the top of newlib and it needs an entry for thus > target. Or a pattern needs adjusting to distinguish or1k*-*-* from the RTEMS > variant. This can also be because the path through signal.h is skipping something based on or1k. What source are you using as base to modify? I need to clone all your source and try it myself. > > [1] http://sourceware.org/ml/newlib/2012/msg00529.html > > > > Regards, > > Hesham > > > > _______________________________________________ > > rtems-devel mailing list > > [email protected] > > http://www.rtems.org/mailman/listinfo/rtems-devel _______________________________________________ rtems-devel mailing list [email protected] http://www.rtems.org/mailman/listinfo/rtems-devel
