This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: EH bug in Makefile.in
> > I believe that the problem on linux is that you need a recent gas snapshot;
> > 2.8.1 fills a .align in .eh_frame with NOPs instead of zeroes.
> >
>
> No. The bug is in gcc/Makefile.in. egcs-971023 turns off exceptions
> in C. But _eh.o in libgcc2.a has to be compiled with exceptions
> on. I added -fexceptions to LIBGCC2_CFLAGS in gcc/Makefile.in.
That seemed to pretty fix it for OpenServer. Though I haven't
tamed runtest yet, the following script (which crashed gloriously
withouth this fix) pretty much works now for both COFF (sjlj) and
ELF (dwarf2). eh/*.C is copied straight from
../*23/gcc/testsuite/g++*/*/*eh*.
for i in eh/*.C
do
for f in -melf -mcoff
do
grep -i "don't link" $i > /dev/null && continue
./negcs $i && ./a.out || echo $f $i failed.
done
done
(robertl) rjlhome:/play/testgcc
$ sh *.sh
Undefined first referenced
symbol in file
endl(ostream &) /usr/tmp/cca004i31.o
ostream::operator<<(ostream &(*)(ostream &))/usr/tmp/cca004i31.o
ostream::operator<<(int) /usr/tmp/cca004i31.o
cout /usr/tmp/cca004i31.o
ostream::operator<<(char const *) /usr/tmp/cca004i31.o
a.out: fatal error: Symbol referencing errors. No output written to a.out
collect2: ld returned 1 exit status
-melf eh/eh2.C failed.
Undefined first referenced
symbol in file
endl(ostream &) /usr/tmp/cca004iA1.o
ostream::operator<<(ostream &(*)(ostream &))/usr/tmp/cca004iA1.o
ostream::operator<<(int) /usr/tmp/cca004iA1.o
cout /usr/tmp/cca004iA1.o
ostream::operator<<(char const *) /usr/tmp/cca004iA1.o
a.out: fatal error: Symbol referencing errors. No output written to a.out
collect2: ld returned 1 exit status
-mcoff eh/eh2.C failed.
eh/eh54.C: In function `int main()':
eh/eh54.C:3: parse error before `}'
eh/eh54.C:3: warning: didn't find handler for EH region 3
eh/eh54.C:3: warning: region exists, no handler 3
eh/eh54.C:3: warning: region exists, no handler 3
eh/eh54.C:3: warning: region exists, no handler 3
eh/eh54.C:3: warning: region exists, no handler 3
-melf eh/eh54.C failed.
eh/eh54.C: In function `int main()':
eh/eh54.C:3: parse error before `}'
eh/eh54.C:3: warning: didn't find handler for EH region 3
eh/eh54.C:3: warning: region exists, no handler 3
eh/eh54.C:3: warning: region exists, no handler 3
eh/eh54.C:3: warning: region exists, no handler 3
eh/eh54.C:3: warning: region exists, no handler 3
-mcoff eh/eh54.C failed.
Unwind works!
Unwind works!