This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Re: Reentrant vs non-reentrant stubs
- From: "J. Johnston" <jjohnstn at redhat dot com>
- To: Doug Broadwell <dougb at value dot net>
- Cc: Newlib Mail List <newlib at sources dot redhat dot com>
- Date: Thu, 03 Oct 2002 15:26:43 -0400
- Subject: Re: Reentrant vs non-reentrant stubs
- Organization: Red Hat Inc.
- References: <000901c26b06$30105df0$3cfea8c0@dba03>
Doug Broadwell wrote:
>
> Making cross-environment for m68k-unknown-coff on i686-pc-linux-gnu.
>
> The documentation in reent.h states that to use reentrant stubs (e.g.,
> _open_r() ), make the following changes in configure.in (it doesn't state
> which configure.in to change):
>
> set syscall_dir to syscalls
> add -DREENTRANT_SYSCALLS_PROVIDED to target_cflags
>
> To use non-reentrant stubs of the form, e.g., _open():
>
> set syscalls_dir to syscalls
>
> To use non-reentrant stubs of the form, e.g., open():
>
> add -DMISSING_SYSCALL_NAMES to target_cflags
>
> My problems are: Which configure.in? "target_cflags" doesn't exist in any
> configure.in, the closest thing is "CFLAGS", what to do? What is the
> default configuration "out of the box"?
>
> Another problem, if I make a new install/build of newlib it makes fine. If
> I immediately do a "make all install" or a "make clean all install", it
> error's out on the "__extension__ long long ..." statement in reent.h I've
> tried this under both a 2.95.3 gcc and 3.2 gcc. ???
>
> Thanks, Doug
Doug,
The documentation in the header file is out of date. It should actually be
referring to configure.host (top-level newlib directory). Instead of target_cflags,
it should refer to newlib_cflags (also found in configure.host). I will be posting a patch shortly.
Regarding your error when rebuilding, can you provide more details please.
-- Jeff J.