+2015-10-19 Nick Clifton <nickc@redhat.com>
+
+ PR gas/19109
+ * configure.ac: Add option --enable-compressed-debug-sections.
+ This sets the default behaviour for compressing debug sections.
+ * as.c (flag_compress_debug): Define and initialise to
+ COMPRESS_DEBUG_GABI_ZLIB if DEFAULT_COMPRESS_DEBUG is set.
+ (show_usage): Indicate whether --no-compress-debug-sections
+ or --compress-debug-sections is the default.
+ * config/tc-i386.c (flag_compress_debug): Delete definition.
+ * doc/as.texinfo (--nocompress-debug-sectionas): Update
+ description.
+ * NEWS: Announce the new feature.
+ * config.in: Regenerate.
+ * configure: Regenerate.
+
2015-10-12 Nick Clifton <nickc@redhat.com>
* config/tc-msp430.c (msp430_mcu_names): Rename to
-*- text -*-
+* Add a configure option --enable-compressed-debug-sections=[yes|no] to decide
+ whether DWARF debug sections should be compressed by default.
+
* Add support for the ARC EM/HS, and ARC600/700 architectures. Remove
assembler support for Argonaut RISC architectures.
VERSION, TARGET_ALIAS, BFD_VERSION_STRING);
}
+#ifdef DEFAULT_FLAG_COMPRESS_DEBUG
+enum compressed_debug_section_type flag_compress_debug
+ = COMPRESS_DEBUG_GABI_ZLIB;
+#endif
+
static void
show_usage (FILE * stream)
{
fprintf (stream, _("\
--alternate initially turn on alternate macro syntax\n"));
+#ifdef DEFAULT_FLAG_COMPRESS_DEBUG
fprintf (stream, _("\
--compress-debug-sections[={none|zlib|zlib-gnu|zlib-gabi}]\n\
- compress DWARF debug sections using zlib\n"));
+ compress DWARF debug sections using zlib [default]\n"));
fprintf (stream, _("\
--nocompress-debug-sections\n\
don't compress DWARF debug sections\n"));
+#else
+ fprintf (stream, _("\
+ --compress-debug-sections[={none|zlib|zlib-gnu|zlib-gabi}]\n\
+ compress DWARF debug sections using zlib\n"));
+ fprintf (stream, _("\
+ --nocompress-debug-sections\n\
+ don't compress DWARF debug sections [default]\n"));
+#endif
fprintf (stream, _("\
-D produce assembler debugging messages\n"));
fprintf (stream, _("\
/* Default emulation. */
#undef DEFAULT_EMULATION
+/* Define if you want compressed debug sections by default. */
+#undef DEFAULT_FLAG_COMPRESS_DEBUG
+
/* Supported emulations. */
#undef EMULATIONS
#include "elf/x86-64.h"
#include "opcodes/i386-init.h"
-#ifdef TE_LINUX
-/* Default to compress debug sections for Linux. */
-enum compressed_debug_section_type flag_compress_debug
- = COMPRESS_DEBUG_GABI_ZLIB;
-#endif
-
#ifndef REGISTER_WARNINGS
#define REGISTER_WARNINGS 1
#endif
enable_largefile
enable_targets
enable_checking
+enable_compressed_debug_sections
enable_werror
enable_build_warnings
enable_nls
--disable-largefile omit support for large files
--enable-targets alternative target configurations besides the primary
--enable-checking enable run-time checks
+ --enable-compressed-debug-sections compress debug sections by default
--enable-werror treat compile warnings as errors
--enable-build-warnings enable build-time compiler warnings
--disable-nls do not use Native Language Support
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10972 "configure"
+#line 10974 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11078 "configure"
+#line 11080 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
fi
+# PR gas/19109
+# Decide the default method for compressing debug sections.
+ac_default_compressed_debug_sections=unset
+# Provide a configure time option to override our default.
+# Check whether --enable-compressed_debug_sections was given.
+if test "${enable_compressed_debug_sections+set}" = set; then :
+ enableval=$enable_compressed_debug_sections; case "${enableval}" in
+ yes) ac_default_compressed_debug_sections=yes ;;
+ no) ac_default_compressed_debug_sections=no ;;
+ *) ac_default_compressed_debug_sections=unset ;;
+esac
+fi
+
using_cgen=no
done
+if test x$ac_default_compressed_debug_sections == xyes ; then
+
+$as_echo "#define DEFAULT_FLAG_COMPRESS_DEBUG 1" >>confdefs.h
+
+fi
+
# Turn on all targets if possible
if test ${all_targets} = "yes"; then
case ${target_cpu_type} in
AC_DEFINE(ENABLE_CHECKING, 1, [Define if you want run-time sanity checks.])
fi
+# PR gas/19109
+# Decide the default method for compressing debug sections.
+ac_default_compressed_debug_sections=unset
+# Provide a configure time option to override our default.
+AC_ARG_ENABLE(compressed_debug_sections,
+[ --enable-compressed-debug-sections compress debug sections by default],
+[case "${enableval}" in
+ yes) ac_default_compressed_debug_sections=yes ;;
+ no) ac_default_compressed_debug_sections=no ;;
+ *) ac_default_compressed_debug_sections=unset ;;
+esac])dnl
+
using_cgen=no
AM_BINUTILS_WARNINGS
done
+if test x$ac_default_compressed_debug_sections == xyes ; then
+ AC_DEFINE(DEFAULT_FLAG_COMPRESS_DEBUG, 1, [Define if you want compressed debug sections by default.])
+fi
+
# Turn on all targets if possible
if test ${all_targets} = "yes"; then
case ${target_cpu_type} in
@end ifset
@item --nocompress-debug-sections
-Do not compress DWARF debug sections. This is the default.
+Do not compress DWARF debug sections. This is usually the default for all
+targets except the x86/x86_64, but a configure time option can be used to
+override this.
@item -D
Ignored. This option is accepted for script compatibility with calls to