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.
#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
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\
#endif
}
else
- flag_compress_debug = COMPRESS_DEBUG_GABI_ZLIB;
+ flag_compress_debug = DEFAULT_COMPRESSED_DEBUG_ALGORITHM;
break;
case OPTION_NOCOMPRESS_DEBUG: