public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: Tom de Vries <tdevries@suse.de>, Jan Beulich <jbeulich@suse.com>
Cc: binutils@sourceware.org, Michael Matz <matz@suse.de>,
	Nick Clifton <nickc@redhat.com>, Alan Modra <amodra@gmail.com>
Subject: Re: [PATCH] gas: Add --force-compress-debug-sections
Date: Tue, 28 Feb 2023 13:21:28 +0000	[thread overview]
Message-ID: <b4169487-c5a3-0f1c-5376-33e0c38c361b@palves.net> (raw)
In-Reply-To: <6ad0c7f3-8971-d5b6-682c-8aaefc484db9@suse.de>

On 2023-02-27 11:24 p.m., Tom de Vries wrote:
> On 2/27/23 15:07, Jan Beulich wrote:

> OK, so say we have --compress-debug-sections=none|zlib|zstd|no|yes|sizewin.
> 
> We have the two existing aliases, --compress-debug-sections and --nocompress-debug-sections, how do we translate those?
> 
> Currently --nocompress-debug-sections maps to --compress-debug-sections=none, but I suppose that would have to become --compress-debug-sections=no, otherwise things will get extremely confusing.

Let's drop the new (when) "no" option, as it's not really needed, and rename "yes" -> when-always, and "sizewin" -> "when-always".

So we end up with:

  --compress-debug-sections=none|zlib|zstd|when-always|when-sizewin
                            ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^
                                group1           group2


And then the "no" in nocompress-debug-sections is no longer ambiguous.


> 
> Then --compress-debug-sections currently maps to --compress-debug-sections=zlib.  So, should that become --compress-debug-sections=zlib,sizewin?  Or just stay --compress-debug-sections=zlib?  I'm not sure if we have made things clearer or more orthogonal this way.

I think it's clearer to make it map to whatever are the defaults in all subgroups,
so no subgroup is special cased.

The default compression format is zlib, and the default "when" is "sizewin", so:

  "--compress-debug-sections" => "--compress-debug-sections=zlib,sizewin"

And then:

  "--compress-debug-sections=always --compress-debug-sections"  =>   "--compress-debug-sections=zlib,sizewin"

> 
> I'm starting to wonder if not a simple --compress-debug-sections=heuristic-sizewin|heuristic-always is the solution, in the sense that these two would only influence the heuristics and nothing else, which would work well with the existing options.

I prefer "when" (or no leading prefix) to "heuristic", as "always" is not an heuristic, there's no trial
and error nor is it loosely defined what it does.

But that's a nitpick, it's actually fine with me.  FWIW.

  parent reply	other threads:[~2023-02-28 13:21 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-23 12:45 Tom de Vries
2023-02-23 13:08 ` Jan Beulich
2023-02-23 13:27   ` Tom de Vries
2023-02-23 13:44     ` Jan Beulich
2023-02-24 10:52       ` Tom de Vries
2023-02-24 11:28         ` Jan Beulich
2023-02-24 12:21           ` Tom de Vries
2023-02-24 13:23             ` Jan Beulich
2023-02-24 14:11               ` Tom de Vries
2023-02-24 14:26                 ` Jan Beulich
2023-02-24 14:57                   ` Tom de Vries
2023-02-27  9:03                     ` Jan Beulich
2023-02-27 11:43                       ` [PATCH] gas: Add --compress-debug-sections=force Tom de Vries
2023-02-27 11:51                         ` Jan Beulich
2023-02-27 13:44                       ` [PATCH] gas: Add --force-compress-debug-sections Pedro Alves
2023-02-27 14:07                         ` Jan Beulich
2023-02-27 23:24                           ` Tom de Vries
2023-02-28  0:19                             ` Tom de Vries
2023-02-28 13:21                             ` Pedro Alves [this message]
2023-02-28 12:49                           ` Pedro Alves
2023-02-23 15:23     ` Michael Matz
2023-02-23 15:28       ` Tom de Vries
2023-02-23 15:44         ` Michael Matz
2023-02-23 15:46           ` Tom de Vries

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=b4169487-c5a3-0f1c-5376-33e0c38c361b@palves.net \
    --to=pedro@palves.net \
    --cc=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=jbeulich@suse.com \
    --cc=matz@suse.de \
    --cc=nickc@redhat.com \
    --cc=tdevries@suse.de \
    /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).