public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb] gas: default .debug section compression method adjustments
@ 2023-03-03  7:46 Jan Beulich
  0 siblings, 0 replies; only message in thread
From: Jan Beulich @ 2023-03-03  7:46 UTC (permalink / raw)
  To: bfd-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e9339bee560db6893f2d08c1e54a3eb9f775fd1d

commit e9339bee560db6893f2d08c1e54a3eb9f775fd1d
Author: Jan Beulich <jbeulich@suse.com>
Date:   Fri Mar 3 08:45:54 2023 +0100

    gas: default .debug section compression method adjustments
    
    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.

Diff:
---
 gas/as.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/gas/as.c b/gas/as.c
index 598bfd56cf5..62f32fc865a 100644
--- 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.\n"));
 #endif
 	    }
 	  else
-	    flag_compress_debug = COMPRESS_DEBUG_GABI_ZLIB;
+	    flag_compress_debug = DEFAULT_COMPRESSED_DEBUG_ALGORITHM;
 	  break;
 
 	case OPTION_NOCOMPRESS_DEBUG:

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-03  7:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-03  7:46 [binutils-gdb] gas: default .debug section compression method adjustments Jan Beulich

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).