collect2 compiles C with g77 !

Jeffrey A Law law@cygnus.com
Tue Nov 25 19:56:00 GMT 1997


  In message < 199711110151.CAA04239@mail.macqel.be >you write:
  > On m68k-motorola-sysv all g77/execute tests fail because collect2 tries
  > to compile a c-program with a fortran compiler :).  Details using -v and
  > -Wl,-debug options follow.
Thanks.  Odd that nobody else is having this problem.

It looks like collect2 thinks there are EH frame tables that need
initialization for various objects in libgcc2, which I guess is a
side effect of compiling libgcc2 with -fexceptions.

  >     1. Make collect2 always invoke gcc
This would be my first thought; though it looks like collect2 is
setup (for a reason?) to use whatever driver that called collect2
(ie g77, g++, gcc)

  >     2. Make g77 recognize .c suffix and invoke cc1
The one problem I can see with this is it might end up invoking cc1
with fortran options.  The Fortran folks have said this would would
be desirable so that g77 foo.f bar.c would do the expected thing.

  >     3. Make collect2 directly generate assembler, not C.
I don't think we want to stray down that path.  That would mean
including much of varasm.c/final.c in collect2 -- gross.

jeff






More information about the Gcc mailing list