From: Jan Beulich <jbeulich@suse.com>
To: Binutils <binutils@sourceware.org>
Subject: [PATCH] gas: default .debug section compression method adjustments
Date: Fri, 24 Feb 2023 14:02:22 +0100 [thread overview]
Message-ID: <fe210be6-76c8-155f-f151-15ce767b133f@suse.com> (raw)
While commit b0c295e1b8d0 ("add --enable-default-compressed-debug-
sections-algorithm configure option") adjusted flag_compress_debug's
initializer, it didn't alter the default used when the command line
option was specified with an (optional!) argument. This rendered help
text inconsistent with actual behavior in certain configurations.
As to help text - the default reported there clearly shouldn't be
affected by a possible earlier --compress-debug-sections= option, so
flag_compress_debug can't be used when emitting usage information.
--- a/gas/as.c
+++ b/gas/as.c
@@ -228,6 +228,10 @@ print_version_id (void)
#ifdef DEFAULT_FLAG_COMPRESS_DEBUG
enum compressed_debug_section_type flag_compress_debug
= DEFAULT_COMPRESSED_DEBUG_ALGORITHM;
+#define DEFAULT_COMPRESSED_DEBUG_ALGORITHM_HELP \
+ DEFAULT_COMPRESSED_DEBUG_ALGORITHM
+#else
+#define DEFAULT_COMPRESSED_DEBUG_ALGORITHM_HELP COMPRESS_DEBUG_NONE
#endif
static void
@@ -256,7 +260,8 @@ Options:\n\
compress DWARF debug sections\n")),
fprintf (stream, _("\
Default: %s\n"),
- bfd_get_compression_algorithm_name (flag_compress_debug));
+ bfd_get_compression_algorithm_name
+ (DEFAULT_COMPRESSED_DEBUG_ALGORITHM_HELP));
fprintf (stream, _("\
--nocompress-debug-sections\n\
@@ -764,7 +769,7 @@ This program has absolutely no warranty.
#endif
}
else
- flag_compress_debug = COMPRESS_DEBUG_GABI_ZLIB;
+ flag_compress_debug = DEFAULT_COMPRESSED_DEBUG_ALGORITHM;
break;
case OPTION_NOCOMPRESS_DEBUG:
reply other threads:[~2023-02-24 13:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=fe210be6-76c8-155f-f151-15ce767b133f@suse.com \
--to=jbeulich@suse.com \
--cc=binutils@sourceware.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).