Exceptions workaround for older systems that don't USE_COLLECT2
Jeffrey A Law
law@cygnus.com
Tue Sep 15 20:44:00 GMT 1998
In message < 199809152302.QAA17855@aldrington.ppp.cs.sfu.ca >you write:
> 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.
__main should be in libgcc.a. What symbols appear in libgcc.a::_main.o?
jeff
More information about the Gcc
mailing list