This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: how to "parse" gcc -v output
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Ralf Wildenhues <Ralf dot Wildenhues at gmx dot de>
- Cc: gcc at gcc dot gnu dot org, libtool at gnu dot org
- Date: Sun, 4 Apr 2010 09:40:19 +0000 (UTC)
- Subject: Re: how to "parse" gcc -v output
- References: <20100404070633.GA29215@gmx.de>
On Sun, 4 Apr 2010, Ralf Wildenhues wrote:
> - which libraries it needs to link shared modules against, or
> - which libraries are needed to let g++ link mixed C++/Fortran code,
> so in practice there is no other choice (unless the user provides this
> information).
[...]
> I'm willing to add API to a future GCC if that's the only viable way
> (that way at least we have a fixed set of past and present versions to
> match).
For both of the above, at least on ELF systems, the correct thing to do is
to make GCC (used by any of the drivers "gcc", "g++", etc.) do the right
thing by default: link with the libraries required by the objects being
linked in, using those appropriate for shared libraries if -shared is
passed, and respecting options such as -static-libstdc++. That is, make
the driver/collect2 combination smart enough that libtool does not need to
query this information.
--
Joseph S. Myers
joseph@codesourcery.com