<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 1, 2014 at 12:45 AM, Chris Johns <span dir="ltr"><<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 29/03/2014 9:10 am, Hesham Moustafa wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
A few weeks ago I was able to build gcc linked with newlib for<br>
or1k-rtems* target. But, I had to<br>
do some work-arounds to get it working which I think I have to discuss<br>
it with you.<br>
<br>
First issue, is that when building gcc/newlib with --enable-threads<br>
option, I got a lot of errors<br>
which fade out when building with --disable-threads.<br>
folks at openrisc IRC channel told me that newlib (with threads) never<br>
been used.<br>
</blockquote>
<br></div>
We enable threads when building newlib so it looks like we need to clean this up.<div class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Another issue was about some errors raised by inconsistent definition of<br>
ssize_t type for<br>
or1k target. Gedare mentioned that ssize_t should be defined in the or1k<br>
target's source.<br>
I asked about where (in or1k source) to define ssize_t and or1k people<br>
told me it should<br>
be defined at RTEMS. To be able to get around this issue, I had to<br>
replace ssize_t at<br>
crt0.c with int in the related functions prototypes.<br>
</blockquote>
<br></div>
The tools need to define ssize_t. RTEMS uses the machine level parameters provided to it by the tools and selected switches. These know the specific configuration being built. I suspect this is done in newlib somewhere.<div class="">
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
For the same file (crt0.c) another compilation error is:<br>
  "error: expected ‘)’ before ‘*’ token RTEMS_STUB(int,<br>
sigfillset(sigset_t *set), { return -1; })"<br>
This macro is expanded to:<br>
"int (*(sigset_t *set) = ~(0), 0) { return -1; }"<br>
I had to comment this macro to pass this error.<br>
<br>
</blockquote>
<br></div>
I am not sure about this one. I need to take a closer look at the code and the patch.<div class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Finally, some compilation errors which are related to POSIX (like<br>
undeclared NAME_MAX)<br>
were avoided by re-declaring these macros at the file raising such errors.<br>
<br>
I can provide any further details or error messages if required. Please<br>
suggest solutions<br>
to get rid of these error in the right way. The patch for newlib that<br>
adds support for or1k and<br>
RTEMS against newlib-2.1.0 is there [1]<br>
</blockquote>
<br></div>
In the coming days I will take a look at the patch and port and see what is happening.<br>
<br></blockquote><div>Thanks. I am waiting your feedback. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Chris<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
<br>
[1]<br>
<a href="https://github.com/heshamelmatary/or1k-rtems/blob/master/patches/newlib-2.1.0-or1k-rtems.diff" target="_blank">https://github.com/<u></u>heshamelmatary/or1k-rtems/<u></u>blob/master/patches/newlib-2.<u></u>1.0-or1k-rtems.diff</a><br>

<br>
Regards,<br>
Hesham<br>
<br>
<br>
<br></div>
______________________________<u></u>_________________<br>
rtems-devel mailing list<br>
<a href="mailto:rtems-devel@rtems.org" target="_blank">rtems-devel@rtems.org</a><br>
<a href="http://www.rtems.org/mailman/listinfo/rtems-devel" target="_blank">http://www.rtems.org/mailman/<u></u>listinfo/rtems-devel</a><br>
<br>
</blockquote>
</blockquote></div><br></div></div>