This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Difference between gcc and g++ drivers
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Andrew Senkevich <andrew dot n dot senkevich at gmail dot com>
- Cc: GCC Mailing List <gcc at gcc dot gnu dot org>
- Date: Wed, 24 Jun 2015 15:30:44 +0000
- Subject: Re: [RFC] Difference between gcc and g++ drivers
- Authentication-results: sourceware.org; auth=none
- References: <CAMXFM3uWbiw8ipRsVQfCNNhgDNqq2PV613pN3FfkVigYtypdpA at mail dot gmail dot com>
On Wed, 24 Jun 2015, Andrew Senkevich wrote:
> Can anybody tell something about this difference in drivers?
libstdc++ uses libm - that's probably why g++ links it in by default.
Modern good practice would say that it should only be linked directly into
a program (should only end up listed in DT_NEEDED) if actually required by
that program, not if only used indirectly by libstdc++.
> May be needed fix for g++ driver to add also -lmvec if GLIBC version
> >= 2.22 found on configure?
I don't think that's a good idea (even if you depend on the glibc version
on the target, for which there is various existing precedent, depending on
*how that version is configured* doesn't seem such a good idea, and
libmvec is an optional feature only supported at all on x86_64).
--
Joseph S. Myers
joseph@codesourcery.com