From: David Malcolm <dmalcolm@redhat.com>
To: "Clément Chigot" <chigot@adacore.com>
Cc: gcc-patches@gcc.gnu.org, binutils@sourceware.org,
Nick Clifton <nickc@redhat.com>,
Simon Sobisch <simonsobisch@gnu.org>
Subject: Re: [PATCH] binutils: experimental use of libdiagnostics in gas
Date: Tue, 07 Nov 2023 11:18:47 -0500 [thread overview]
Message-ID: <fa9d6fe2c77fffb56122aa8e3e01f0b6ee49e1ec.camel@redhat.com> (raw)
In-Reply-To: <CAJ307Egumf0HuVhjS2dr+e+Nrtu7d5WfGeO=dtcErMRdp-eC+w@mail.gmail.com>
On Tue, 2023-11-07 at 16:57 +0100, Clément 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.
> >
> > Yes. I'm assuming that consumers of libdiagnostics would have a
> > configure-time test for the availability of libdiagnostics. In the
> > 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.
> >
> > 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, -
> > fno-
> > diagnostics-show-labels, etc).
> >
> > 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."
>
> 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.
>
> 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...
One other consideration here may be bootstrapping a toolchain (e.g.
bringing up a new CPU architecture) and thus minimizing dependencies.
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.
>
>
[...snip...]
Dave
next prev parent reply other threads:[~2023-11-07 16:18 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-06 22:29 [PATCH/RFC] libdiagnostics: a shared library for emitting diagnostics David Malcolm
2023-11-06 22:29 ` [PATCH 1/2] libdiagnostics: header and examples David Malcolm
2023-11-06 22:29 ` [PATCH 2/2] libdiagnostics: work-in-progress implementation David Malcolm
2023-11-07 7:54 ` Simon Sobisch
2023-11-07 14:59 ` David Malcolm
2023-11-07 15:35 ` Simon Sobisch
2023-11-06 22:29 ` [PATCH] binutils: experimental use of libdiagnostics in gas David Malcolm
2023-11-07 7:04 ` Simon Sobisch
2023-11-07 14:51 ` David Malcolm
2023-11-07 9:21 ` Clément Chigot
2023-11-07 14:09 ` David Malcolm
2023-11-07 15:57 ` Clément Chigot
2023-11-07 16:18 ` David Malcolm [this message]
2023-11-07 10:03 ` Jan Beulich
2023-11-07 14:32 ` David Malcolm
2023-11-07 14:59 ` Jan Beulich
2023-11-21 22:20 ` [PATCH 0/6] v2 of libdiagnostics David Malcolm
2023-11-21 22:20 ` [PATCH 1/5] libdiagnostics v2: header and examples David Malcolm
2023-11-21 22:20 ` [PATCH 2/5] libdiagnostics v2: work-in-progress implementation David Malcolm
2023-11-21 22:20 ` [PATCH 3/5] libdiagnostics v2: add C++ wrapper API David Malcolm
2023-11-21 22:20 ` [PATCH 4/5] diagnostics: add diagnostic_context::get_location_text David Malcolm
2023-11-28 1:25 ` David Malcolm
2023-11-21 22:20 ` [PATCH 5/5] diagnostics: don't print annotation lines when there's no column info David Malcolm
2023-11-28 1:25 ` David Malcolm
2023-11-21 22:20 ` [PATCH] binutils: v2: experimental use of libdiagnostics in gas David Malcolm
2023-11-22 7:36 ` Jan Beulich
2023-11-21 22:35 ` [PATCH 0/6] v2 of libdiagnostics Simon Sobisch
2023-11-23 17:36 ` Pedro Alves
2024-01-27 23:28 ` Simon Sobisch
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=fa9d6fe2c77fffb56122aa8e3e01f0b6ee49e1ec.camel@redhat.com \
--to=dmalcolm@redhat.com \
--cc=binutils@sourceware.org \
--cc=chigot@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=nickc@redhat.com \
--cc=simonsobisch@gnu.org \
/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).