[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to "parse" gcc -v output
From: |
Joseph S. Myers |
Subject: |
Re: how to "parse" gcc -v output |
Date: |
Sun, 4 Apr 2010 09:40:19 +0000 (UTC) |
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
address@hidden