<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Oct 14, 2019, 10:30 AM Andrei Zisu <Andrei.Zisu@pts.space> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="auto">
<br>
<br>
<div dir="ltr">Sent from my iPhone</div>
<div dir="ltr"><br>
<blockquote type="cite">On 14 Oct 2019, at 14:43, Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank" rel="noreferrer">joel@rtems.org</a>> wrote:<br>
<br>
</blockquote>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="auto">
<div><br>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Oct 14, 2019, 7:14 AM Andrei Zisu <Andrei.Zisu@pts.space> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div id="m_3008118840253695950m_-6165816543512268504divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<p></p>
<div>
<p>Hello everyone, <br>
</p>
<p><br>
</p>
<p>I am currently learning about how RSB builds the toolchain. <br>
</p>
<p><br>
</p>
<p>Although this isn't my question to the list, for context, I am looking at to reusing the rtems toolchain for other non-rtems-based targets we have.</p>
<p><br>
</p>
<p>Looking at it, there's not a lot of difference to an arm-none-eabi compiler. However, it appears that libgloss is entirely disabled for rtems toolchains in the newlib configuration.<br>
</p>
<p><br>
</p>
<p>Looking through the history of newlib, I was able to trace the origin of this disabling to a change from 1996 by Joel Sherill which simply enables rtems toolchains.</p>
</div>
</div>
</div>
</blockquote>
</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">And with some luck, I'm still here. :)</div>
</div>
</div>
</blockquote>
<div><br>
</div>
Yes, fan of the work.<br></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Thanks.</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">
<blockquote type="cite">
<div dir="ltr">
<div dir="auto">
<div dir="auto">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div id="m_3008118840253695950m_-6165816543512268504divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<div>
<p><br>
</p>
<p>Therefore, I was wondering what is the reasoning behind disabling this, or is it simply a change carried over from other targets which disabled it?<br>
</p>
</div>
</div>
</div>
</blockquote>
</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">Libgloss provides the crt0, linker script, and system calls required for newlib to target a board.</div>
<div dir="auto"><br>
</div>
<div dir="auto">The crt0 and linker script plus device drivers to support functionality beyond what libgloss targets are capable of is in an RTEMS BSP. The system calls are implemented primarily in libcsupport and support mounting, various file systems, network
stack, etc. </div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>However, I see that the toolchain is not built with --disable-newlib-supplied-syscalls. How does it avoid getting the syscalls? Through bsp_specs?</div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Answering from a phone but there should be a configure file setting which is forced and does the same thing. Maybe configure.host. The RTEMS port predates many of the configure options.</div><div dir="auto"><br></div><div dir="auto"> </div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">
<br>
<blockquote type="cite">
<div dir="ltr">
<div dir="auto">
<div dir="auto"><br>
</div>
<div dir="auto">The RTEMS tool chain configuration is deliberately close to the bare metal one. It limits the chance of breaking something but it does change at least the locking and reentrancy support over the bare metal configuration.</div>
</div>
</div>
</blockquote>
<blockquote type="cite">
<div dir="ltr">
<div dir="auto">
<div dir="auto">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div id="m_3008118840253695950m_-6165816543512268504divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<div>
<p></p>
<p><br>
</p>
<p>What would the drawbacks of enabling it be? It seems to me that enabling it would not interfere since it is opt-in?</p>
</div>
</div>
</div>
</blockquote>
</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">If you extract the setup, configure and make commands, you will be safe to use those to build the bare metal target.</div>
<div dir="auto"><br>
</div>
<div dir="auto">You can probably make libgloss targets work with an RTEMS tool chain but no one has ever invested the effort. It might be interesting for use building bootloader and support code that doesn't use RTEMS.</div>
</div>
</div>
</blockquote>
<div><br>
</div>
To be fair, I see now that my targets don't actually depend on what libgloss has to offer (custom startup script and newlib syscalls). I was mistaken about this because I was looking for the origin of nano.specs and the nano libraries.
<div><br>
</div>
<div>But looking at, for example, the way the AUR newlib toolchain is built [1], it seems that these are actually to different builds of newlib.</div>
<div><br>
</div>
<div>I am currently considering taking this approach for building the toolchain on top of the default rtems toolchain. Would this sort of work be of any interest to the community?</div>
<div><br>
</div>
<div>Yes, for example, the bootloader would be one of the targets.<br></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">I can see this as being useful if it is a general pattern across all the targets. But you would have a lot of functionality enabled which doesn't work in bare metal mode. No big deal if you avoid it </div><div dir="auto"><br></div><div dir="auto">Also the crt0.c provided by default with RTEMS tool builds is intended to make autoconf probes happy. It isn't functional.</div><div dir="auto"><br></div><div dir="auto">I expect it is just a matter of passing the right arguments and avoiding using the things what you can't work without RTEMS. </div><div dir="auto"><br></div><div dir="auto">--joel</div><div dir="auto"><br></div><div dir="auto"> </div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>
<div><br>
<div>
<blockquote type="cite">
<div dir="ltr">
<div dir="auto">
<div dir="auto"><br>
</div>
<div dir="auto">FWIW I have some scripts based on the rsb commands from a few years ago. I use them to compare results and investigate bugs.</div>
<div dir="auto">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div id="m_3008118840253695950m_-6165816543512268504divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<div>
<p><br>
</p>
<p>Best regards,</p>
<p><br>
</p>
Andrei Zisu</div>
<br>
<span>
<div></div>
</span>
<hr>
<br>
<p></p>
</div>
</div>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" rel="noreferrer noreferrer" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer noreferrer noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a></blockquote>
</div>
</div>
</div>
</div>
</blockquote>
<br>
</div>
</div>
</div>
<div>[1] <a href="https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/arm-none-eabi-newlib" target="_blank" rel="noreferrer">https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/arm-none-eabi-newlib</a></div>
</div>
</blockquote></div></div></div>