minor gcc2->gcc3 migration nit

Kai Henningsen kaih@khms.westfalen.de
Thu Apr 22 18:28:00 GMT 2004


jsm@polyomino.org.uk (Joseph S. Myers)  wrote on 22.04.04 in <Pine.LNX.4.58.0404221200350.21225@digraph.polyomino.org.uk>:

> On Thu, 22 Apr 2004, Richard Kenner wrote:
>
> > It's not that simple.  If we say that you have to use the "appropriate"
> > program instead of "gcc" for linking language X and a different one for
> > linking language Y, what happens if you have a program that uses *both*
> > languages X and Y?  Both can't get their way.
>
> That's the point of Zack's proposal on the beginners' projects list that
> collect2 should be able to identify the runtime support libraries required
> by a program.  Users of multi-language programs at present need to know
> the names of all the libraries the various languages need in a particular
> GCC version, but they shouldn't need to know such internal details; they
> should be hidden behind the single "gcc" driver.

In the meantime, it might be possible to give gcc options to tell it which  
languages it should add the runtime libraries for.

There already are options to tell gcc what languages source files are in.  
So one possibility would be to use those options to set flags about what  
languages get mentioned (this would make it easy to do the same for those  
recognized by file extension) and then use those flags when deciding what  
to link to.

Seems like that would need very few additional smarts.

MfG Kai



More information about the Gcc mailing list