<div dir="ltr"><div>I posted patches to add the aarch64-rtems target.</div><div><br></div><div>binutils: <a href="https://sourceware.org/ml/binutils/2016-02/msg00404.html">https://sourceware.org/ml/binutils/2016-02/msg00404.html</a><br></div><div>gcc:      <a href="https://gcc.gnu.org/ml/gcc-patches/2016-02/msg01754.html">https://gcc.gnu.org/ml/gcc-patches/2016-02/msg01754.html</a></div><div><br></div><div>FWIW I also cleaned up the x86_64-rtems target addition patches and</div><div>those were submitted also.</div><div><br></div><div>BINUTILS: <a href="https://sourceware.org/ml/binutils/2016-02/msg00403.html">https://sourceware.org/ml/binutils/2016-02/msg00403.html</a></div><div>GCC: <a href="https://gcc.gnu.org/ml/gcc-patches/2016-02/msg01752.html">https://gcc.gnu.org/ml/gcc-patches/2016-02/msg01752.html</a><br></div><div><br></div><div>Chris.. Assuming these are in the upstream repositories in the next</div><div>couple of days, how should we address getting these targets in the RSB? Tarball<br></div><div>plus patch or just reference git until the next release? </div><div><br></div><div>--joel</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 25, 2016 at 1:34 PM, Joel Sherrill <span dir="ltr"><<a href="mailto:joel@rtems.org" target="_blank">joel@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 dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Wed, Feb 24, 2016 at 10:03 PM, 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"><span>On 25/02/2016 14:29, Raghav Nayak wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I am using RSB 4.12 it picks “gcc-6-20160124” which is already<br>
supporting aarch64. Do you see still I have to try building gcc by hand?<br>
<br>
Till now couldn’t understand the meaning of this error<br>
<br>
"configure: error: GAS does not know what format to use for target<br>
aarch64-unknown-rtems4.12"<br>
<br>
</blockquote>
<br></span>
You need to teach each component in the build set of tools about the aarch64 arch. It is best to do this by hand and once you have the patches we can come back to the RSB. To quote the second paragraph of the RSB manual (<a href="https://docs.rtems.org/rsb/" rel="noreferrer" target="_blank">https://docs.rtems.org/rsb/</a>):<br>
<br>
 "The RTEMS Source Builder attempts to support any<br>
  host environment that runs Python and you can build<br>
  the package on. It is not some sort of magic that can<br>
  take any piece of source code and make it build. Someone<br>
  at some point in time has figured out how to build that<br>
  package from source and taught this tool."<br>
<br>
The parts you need to change are binutils, newlib (I think) and gcc.<br>
<br>
For binutils I did:<br>
<br>
 $ tar jxf binutils-2.26.tar.bz2<br>
 $ mkdir aarch64<br>
 $ cd aarch64<br>
 $ ../binutils-2.26/configure --target=aarch64-rtems4.12<br>
 $ make<br>
<br>
and I got this error:<br>
<br>
*** BFD does not support target aarch64-unknown-rtems4.12.<br>
*** Look in bfd/config.bfd for supported targets.<br>
*** Error code 1<br>
<br>
Once binutils builds create a patch. You will also need a patch for the git version of binutils which you can post to the binutils list (you may need to submit FSF paper work for this).<br>
<br></blockquote></div></div><div>I am picking at this now. I have a patch for binutils/gdb git and am working on gcc.</div><div>Since you have to have FSF paperwork on file to submit the changes, it is simpler</div><div>for an existing contributor to do it. But I am building by hand to get the modifications</div><div>ready to be submitted upstream.</div><div><br></div><div>Also after some email with the ARM GCC maintainer, I have learned that we haven't</div><div>asked enough questions. ARMv8 support can mean two things:</div><div><br></div><div>+ new instruction variations in 32-bit mode (arm toolchain with new library variants)</div><div>+ 64-bit mode (aarch64 toolchain)</div><div><br></div><div>I am assuming you are more interested in the latter.</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The aarch64 binutils tools will allow you to build gcc. The RSB builds gcc using a single source tree so when you are ready I can help you create a suitable source tree by hand. You can then start the process of teaching gcc's ARMv8 support about RTEMS.<br>
<br>
Once you have the patches posted to the various upstream projects, eg binutils, newlib and gcc, we can accept patches for the specific versions of binutils and gcc the RSB supports for 4.12. We currently place these in the RTEMS Tools repo (<a href="https://git.rtems.org/rtems-tools/tree/tools/4.12" rel="noreferrer" target="_blank">https://git.rtems.org/rtems-tools/tree/tools/4.12</a>). We can then create a suitable bset config file with the source packages and patches to build an AArch64 set of tools.<br>
<br></blockquote></span><div>The newlib master is broken at the moment so I can't build gcc/newlib. Once that is resolved,</div><div>I hope things will work and I can post patches.</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Many thanks for doing this.<span><font color="#888888"><br>
<br></font></span></blockquote></span><div>It would be nice to have the aarch64 supported. </div><div><br></div><div>-joel</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><font color="#888888">
Chris<br>
</font></span></blockquote></div><br></div></div>
</blockquote></div><br></div>