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.129.124]) by sourceware.org (Postfix) with ESMTPS id B224F3858C36 for ; Tue, 7 Nov 2023 16:18:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B224F3858C36 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 B224F3858C36 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699373934; cv=none; b=P8/39/vTEIDr8gdzCWQ97j0RNVqRU+m7PKUmfKOHq5H3E45K5xJ+0MeKYOOimC06x41wNLDnmtL33hb5slmUYBvpPThltbC6XQrLX3eANYmWqk6iwIeqLDzbxN+fVrCrgmCowK4FLwskvtGBZn3oX/0LI5KTIWWbaaco0u3SeVw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699373934; c=relaxed/simple; bh=PsiSPS1W/8BFAZfdt/smxBhUoriDX5B3eXdhb6wfW+A=; h=DKIM-Signature:Message-ID:Subject:From:To:Date:MIME-Version; b=F7FngtUdF/CzXGhgZRsNPkEZIMeXhKBwFCDHFt8Vw+NHXOZ5qVQUvy/2rKvl9p1h/7JP56K+5xAyFF93AU21iD2WEzJdnoWCR4BpUqkg8gPTczjGxIPr1AQynVSAcJUW5x7GBz8eIp1DTB71jznAcT/FBnaIEdWSaWbaAGYzpX4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699373933; 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=PsiSPS1W/8BFAZfdt/smxBhUoriDX5B3eXdhb6wfW+A=; b=OnKrdjEbQqQB/7NPuj9yvdbG8EEUAdTK6Fp95sVH/o8d4IGxXqE+2qCRSzBcHOiKX0/QrM nAsTIQ495FSrTOOT+gYpIQrALYPeDjKrJaI+CnvUD4IB5j0AA0Vj5fuZSco75xbjfDcaWd AzWq7w4nSozEma3BMAXnzzmdrQS7NDY= Received: from mail-oa1-f69.google.com (mail-oa1-f69.google.com [209.85.160.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-47-Kkl1kuJKOlaktSN5WiBY7A-1; Tue, 07 Nov 2023 11:18:50 -0500 X-MC-Unique: Kkl1kuJKOlaktSN5WiBY7A-1 Received: by mail-oa1-f69.google.com with SMTP id 586e51a60fabf-1eb43ff49b2so7587561fac.2 for ; Tue, 07 Nov 2023 08:18:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699373929; x=1699978729; 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=PsiSPS1W/8BFAZfdt/smxBhUoriDX5B3eXdhb6wfW+A=; b=gffqlP1y7Mbd66guvEITch8pPmNsSrma1mpjyxivEL04K+L9GJJJmiRfCdyhpkglKq L0Cq7s4YwEbpbrQqomlH5qFmOX1vFxAGrtEnlf4XvCqmQT45Ibt6nSe5f3nxGVFGhSA4 RS9bk07kHw+XkEjcCxbipTIQU6CQomwTMTdKTibQJbge7CnLfiosqbKnpR2Dg5B7SmEg Wyx4HOqhLwOwZoZeZeQAel0EBznvd5eRJgt3DLCwVf3OfrM1aoDnuRsuVRCmW3VMBe8E dSlWQ2yT0QUFEyP+6PcqL3+rKRJLgSwga5yRM5ByMdAr6gmLj1KSfvG3TB8RbTvU9ZH+ h2Wg== X-Gm-Message-State: AOJu0YzBrj2cobHUqWTSru2bRV1Id2KYBvDRWzAVjbsF24zpFFVkBbON 1R8QkPWNQTin93qXl6gxlrksmU4Xmv32jU+f5lrxbOnSxL7MyXa15EaY/cj+p4uD8h2knDDBRkT AwbWX4e0FIZranotdTw== X-Received: by 2002:a05:6870:128a:b0:1e9:b3f6:12de with SMTP id 10-20020a056870128a00b001e9b3f612demr2835473oal.31.1699373928792; Tue, 07 Nov 2023 08:18:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IF919xQM9/ELxeV5W/RdCKjrwXkIOZN8OcXJxvrEF3f9/njCsZ7W8duzlSiuIqFK74GDbmutA== X-Received: by 2002:a05:6870:128a:b0:1e9:b3f6:12de with SMTP id 10-20020a056870128a00b001e9b3f612demr2835458oal.31.1699373928528; Tue, 07 Nov 2023 08:18:48 -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 g26-20020ac8775a000000b00419b5274381sm21514qtu.94.2023.11.07.08.18.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 08:18:48 -0800 (PST) Message-ID: Subject: Re: [PATCH] binutils: experimental use of libdiagnostics in gas From: David Malcolm To: =?ISO-8859-1?Q?Cl=E9ment?= Chigot Cc: gcc-patches@gcc.gnu.org, binutils@sourceware.org, Nick Clifton , Simon Sobisch Date: Tue, 07 Nov 2023 11:18:47 -0500 In-Reply-To: References: <20231106222959.2707741-1-dmalcolm@redhat.com> <20231106222959.2707741-4-dmalcolm@redhat.com> <0eca4e65d12aa0caac7a3ee49cd7deb252541abe.camel@redhat.com> 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=-5.2 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_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 16:57 +0100, Cl=C3=A9ment Chigot wrote: > > > However, I'm not sure how you're planning to make the transition. > > > But > > > currently, it looks like libdiagnostics is either enabled and > > > thus > > > the > > > new format being produced, either it's not and we do have the > > > legacy > > > format. I think the transition should be smoother than that, > > > there > > > are > > > probably thousands of tests, scripts, whatever out in the wild > > > expecting this legacy format. Allowing both formats within the > > > same > > > executable, basically chosen by a flag, would probably ease the > > > transition. > >=20 > > Yes.=C2=A0 I'm assuming that consumers of libdiagnostics would have a > > configure-time test for the availability of libdiagnostics.=C2=A0 In th= e > > example I gave, it was just a compile-time "choice" (I'm not an > > expert > > at autotools, so I hacked all of that up for now)... but if the > > feature > > is available, it could be a run-time choice. > >=20 > > We've been adding new features to GCC's diagnostic output over the > > years (adding column numbers, showing macro expansions, quoting > > source > > code with underlines, fix-it hints, etc), but each time we've added > > a > > flag to turn them off (e.g. -fno-diagnostics-show-line-numbers,=C2=A0 - > > fno- > > diagnostics-show-labels, etc). > >=20 > > As of GCC 11 we have a -fdiagnostics-plain-output which "requests > > that > > diagnostic output look as plain as possible, which may be useful > > when > > running dejagnu or other utilities that need to parse diagnostics > > output and prefer that it remain more stable over time." >=20 > I guess starting by a configure-time choice before such flags like > -fdiagnostics-plain-output are implemented is enough. I merely wish > that there is a way to preserve the old output, giving people the > time > to experiment and then transitioning all their tools. >=20 > We can also introduce a flag like "-fdiagnostics-legacy-output`. > Though, I'm fearing it will never be removed, meaning maintaining the > previous code forever...=C2=A0 One other consideration here may be bootstrapping a toolchain (e.g. bringing up a new CPU architecture) and thus minimizing dependencies.=20 binutils is such an important component that perhaps you'd want to retain a minimal implementation of diagnostics that doesn't bring in an external requirement? especially one based on GCC 14 (which itself requires GCC 4.8 or later to build), e.g. configuring "--without- libdiagnostics" or somesuch? > A configure-time choice can be more easily > enabled by default in a few versions and then removed completely > after > another bunch of versions. >=20 >=20 [...snip...] Dave