This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH g++ driver] Push -static-libstdc++ back onto the command line to allow spec substitutions to use it.
- From: Iain Sandoe <iain at codesourcery dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches List <gcc-patches at gcc dot gnu dot org>, Jonathan Wakely <jwakely at redhat dot com>
- Date: Tue, 14 Jul 2015 18:45:50 +0100
- Subject: Re: [PATCH g++ driver] Push -static-libstdc++ back onto the command line to allow spec substitutions to use it.
- Authentication-results: sourceware.org; auth=none
- References: <6AF41B3F-BB52-4B75-9336-54A9587CD627 at codesourcery dot com> <55A545C5 dot 2010608 at redhat dot com>
On 14 Jul 2015, at 18:24, Jason Merrill wrote:
> On 06/18/2015 04:12 AM, Iain Sandoe wrote:
>> The patch below pushes -static-libstdc++ onto the output command line (for targets without -Bstatic/dynamic) so that such specs have an opportunity to fire.
>
> Won't that produce an unrecognized flag error from the linker?
IFF the target doesn't support -Bstatic/dynamic *and* doesn't provide a spec %{static-libstdc++:...
then, that could happen.
There's a fairly small group of non-binutils targets - other than Darwin that would be maybe AIX and some Solaris versions (and I believe that the native linkers there do support -Bstatic/dynamic), however, I'll double-check with the maintainers.
Iain