This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Add --with-static-standard-libraries to the top level
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Tom Tromey <tom at tromey dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 13 Aug 2019 11:40:41 +0100
- Subject: Re: [PATCH] Add --with-static-standard-libraries to the top level
- References: <email@example.com> <firstname.lastname@example.org>
On 08/08/19 14:53 -0600, Jeff Law wrote:
On 8/5/19 12:02 PM, Tom Tromey wrote:
gdb should normally not be linked with -static-libstdc++. Currently
this has not caused problems, but it's incompatible with catching an
exception thrown from a shared library -- and a subsequent patch
changes gdb to do just this.
This patch adds a new --with-static-standard-libraries flag to the
top-level configure. It defaults to "auto", which means enabled if
gcc is being built, and disabled otherwise.
2019-07-27 Tom Tromey <email@example.com>
* configure: Rebuild.
* configure.ac: Add --with-static-standard-libraries.
Deferring to Jon.
It might be worth reviewing:
And this thread:
While I NAK'd Aldy's patch in the email thread, if Jon thinks we should
have this capability I won't object.
The new option (and its default value) seem reasonable to me. I don't
see why GDB should be forced to link to libstdc++.a just because GCC
What I don't understand is why GDB crashes. It should still be able to
catch exceptions from a shared library even if linked to libstdc++.a,
unless the static libstdc++.a is somehow incompatible with the shared
libstdc++.so the shared lib linked to.
Is this on GNU/Linux, or something with a different linking model?