From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19164 invoked by alias); 13 Aug 2019 10:40:47 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 19155 invoked by uid 89); 13 Aug 2019 10:40:46 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL,BAYES_00,KAM_SHORT,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=reviewing X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 13 Aug 2019 10:40:45 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 377DC30BC58B; Tue, 13 Aug 2019 10:40:44 +0000 (UTC) Received: from localhost (unknown [10.33.36.86]) by smtp.corp.redhat.com (Postfix) with ESMTP id CA38480FE5; Tue, 13 Aug 2019 10:40:42 +0000 (UTC) Date: Tue, 13 Aug 2019 10:54:00 -0000 From: Jonathan Wakely To: Jeff Law Cc: Tom Tromey , GCC Patches Subject: Re: [PATCH] Add --with-static-standard-libraries to the top level Message-ID: <20190813104041.GD9487@redhat.com> References: <87y307bidk.fsf@tromey.com> <83bc1c24-31cd-7435-4846-b245fa7bb8c0@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <83bc1c24-31cd-7435-4846-b245fa7bb8c0@redhat.com> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.12.0 (2019-05-25) X-SW-Source: 2019-08/txt/msg00844.txt.bz2 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 >> >> * 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?