<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">On 3/18/2014 1:07 PM, Hesham Moustafa
wrote:<br>
</div>
<blockquote
cite="mid:CA+wsVCC55KBGO+mAOzbNoE96R+LmpTMTM93nBGx5BVUzWRVXAA@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<div dir="ltr">Hi,
<div><br>
</div>
<div>I am working on modifying or1k newlib port to be built for
RTEMS. Building and installing</div>
<div>newlib with --target=or1k-elf is done successfully,
however, when I try to build newlib</div>
<div>with --target=or1k-rtems4.11 I got conflict error.</div>
<div><br>
</div>
<div>part of this error is </div>
<div>"sys/rtems/crt0.c:72:22: error: conflicting types for
‘read’"</div>
<div><br>
</div>
</div>
</blockquote>
Hmmm... how old is there newlib? <br>
<br>
What's the prototype for read() versus unistd.h (or whereever it
turns out to<br>
be prototyped)?<br>
<br>
It may also be possible that the or1k port doesn't have the
underlying type<br>
definitions complete or correct.<br>
<br>
<a class="moz-txt-link-freetext" href="http://pubs.opengroup.org/onlinepubs/009695399/functions/read.html">http://pubs.opengroup.org/onlinepubs/009695399/functions/read.html</a> <br>
<br>
isn't the latest but read() requires ssize_t and size_t to be
correctly and<br>
consistently defined for a target.<br>
<br>
You may end up having to reproduce the compile of crt0.c by hand and<br>
change the -c to a -E .. changing the output file.. and see what
really<br>
is being preprocessed<br>
<blockquote
cite="mid:CA+wsVCC55KBGO+mAOzbNoE96R+LmpTMTM93nBGx5BVUzWRVXAA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>or1k/newlib port implements some stuff at libgloss
(including or1k/crt0.S)</div>
<div><br>
</div>
</div>
</blockquote>
rtems uses nothing in libgloss.<br>
<blockquote
cite="mid:CA+wsVCC55KBGO+mAOzbNoE96R+LmpTMTM93nBGx5BVUzWRVXAA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>I just use --target=or1k-xxx --prefix=xxx as configuration
options for newlib.</div>
<div><br>
</div>
</div>
</blockquote>
The RTEMS builds take more. Check rtems-source-builder. Also if you
are<br>
not building or1k-rtems tools including binutils and gcc+newlib
together<br>
at the same time, it may be causing issues. <br>
<blockquote
cite="mid:CA+wsVCC55KBGO+mAOzbNoE96R+LmpTMTM93nBGx5BVUzWRVXAA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>Thanks,</div>
<div>Hesham</div>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Joel Sherrill, Ph.D. Director of Research & Development
<a class="moz-txt-link-abbreviated" href="mailto:joel.sherrill@OARcorp.com">joel.sherrill@OARcorp.com</a> On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985</pre>
</body>
</html>