public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: Jeff Law <law@redhat.com>
Cc: Tom Tromey <tom@tromey.com>, GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Add --with-static-standard-libraries to the top level
Date: Tue, 13 Aug 2019 10:54:00 -0000	[thread overview]
Message-ID: <20190813104041.GD9487@redhat.com> (raw)
In-Reply-To: <83bc1c24-31cd-7435-4846-b245fa7bb8c0@redhat.com>

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.
>>
>> Tom
>>
>> 2019-07-27  Tom Tromey  <tom@tromey.com>
>>
>> 	* configure: Rebuild.
>> 	* configure.ac: Add --with-static-standard-libraries.
>Deferring to Jon.
>
>It might be worth reviewing:
>
>https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56750
>
>And this thread:
>
>> https://gcc.gnu.org/ml/gcc-patches/2018-02/msg00403.html
>
>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
wants to.

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?

  reply	other threads:[~2019-08-13 10:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-05 18:02 Tom Tromey
2019-08-08 21:00 ` Jeff Law
2019-08-13 10:54   ` Jonathan Wakely [this message]
2019-08-13 15:49     ` Tom Tromey
2019-08-16 18:04       ` Jonathan Wakely
2019-08-19 15:53         ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190813104041.GD9487@redhat.com \
    --to=jwakely@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=law@redhat.com \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).