This is the mail archive of the egcs@egcs.cygnus.com mailing list for the EGCS project. See the EGCS home page for more information.
In message <199902271926.LAA06582@atrus.synopsys.com>you write:
[ ... ]
> Note that Red Hat 4.2 has libc 5.3.12 plus many Red Hat patches,
> not libc 5.4.x. Is it possible that the bug HJ is referring to
> only shows up on libc 5.4.x systems?
Yes. libc 5.3.xx doesn't have IO_putc in libc.a and thus does not trigger
the problem.
libc 5.4.xx does have IO_putc in libc.a:
[law@ralph /usr/lib] nm libc.a | grep IO_put
00000000 T _IO_puts
00000000 T _IO_putc
> (If so, do we have anyone on egcs who has such a system who can try
> the test?).
I've got RH4.2 up on my scratch disk and I just installed a libc5.4.xx
distribution, so I can cover testing.
Given the testcase referenced by my earlier message:
#include <iostream.h>
#include <streambuf.h>
istream x;
extern "C" int putc(), fgets();
main () {
x.get();
putc();
fgets();
x.gets(0, 0);
}
I've been able to reproduce the problem:
g++ -static foo.C
/usr/lib/libc.a(putc.o): In function `_IO_putc':
putc.o(.text+0x0): multiple definition of `_IO_putc'
/usr/egcs/lib/libstdc++.a(ioputc.o):/puke/law/egcs-1.1/libio/ioputc.c:28: first defined here
/usr/bin/ld: Warning: size of symbol `_IO_putc' changed from 51 to 50 in putc.o
collect2: ld returned 1 exit status
It's very late. I'm going to bed now. I'll try to look at the patch tomorrow.
jeff