public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: 王昊然 <msl0000023508@gmail.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: David Malcolm <dmalcolm@redhat.com>,
	gcc-patches@gcc.gnu.org, 	Tobias Burnus <tobias@codesourcery.com>
Subject: Re: [PATCH] Add --with-diagnostics-urls configuration option and GCC_URLS env var
Date: Sat, 21 Dec 2019 08:56:00 -0000	[thread overview]
Message-ID: <CAPge7ye2Ds1vNtRONNFh5-1Sp51SZPp3xLMhtXM7+cE=Rr7R2w@mail.gmail.com> (raw)
In-Reply-To: <20191219204852.GV10088@tucnak>

I think this is good idea since it is consistent with env var
GCC_COLORS -- the color support will be disabled even with
-fdiagnostics-color=always, if GCC_COLORS is set to empty.
And I has experienced more serious problem when I ssh(1) to the remote
machine from a even older terminal, GNOME Terminal 2.30.2. The
terminal bells made noticeable delays; The whole terminal window would
hang for several seconds when gcc(1) emits too many warnings in at a
time...

2019-12-20 4:48 GMT+08:00, Jakub Jelinek <jakub@redhat.com>:
> On Thu, Dec 19, 2019 at 03:24:19PM -0500, David Malcolm wrote:
>> Currently -fdiagnostics-urls defaults to "auto" and this works
>> (e.g. for recent gnome-terminal, and is gracefully discarded by
>> konsole5), but there have been reports of incompatibilities of the
>> feature with various other terminals.
>>
>> This patch adds a configuration option to change this default, based
>> on Jakub's analogous change to -fdiagnostics-color (r217540).  One
>> possible configure-time option is --with-diagnostics-urls=auto-if-env,
>> which adds support for a GCC_URLS environment variable to control
>> the default (again by analogy with the --with-diagnostics-color
>> configure-time support for changing -fdiagnostics-color).
>
> I think it would be better to have GCC_URLS env var to be be more
> consistent
> with GCC_COLORS, so yes, have the never,auto,auto-if-env,always
> configure possibilities like for colors and for auto-if-env don't print
> URLS if the env var is not present, but on top of that, parse also the
> value
> of the env var like parse_gcc_colors does, and have a way to disable urls
> even with -fdiagnostics-urls=always (like GCC_COLORS= disables colors),
> and perhaps use the env var to select between the ST and BEL terminator
> as apparently some terminals like one or the other more.
> So perhaps accept GCC_URLS= and GCC_URLS=no as disabling, GCC_URLS=bel
> as the (default) case for BEL termination and GCC_URLS=st for the ST
> termination?
> E.g. have a way even for a compiler configured that it will work with new
> terminals most of them time and thus --with-diagnostics-urls=always that
> if somebody sshs to some machine from some old host, GCC_URLS=no (or none?)
> can be still used to disable it, without the need to tweak build system to
> inject there some flags.
>
>> Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu; I
>> tested the --with-diagnostics-urls=auto-if-env and GCC_URLS behavior
>> manually.
>>
>> Jakub: does this look sane to you?  (given that this is heavily based
>> on your 2014 patches for --with-diagnostics-color).
>
> 	Jakub
>
>

  reply	other threads:[~2019-12-21  4:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-15 15:09 [PATCH 1/2] pretty-print: support URL escape sequences (PR 87488) 王昊然
2019-12-15 18:11 ` David Malcolm
2019-12-16  3:42   ` 王昊然
2019-12-19 20:31     ` [PATCH] Add --with-diagnostics-urls configuration option and GCC_URLS env var David Malcolm
2019-12-19 21:22       ` Jakub Jelinek
2019-12-21  8:56         ` 王昊然 [this message]
2019-12-21 10:09 Bernd Edlinger
2020-01-23 18:11 ` Bernd Edlinger

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='CAPge7ye2Ds1vNtRONNFh5-1Sp51SZPp3xLMhtXM7+cE=Rr7R2w@mail.gmail.com' \
    --to=msl0000023508@gmail.com \
    --cc=dmalcolm@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=tobias@codesourcery.com \
    /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).