* as.c (show_usage): Don't list --compress-debug-sections if zlib not
authorCary Coutant <ccoutant@google.com>
Mon, 9 Aug 2010 18:08:18 +0000 (18:08 +0000)
committerCary Coutant <ccoutant@google.com>
Mon, 9 Aug 2010 18:08:18 +0000 (18:08 +0000)
installed.
(main): Warn if --compress-debug-sections requested and zlib not
installed.
* doc/as.texinfo: Add --compress-debug-sections,
--nocompress-debug-sections.

gas/ChangeLog
gas/as.c
gas/doc/as.texinfo

index 534c956e17d1ccf9ac0ae246b5764c4347f35e61..7c65f71ba006256c68af771772c7e06253e4deb5 100644 (file)
@@ -1,3 +1,12 @@
+2010-08-09  Cary Coutant  <ccoutant@google.com>
+
+       * as.c (show_usage): Don't list --compress-debug-sections if zlib not
+       installed.
+       (main): Warn if --compress-debug-sections requested and zlib not
+       installed.
+       * doc/as.texinfo: Add --compress-debug-sections,
+       --nocompress-debug-sections.
+
 2010-08-06  H.J. Lu  <hongjiu.lu@intel.com>
 
        * config/tc-i386.c (set_cpu_arch): Re-indent.
index 45acbaa456cbaf887637bc0ac7cab0b4b9923ca3..d9aa6e276f267fa992c47d3df7049143e4cda3dc 100644 (file)
--- a/gas/as.c
+++ b/gas/as.c
@@ -245,12 +245,14 @@ Options:\n\
 
   fprintf (stream, _("\
   --alternate             initially turn on alternate macro syntax\n"));
+#ifdef HAVE_ZLIB_H
   fprintf (stream, _("\
   --compress-debug-sections\n\
                           compress DWARF debug sections using zlib\n"));
   fprintf (stream, _("\
   --nocompress-debug-sections\n\
                           don't compress DWARF debug sections\n"));
+#endif /* HAVE_ZLIB_H */
   fprintf (stream, _("\
   -D                      produce assembler debugging messages\n"));
   fprintf (stream, _("\
@@ -646,7 +648,11 @@ This program has absolutely no warranty.\n"));
          exit (EXIT_SUCCESS);
 
        case OPTION_COMPRESS_DEBUG:
+#ifdef HAVE_ZLIB_H
          flag_compress_debug = 1;
+#else
+         as_warn (_("cannot compress debug sections (zlib not installed)"));
+#endif /* HAVE_ZLIB_H */
          break;
 
        case OPTION_NOCOMPRESS_DEBUG:
index a8327b882cc96217ca6bdd6bb0d14f433342ebf8..f17c59169f464e640d91bf0c21a54705bfac34c0 100644 (file)
@@ -232,6 +232,7 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}.
 @smallexample
 @c man begin SYNOPSIS
 @value{AS} [@b{-a}[@b{cdghlns}][=@var{file}]] [@b{--alternate}] [@b{-D}]
+ [@b{--compress-debug-sections}]  [@b{--nocompress-debug-sections}]
  [@b{--debug-prefix-map} @var{old}=@var{new}]
  [@b{--defsym} @var{sym}=@var{val}] [@b{-f}] [@b{-g}] [@b{--gstabs}]
  [@b{--gstabs+}] [@b{--gdwarf-2}] [@b{--help}] [@b{-I} @var{dir}] [@b{-J}]
@@ -552,6 +553,14 @@ Begin in alternate macro mode.
 @xref{Altmacro,,@code{.altmacro}}.
 @end ifclear
 
+@item --compress-debug-sections
+Compress DWARF debug sections using zlib.  The debug sections are renamed
+to begin with @samp{.zdebug}, and the resulting object file may not be
+compatible with older linkers and object file utilities.
+
+@item --nocompress-debug-sections
+Do not compress DWARF debug sections.  This is the default.
+
 @item -D
 Ignored.  This option is accepted for script compatibility with calls to
 other assemblers.
This page took 0.031613 seconds and 4 git commands to generate.