public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Martin Liška" <mliska@suse.cz>
To: Fangrui Song <maskray@google.com>
Cc: Pedro Alves <pedro@palves.net>, binutils@sourceware.org
Subject: Re: [PATCH][RFC] add --enable-zstd-compressed-debug-sections configure option
Date: Mon, 3 Oct 2022 09:49:25 +0200	[thread overview]
Message-ID: <20ce4355-56ca-ad6f-d7de-4c1522d33b5d@suse.cz> (raw)
In-Reply-To: <20221001073112.t6aiwxhqoi3d7k5p@google.com>

On 10/1/22 09:31, Fangrui Song wrote:
> On 2022-09-30, Martin Liška wrote:
>> On 9/30/22 13:25, Pedro Alves wrote:
>>> On 2022-09-30 10:48 a.m., Martin Liška wrote:
>>>> Hello.
>>>>
>>>> The patch can set up default compression algorithm as zstd instead of the
>>>> default zlib-gabi.
>>>>
>>>> The patch is lightly tested as readelf can't decompress debug sections:
>>>> https://sourceware.org/bugzilla/show_bug.cgi?id=29640
>>>>
>>>> Thoughts?
>>>>
>>>> ChangeLog:
>>>>
>>>>     * configure.ac: Add --enable-zstd-compressed-debug-sections
>>>>     configure option.
>>>>     * configure: Regenerate.
>>>
>>> This may become a bit awkward in the future when other better format appears, and you want to
>>> switch to use it by default.  Like, imagine zstd2 is invented.  At that point we'd have to decide
>>> whether to add code to error out if the user specifies both
>>>    "--enable-zstd-compressed-debug-sections --enable-zstd2-compressed-debug-sections",
>>> or always pick the latter option, or some such.
>>
>> Understood.
>>
>>>
>>> IMHO, it seems cleaner and more future proof to add instead:
>>>
>>>   --enable-default-compressed-debug-sections=zlib|zlib-gnu|zlib-gabi|zstd
>>>
>>> WDYT?
>>
>> Yep, it's much nicer. Anyway, lemme try preparing a patch that does a bit of refactoring
>> before I introduce such a patch.
>>
>> Martin
> 
> Personally I'll prefer that the compiler drivers (GCC and Clang) pass
> the default options to ld/as, and they have good infrastructure for
> customization...  (Clang recently got better configuration file
> (https://clang.llvm.org/docs/UsersManual.html#configuration-files)
> support which enables more convenient default driver options.)
> 
> Setting default options in ld/as allow very few projects which bypass
> the compiler driver to use zstd compressed debug sections but the
> benefit is probably low...

Well, I would prefer having the configure option, similar to 
--enable-compressed-debug-sections, we as openSUSE rely on that where
we select the corresponding option value in binutils package.

Martin

  reply	other threads:[~2022-10-03  7:49 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-23  4:08 [PATCH v3] binutils, gdb: support zstd compressed debug sections Fangrui Song
2022-09-23 14:32 ` Simon Marchi
2022-09-26  5:12   ` Alan Modra
2022-09-26  7:20     ` Fangrui Song
2022-09-26 13:30       ` Alan Modra
2022-09-26 14:08     ` Simon Marchi
2022-09-27  0:33       ` Alan Modra
2022-09-23 15:45 ` Nick Clifton
2022-09-23 15:58   ` Simon Marchi
2022-09-23 18:20     ` Fangrui Song
2022-09-23 18:57       ` Simon Marchi
2022-09-23 20:34         ` Fangrui Song
2022-09-24  5:43           ` Eli Zaretskii
2022-09-24  6:53 ` Enze Li
2022-09-24  7:13   ` Fangrui Song
2022-09-27 18:06     ` Tom Tromey
2022-09-27 18:08 ` Tom Tromey
2022-09-27 18:53   ` Fangrui Song
2022-09-29 11:43 ` Martin Liška
2022-09-29 20:17   ` Fangrui Song
2022-09-30  9:48     ` [PATCH][RFC] add --enable-zstd-compressed-debug-sections configure option Martin Liška
2022-09-30 11:25       ` Pedro Alves
2022-09-30 12:42         ` Martin Liška
2022-10-01  7:31           ` Fangrui Song
2022-10-03  7:49             ` Martin Liška [this message]
2022-10-03  7:50               ` [PATCH 1/2] refactor usage of compressed_debug_section_type Martin Liška
2022-10-11  7:14                 ` Martin Liška
2022-10-11 12:06                   ` Nick Clifton
2022-10-11 13:27                     ` Martin Liška
2022-10-03  7:50               ` [PATCH 2/2] add --enable-default-compressed-debug-sections-algorithm configure option Martin Liška
2022-10-11  7:14                 ` Martin Liška
2022-10-11 12:08                   ` Nick Clifton

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=20ce4355-56ca-ad6f-d7de-4c1522d33b5d@suse.cz \
    --to=mliska@suse.cz \
    --cc=binutils@sourceware.org \
    --cc=maskray@google.com \
    --cc=pedro@palves.net \
    /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).