GSOC:disable newlibc reentrancy
阎淼
yanmiaobest at gmail.com
Thu May 8 06:54:26 UTC 2008
Hi,
I am trying to disable newlibc.c reentrant support. 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?
More information about the users
mailing list