collect2 compiles C with g77 !

Craig Burley burley@gnu.org
Tue Nov 11 13:51:00 GMT 1997


>Actually, the language specific drivers (g77, g++) aren't supposed to
>call other languages unless explicitly asked for by the user (-x option).

I don't understand this, or maybe the rationale behind it.

Why shouldn't "g77 foo.f bar.c" do what the user expects --
compile bar.c using the C compiler and foo.f using the Fortran
compiler, and link the objects into a single executable along
with the Fortran libraries?

More to the point, why are g77 and g++ considered
"language-specific drivers" but gcc is not?  (Think about
what a *user* sees when answering that question -- users
aren't interested in, and should not have to know about,
internal architectures of products they use.)

Another point -- g77 has always, since public release,
handled compiling non-Fortran languages just fine, as far
as I'm aware.  Same with g++ up through gcc 2.7, I believe,
since I originally created g77.c by simply copying g++.c
and editing it.  It might well be the case, therefore,
that existing users have scripts that use g77 or g++ to
compile multi-lingual programs, and I wouldn't recommend
we do anything to cause those scripts to stop working.

So if there is now a policy that only the gcc command itself
knows how to compile source code written in multiple
languages, I'd sure be interested to know when, why, and how
that policy was created and went into effect.  It certainly
isn't the policy I've been aware of, and I can't see how it
benefits the end user offhand.

        tq vm, (burley)



More information about the Gcc mailing list