GSOC:disable newlibc reentrancy

阎淼 yanmiaobest at gmail.com
Thu May 8 07:26:00 UTC 2008


2008/5/8, Ralf Corsepius <ralf.corsepius at rtems.org>:
>
> On Thu, 2008-05-08 at 14:54 +0800, 阎淼 wrote:
> > Hi,
> >
> > I am trying to disable newlibc.c reentrant support.
> Why do you want to do this?

That is one of the size reduction ideas of tiny rtems project.

>
> >  And Our goal is to
> > defer as many things as possible to link time. To that end, newlibc.c
> > should be splitted. bsp_libc_init(in bsppost.c) calls libc_init, which
> > is defined in newlibc.c(in libcsupport directory). There are also some
> > libc reentrant hooks defined in newlibc.c plus the libc_global_reent
> > variable. So I create a new file newlibc_init.c in
> > cpukit/libcsupport/src(of course need to modify the Makefile), which
> > has only one function(libc_init, copied from newlibc.c), and a
> > variable definition(libc_global_reent copied from newlibc.c), and I
> > also move the definition of RTEMS_NEWLIB_EXTENSION  to confdefs.h,
> > wrapped by CONFIGURE_DISABLE_NEWLIB_REENTRANCY macro. If you do not
> > want newlibc reentrancy support, you define macro
> > CONFIGURE_DISABLE_NWELIB_REENTRANCY in your application configuration
> > file as before, and libc reentrant hooks will no be linked; If you
> > need newlibc reentrancy code, you do nothing.  Is that OK?
>
> Not to me ... you don't really want to know my opinion on this proposal.
>
> Ralf
>
>
>


More information about the users mailing list