public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Tom de Vries <tdevries@suse.de>
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: Fri, 24 Feb 2023 14:23:22 +0100	[thread overview]
Message-ID: <ccf99bef-4583-5d88-9d1e-50184874ebc0@suse.com> (raw)
In-Reply-To: <7cb226d0-1a91-9bad-181c-46f79c4d6eaf@suse.de>

On 24.02.2023 13:21, Tom de Vries wrote:
> On 2/24/23 12:28, Jan Beulich wrote:
>> On 24.02.2023 11:52, Tom de Vries wrote:
>>> On 2/23/23 14:44, Jan Beulich wrote:
>>>> I think both should be allowed. In a complex build system it may be
>>>> different entities setting "how" and "whether". (To me "none" falls in
>>>> the "whether" category together with "force", and it also can be seen
>>>> as falling in the "how" category together with "zlib" etc. In Linux
>>>> Kconfig, for example, I'd see this being expressed as first a "whether"
>>>> choice [yes/maybe/forced] and then a "how" choice dependent upon
>>>> "whether != none".)
>>>>
>>>
>>> I gave this approach a try.
>>
>> Any specific reason you chose + as the separator instead of the more
>> conventional , ?
> 
> Yes, I initially went for ',', but ran into:
> ...
> $ gcc ~/hello.c -Wa,-gdwarf-5 \
>      -Wa,--compress-debug-sections=zstd,force -c -v
>    ...
>   as -v --64 -gdwarf-5 --compress-debug-sections=zstd force -o hello.o \
>     /tmp/ccOUMqHL.s
>    ...
> Assembler messages:
> Error: can't open force for reading: No such file or directory
> ...

Hmm. I have to admit that I'm not happy with +, irrespective of this
issue. I wonder what other maintainers think - Nick, Alan?

>> I also wouldn't see anything wrong with something
>> like "...=force,zstd,none" - the last one(s) win. That's no different
>> from specifying a second instance of the option. And without that it
>> looks as if the parsing would end up simpler.
> 
> OK, gave that a try.

That's still accumulating none and force across the entire sequence
(and then giving none priority over force, no matter that force may
have been specified last), rather than handling things the same as
when multiple options are specified. With accumulation partially
removed parsing became less involved, but it can be yet more simple
when that accumulation is dropped.

In case of contention maybe best to not allow a sequence and hence
require (in certain cases) two instances of the option to be passed?
At the very least that's then easier to parse.

Jan

  reply	other threads:[~2023-02-24 13:23 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 [this message]
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
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=ccf99bef-4583-5d88-9d1e-50184874ebc0@suse.com \
    --to=jbeulich@suse.com \
    --cc=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --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).