This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: __eprintf problem in f77
- To: "Dave Love" <d dot love at dl dot ac dot uk>
- Subject: Re: __eprintf problem in f77
- From: "Andrew Zabolotny" <bit at freya dot etu dot ru>
- Date: Thu, 11 Dec 97 16:11:48 +0400
- Cc: "egcs at cygnus dot com" <egcs at cygnus dot com>
- Reply-To: egcs at cygnus dot com
On 10 Dec 1997 20:21:51 +0000, Dave Love wrote:
> Andrew> "undefined symbol __eprintf in fini.o"
> Andrew> cause:
> Andrew> gcc/assert.h defines assert() to call __eprintf when assertion fails.
> Andrew> fini.c includes some .h file which in turn includes assert.h.
> Andrew> __eprintf is not present in default libraries when using cc
>I'm not sure what exactly this comes from. Do you mean you're
>building f771 not with gcc?
Of course not. I'm building f771 in the whole egcs context.
Let me describe the problem more detailed:
When I run make in egcs/gcc subdirectory it compiles almost everything
with egcs/gcc being the current
directory. Since one of GCC options is -I. it will catch "assert.h" from
current directory, which will define
assert() to call __eprintf on failure. The system header file assert.h
defines assert in a different way, and the
system libraries doesn't contain __eprintf (although __eprintf is
contained in libgcc). However, egcs/gcc/f/fini.c is compiled/linked with
the _system_ compiler, which doesn't know where from to take __eprintf. So
fini.c compilation fails. (this is the only thing that fails diring
compilation -- other programs either doesn't use __eprintf,
or provide a __eprintf themself). So to resolve this problem it is needed
to define __eprintf inside f/fini.c
Greetings,
_\ndy@teamOS/2