From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id E4D5B3858C39 for ; Tue, 7 Nov 2023 15:36:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E4D5B3858C39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E4D5B3858C39 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:142:3::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699371362; cv=none; b=m8Uk09NJPMXP1mdyXsKyXupMMt+/clomc7YXYDvbNr9Y2MgOoMUgJOmsIux6Gu4++cPX+4N9qz1fcqDnU84daVzxD9OoEMzdjq5tuqBC3TTyfUv4MUb6l3kko+s7H0uPPW2lGpL6CEMQQocjOVFNSeWSxQopBjeqKfEqqwy8YUA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699371362; c=relaxed/simple; bh=+GPmBnU7MmwFpydhxPQOJA5xAxBfo+mkQPH2ehI65jo=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=tMQLSZkC469sTLpYuE/l+NmGj0bdx1Y2E9ZuhFahpfgr4Qk73byvJgF00HrujdsPNv7daUScFTwV9Fk5LKz19hkRG8mHcEX5+XGeKBIeTO7GGuipLUfTsYPitM3otLQPloouctst1QpmzjgIibg6Yss9SlJE0W4Kws3mNEjBj0M= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r0O7U-0006Ru-En; Tue, 07 Nov 2023 10:36:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=In-Reply-To:From:References:To:Subject:MIME-Version: Date; bh=RxtkO4CO163V9C1pbgwx3Zzjl4gX/Zo7qw6YZeh09/g=; b=qCmGrVDgmECfQ32g7M0f v4x8VDpnTljZvifJmy0kPC6oTo5fxGC2fzhtYl3JK8Tv7eQaHu2DDfe0c6c1s+3/+9YRbuE9jaIGM 57e5955HbZ7ZthuW1tsMCH0nom5jmCF597oJeN4+b6AYTlKU77VzM3TVMBVO9198Gjgup6yInw1Kl i0Tv/HMoyftfe4hqSfFdJ98XIHrrSE+gC5QTRGwW/ob2ZZJpLzkiAI1wxGzOIsItyiIj0VgS+zjce iL0JJupckht7ETNCeoEMokASM/maPll2MfwRdUvhQUg+Bl1yhnVEMaCn6dKH5YxIjdV4uX9xJxLbW iZSOe8iDtN90+Q==; Message-ID: <6b3c08d6-b0da-4702-ab67-e1b9c5a85370@gnu.org> Date: Tue, 7 Nov 2023 16:35:38 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] libdiagnostics: work-in-progress implementation Content-Language: en-US To: David Malcolm , gcc-patches@gcc.gnu.org, binutils@sourceware.org Cc: Nick Clifton References: <20231106222959.2707741-1-dmalcolm@redhat.com> <20231106222959.2707741-3-dmalcolm@redhat.com> <48642d8a-50fe-4804-b030-78a00a804d1e@gnu.org> <64cd524041c8552373103b7b4e16342ccbc2543e.camel@redhat.com> From: Simon Sobisch Autocrypt: addr=simonsobisch@gnu.org; keydata= xsFNBFYqhRcBEADATB6IkCbXgBYG/1w5BzcfMWQuiXwzHbDxvsJ+rplZkgaR4jcJK6eym24h UKnDstGKgRFbIal0QjKIPUcLaerja+GzkAZYbTQSAQtioZRULwyQ9xRmHcYpMdf/57cIqO9a QhL35uaWNAfjKPejsTEnOPoTecx7G5HJIEswjTA1D9vr1yqkeYKe/t3MlyQ5Z1sQnIZQJvTM S0GJBjqzOQsadoajsx+OJXG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e008inMCtJenwNPe/y0VvZPlvC9wl9AKXCtAnyAMEYdr6wssk nxC84cf+Nwjn6JwFQ2tG41x0f1Odm266Zsx+QKQlauFWvSKjZnDdD81Djaaqq8Yev6wW/328 CjCLCM2+cFvNsnRtGJ+j5jPzHG93/PVYfPFL35YMnUFe4K0CXtmBvKhrt3u+D/pRjzy5eC9b B6z9VqVQSdgQlNErJlrhmMgCxRf2H1jLpanBWuDNmDC+m3bI02PxBBB4mGXILF3UUWBWBk2k fuW92omHc6hfVIEi55AzuHliUOEGHqtrjUtyjXHAl5RQ1JVAg+i5Rhfh2kVrxBM5/bv0o/t9 7gmOkWPphhq1pVaiZPjfhVMuEZyLToEbe8gWedRa0lPeTbzRg2pHc93ZrCV3f2SRqkCEPolY AUuBxN9Svo/BqIx594Ta5Nu0nDFiN5tAhN+l+4sW2+RpnVu4nOm3bJRxySvim7XaFvGAP5XR nzARItvlU8Lt6wTG/u5TPLxPCUsop4DH14H3OL6SIDf1C6woQHqQ+eV3cBrFw20IYIh7cggm gBd07BaQQkQMQfYDu/XD In-Reply-To: <64cd524041c8552373103b7b4e16342ccbc2543e.camel@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,LIKELY_SPAM_BODY,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Am 07.11.2023 um 15:59 schrieb David Malcolm: > On Tue, 2023-11-07 at 08:54 +0100, Simon Sobisch wrote: >> Thank you for our work and providing this patch. >> >> GCC related questions: >> >> Is it planned to change GCC diagnostics to use libdiagnostic itself? > > No. GCC uses C++ internally, and the internal diagnostic API is > written in C++. libdiagnostic wraps up this C++ API in a C interface. > GCC would continue using the C++ interface internally. Why not providing both a C and C++ API in libdiagnostics? GNU programs (and also others) are written in both. The benefit of using it withing GCC itself "eat your own dogfood" would be that more or less any need that GCC has is also found in the library... thinking again, this may also make it "too heavy" - not sure. >> >> Is it planned to "directly" add features or would the result for GCC >> be >> identical (apart from build changes)? >> >> So far it looks like it wouldn't be possible to "just build >> libdiagnostics", and much less to "just distrubute its source" for >> that >> purpose, is it? > > Correct: libdiagnostics is just an extra .cc file within the rest of > GCC, and almost all the work is being done in other .cc files. Maybe call that "status quo - initial patch"? ;-) >> As building GCC does take a significant amount of resources and >> system-wide switching to a new GCC version is considered a serious >> task >> (distributions commonly stay with their major GCC version for quite >> some >> time), I'd search for an option to building a "self-contained" >> version >> that does not need the complete necessary toolset and may also be >> distributed separately. > > It's possible to reduce the resources by disabling bootstrapping, and > only enabling a minimal set of languages. > > I'd see libdiagnostics as coming from the distribution build of GCC. I > suppose distributions might want to have a simple build of GCC and ship > just the .so/.h file from libdiagnostics from the build. Agreed. But I'm as a "user" would like to have that "easy" option, too. As a maintainer that plans to move to libdiagnostics it would be _very_ helpful to be able to use it as a sub-project, in case it isn't available. >> This definitely can come later, too; I _guess_ this would mean moving >> part of GCCs code in a sub-folder libdiagnostics and use it as >> subproject for configure/make, with then option to run "make dist" in >> that subfolder alone, too. > > It would involve a lot of refactoring :) Something to "consider along, do later", I guess. > >> >> The main reason for that would be to allow applications move from >> their previous own diagnostic to libdiagnostics, if it isn't available on >> the system they can build and install it as subproject, too; and to be >> able to build libdiagnostics with a much reduced dependency list. > > I can try to come up with a minimal recipe for building gcc if all you > want is libdiagnostics Thanks, that already helps a lot. Simon