This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [3.0 critical] Make fixproto deal with assert.h (bootstrap fails)


On 13-May-2001, Mark Mitchell <mark@codesourcery.com> wrote:
> >>>>> "Richard" == Richard Henderson <rth@redhat.com> writes:
> 
>     Richard> On Sat, May 12, 2001 at 06:20:04PM -0700, Mark Mitchell
>     Richard> wrote:
>     >> I think that would work, but it might be hard.  We migh prefer
>     >> to restore __eprintf.
> 
>     Richard> I suspect we'll have to do this.
> 
> I agree.
> 
> Zack, please add it back in.  With a comment explaining that we are
> stuck with it.  We don't have to make it part of the libgcc.so
> interface, but I thimk we need to leave it around in the static
> library at least.

Won't omitting it from libgcc.so still cause problems?

Maybe I'm missing something, but consider the following scenario:

	1. user installs gcc 3.0;
	2. user installs the binary distribution of the "foo" library
	   (libfoo.a), which was compiled with an earlier version of gcc;
	3. user runs `gcc myfile.c -lfoo'.

Won't the user get an error message about __eprintf undefined?

Unless I'm mistaken, the link error will occur because

	(a) the binary distribution of libfoo.a was built with an older
	    version of gcc, and hence uses the old GCC definition of assert(),
	    which references __eprintf();
	(b) gcc will by default search only libgcc.so, not libgcc.a; and
	(c) libgcc.so will not contain a definition of __eprintf().

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]