From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 925833858C5E for ; Tue, 7 Nov 2023 14:59:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 925833858C5E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 925833858C5E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699369152; cv=none; b=o8MzTS7eMuG/rFk59GhHEoaMymZc5Ma7q2KvI8caTaZkDApFfwMBSR3TFl3L9v1oZbdUGuHW/xozbuBMuFN6Z2Li6FjxZg1+n64Ua/xorp1IDHcbokpOiIL1ETBCb4bfRKHogz6/sXzZEfLw6OYYJuqlWk3eo6r2eFiC4MVmV9U= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699369152; c=relaxed/simple; bh=Mzp7Z8YMnQj/8kHhN9oSqSFDu4GWW86N7fUuwkpk0z4=; h=DKIM-Signature:Message-ID:Subject:From:To:Date:MIME-Version; b=HTHE8FMyIHVM7UiONfDxtZa4bpba/GWu/mJkhcqRWA/JDTt9ywbA91+2v909qtJECdJ67GjvXt1mwMjeEhHV2ZKBm3FS03ViFa6f4Pw+SLPpDxBtrZzfl8WNELJTMynHVRuUYuFzVUoA5jPgEHggd2TQ556H7FySztf4EM+jkZ0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699369150; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HHehtfStBkDs4bJ1buJjQdtlrykI97Tiv0Vst8dncoc=; b=iXp9kTT6wnWCSFtHOCCNE61ar+Pa5z+MkIJOymRjB8HxnEMMp/WDEB9w27IR0zWKRaSXCs bK5prED5Xe4Wi4DPr7Cc5ONSnNKnEFry6e4hpb/47zyFDXHvqTPuFZ809tX1mlPjgI5MSg ZHZeoKlaZ29eJhTzTxMJeyeHWSRxHeA= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-130--GYxSkW6NGWeRYppT9LWJw-1; Tue, 07 Nov 2023 09:59:09 -0500 X-MC-Unique: -GYxSkW6NGWeRYppT9LWJw-1 Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-670b32845a7so66662036d6.3 for ; Tue, 07 Nov 2023 06:59:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699369148; x=1699973948; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=HHehtfStBkDs4bJ1buJjQdtlrykI97Tiv0Vst8dncoc=; b=SK3Se+InO6tqy9aI2VeneqYmve/kzfCCEwqc1I7/n7j0mlW4TjkDDtDqkJ0bOnC2+o Cn8P+5HxM4XsqAS9JOxmI8SFO3tjaOJyPKHXI85MYd9s5nMp8yelb44T+Zbw1fd+cU/V 8rK0tRNGSWR0w3oszQyXBqNzuoWD37bAuUp/tpDtx0GT9HBMbS94GLKpQihSGURVvkS6 bvIGbo0/2LVVk29JU+JwCif3B1D0VMu9jzzcH8wr5xlFa+fVvOgRvpNSMSybr4CrzXAE oUEnMAgPysRiUVYAuqCDduVpYGYCpQj4ZOX/1U4Tine2Xe0KD0hh6dAo5JgZtlVeVHW0 p0jA== X-Gm-Message-State: AOJu0YzDlvN6RscS+P+m2j/SGHjmVJY75W9PKdCeGkNwPYi8JLUFASq2 bENLnKSBb1DI6HeAKSrSLnr5aqgDcIO0b4kQbtf3a/FuDXp5SAFrnUoMv0Y9PMFCrMeKDopXrUW ehFdvo+GmY0/DX5fyXM9e2qC7oQ== X-Received: by 2002:a05:6214:252d:b0:66d:1b2f:3f64 with SMTP id gg13-20020a056214252d00b0066d1b2f3f64mr43442210qvb.31.1699369147833; Tue, 07 Nov 2023 06:59:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IH7jqth2eAVxIWo6qR9OHlmSPSeEvbVioja6Yf6+z0O3AQEaQmoVD/pe+tVYDE4KxVCaa5fYA== X-Received: by 2002:a05:6214:252d:b0:66d:1b2f:3f64 with SMTP id gg13-20020a056214252d00b0066d1b2f3f64mr43442190qvb.31.1699369147547; Tue, 07 Nov 2023 06:59:07 -0800 (PST) Received: from t14s.localdomain (c-76-28-97-5.hsd1.ma.comcast.net. [76.28.97.5]) by smtp.gmail.com with ESMTPSA id k3-20020a0cebc3000000b006717ddb4d47sm4398004qvq.28.2023.11.07.06.59.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 06:59:07 -0800 (PST) Message-ID: <64cd524041c8552373103b7b4e16342ccbc2543e.camel@redhat.com> Subject: Re: [PATCH 2/2] libdiagnostics: work-in-progress implementation From: David Malcolm To: Simon Sobisch , gcc-patches@gcc.gnu.org, binutils@sourceware.org Cc: Nick Clifton Date: Tue, 07 Nov 2023 09:59:06 -0500 In-Reply-To: <48642d8a-50fe-4804-b030-78a00a804d1e@gnu.org> References: <20231106222959.2707741-1-dmalcolm@redhat.com> <20231106222959.2707741-3-dmalcolm@redhat.com> <48642d8a-50fe-4804-b030-78a00a804d1e@gnu.org> User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Tue, 2023-11-07 at 08:54 +0100, Simon Sobisch wrote: > Thank you for our work and providing this patch. >=20 > GCC related questions: >=20 > 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.=20 GCC would continue using the C++ interface internally. >=20 > Is it planned to "directly" add features or would the result for GCC > be=20 > identical (apart from build changes)? >=20 > So far it looks like it wouldn't be possible to "just build=20 > libdiagnostics", and much less to "just distrubute its source" for > that=20 > 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. > As building GCC does take a significant amount of resources and=20 > system-wide switching to a new GCC version is considered a serious > task=20 > (distributions commonly stay with their major GCC version for quite > some=20 > time), I'd search for an option to building a "self-contained" > version=20 > that does not need the complete necessary toolset and may also be=20 > 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. >=20 > 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=20 > subproject for configure/make, with then option to run "make dist" in > that subfolder alone, too. It would involve a lot of refactoring :) >=20 > The main reason for that would be to allow applications move from > their=20 > previous own diagnostic to libdiagnostics, if it isn't available on > the=20 > system they can build and install it as subproject, too; and to be > able=20 > 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 >=20 >=20 > Thank you for considering that, > Simon Thanks Dave [...snip...]