Exceptions workaround for older systems that don't USE_COLLECT2

Melissa O'Neill oneill@cs.sfu.ca
Tue Sep 15 20:44:00 GMT 1998


A week or so ago, Jeff wrote:
> I've enabled collect2 for the m68k nextstep port [... and] for the
> x86.  gcc doesn't support NeXT on the PA or SPARC.

I built egcs 1.1 last night with the above change made (i.e. configure's
nextstep `use_collect2' line changed from `no' to `yes'), and the results
were disappointing. While egcs builds okay, C++ is nonfunctional.

The final link stage of any C++ program fails with:

/bin/ld: Undefined symbols:
___main
collect2: ld returned 1 exit status

It's also possible that there's more to enabling collect2 to just adding
the `use_collect2=yes' line in ./configure, although (from looking at
the mainline sources) that does look to be all that Jeff did. I'm guessing
we need some crt stuff of some kind here. Opinions would be welcome.

    Melissa.



More information about the Gcc mailing list