public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: David Malcolm <dmalcolm@redhat.com>
To: Simon Sobisch <simonsobisch@gnu.org>,
	gcc-patches@gcc.gnu.org,  binutils@sourceware.org
Cc: Nick Clifton <nickc@redhat.com>
Subject: Re: [PATCH 2/2] libdiagnostics: work-in-progress implementation
Date: Tue, 07 Nov 2023 09:59:06 -0500	[thread overview]
Message-ID: <64cd524041c8552373103b7b4e16342ccbc2543e.camel@redhat.com> (raw)
In-Reply-To: <48642d8a-50fe-4804-b030-78a00a804d1e@gnu.org>

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.

> 
> 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.

> 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.

> 
> 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 :)

> 
> 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

> 
> 
> Thank you for considering that,
> Simon

Thanks
Dave

[...snip...]


  reply	other threads:[~2023-11-07 14:59 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 [this message]
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
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=64cd524041c8552373103b7b4e16342ccbc2543e.camel@redhat.com \
    --to=dmalcolm@redhat.com \
    --cc=binutils@sourceware.org \
    --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).