disable newlib

Ralf Corsepius ralf.corsepius at rtems.org
Mon Aug 18 15:02:01 UTC 2008


On Mon, 2008-08-18 at 15:57 +0100, Manuel Coutinho wrote:
> Hi
> 
> We are trying to make possible a configuration (using the configure script)
> where RTEMS does not have newlib (open, close, malloc, etc) and other things
> so that a minimal footprint can be achieved.
> 
> At this stage, we are just checking how much effort is required to perform
> this. I would suggest to place #ifdef inside the RTEMS source code so that
> the unnecessary calls are not made. However, there is more work needed here.
> 
> I've tried to take out most of the calls to libc and other things that we
> don't need from the RTEMS source code (e.g rtems_termios_init, etc) and the
> footprint has been reduced from ~70 KiB to ~37KiB, but we need to go further
> and remove all dead code. Since RTEMS itself makes calls to newlib or libc,
> if the application does not make the extra calls it is not sufficient
> because the code will still be present.
What you are missing: GCC emits calls to newlib.

> Now, we stumbled with the newlib source code that is very intertwined with
> RTEMS (mainly to make malloc reentrant, from what I can tell). This will
> need some detailed research to make sure everything works well.
Good luck - To me your plan is nothing but silly.





More information about the users mailing list