Question regarding newlib/libgloss

Joel Sherrill joel at rtems.org
Mon Oct 14 12:43:12 UTC 2019


On Mon, Oct 14, 2019, 7:14 AM Andrei Zisu <Andrei.Zisu at pts.space> wrote:

> Hello everyone,
>
>
> I am currently learning about how RSB builds the toolchain.
>
>
> 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.
>
>
> 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.
>
>
> 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.
>

And with some luck, I'm still here. :)

>
> 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?
>

Libgloss provides the crt0, linker script, and system calls required for
newlib to target a board.

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.

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.

>
> What would the drawbacks of enabling it be? It seems to me that enabling
> it would not interfere since it is opt-in?
>

If you extract the setup, configure and make commands, you will be safe to
use those to build the bare metal target.

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.

FWIW I have some scripts based on the rsb commands from a few years ago. I
use them to compare results and investigate bugs.

>
> Best regards,
>
>
> Andrei Zisu
>
> ------------------------------
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20191014/eb68887b/attachment.html>


More information about the devel mailing list