sol2-sld.h (LINKER_DOES_NOT_WORK_WITH_DWARF2): Define this new symbol.
authorPaul Eggert <eggert@twinsun.com>
Sun, 22 Feb 1998 19:09:18 +0000 (19:09 +0000)
committerJeff Law <law@gcc.gnu.org>
Sun, 22 Feb 1998 19:09:18 +0000 (12:09 -0700)
d
* config/sparc/sol2-sld.h (LINKER_DOES_NOT_WORK_WITH_DWARF2):
Define this new symbol.
(DWARF2_DEBUGGING_INFO, DWARF_DEBUGGING_INFO): Do not #undef.
* toplev.c (main): Do not default to DWARF2_DEBUG with -ggdb if
LINKER_DOES_NOT_WORK_WITH_DWARF2 is defined.

From-SVN: r18179

gcc/ChangeLog
gcc/tm.texi
gcc/toplev.c

index 1779253..6841743 100644 (file)
@@ -1,3 +1,11 @@
+1998-02-22  Paul Eggert  <eggert@twinsun.com>
+
+       * config/sparc/sol2-sld.h (LINKER_DOES_NOT_WORK_WITH_DWARF2):
+       Define this new symbol.
+       (DWARF2_DEBUGGING_INFO, DWARF_DEBUGGING_INFO): Do not #undef.
+       * toplev.c (main): Do not default to DWARF2_DEBUG with -ggdb if
+       LINKER_DOES_NOT_WORK_WITH_DWARF2 is defined.
+
 Sun Feb 22 20:07:32 1998  Jim Wilson  <wilson@cygnus.com>
 
        * iris5.h (DWARF2_UNWIND_INFO): Define to 0.
index 168ee40..aad6506 100644 (file)
@@ -6261,6 +6261,14 @@ output.  Currently, the allowable values are @code{DBX_DEBUG},
 @code{SDB_DEBUG}, @code{DWARF_DEBUG}, @code{DWARF2_DEBUG}, and
 @code{XCOFF_DEBUG}.
 
+If the user specifies @samp{-ggdb}, then there are two special cases
+where this macro's value is ignored and another value is substituted.
+If @code{DWARF2_DEBUGGING_INFO} is defined and
+@code{LINKER_DOES_NOT_WORK_WITH_DWARF2} is not defined, then
+@code{DWARF2_DEBUG} is substituted.  Otherwise, if
+@code{DBX_DEBUGGING_INFO} is defined, then @code{DBX_DEBUG} is
+substituted.
+
 The value of this macro only affects the default debugging output; the
 user can always get a specific type of output by using @samp{-gstabs},
 @samp{-gcoff}, @samp{-gdwarf-1}, @samp{-gdwarf-2}, or @samp{-gxcoff}.
@@ -6590,6 +6598,13 @@ define @code{INCOMING_RETURN_ADDR_RTX} and either set
 prologue, or call @code{dwarf2out_def_cfa} and @code{dwarf2out_reg_save}
 as appropriate from @code{FUNCTION_PROLOGUE} if you don't.
 
+@findex LINKER_DOES_NOT_WORK_WITH_DWARF2
+@item LINKER_DOES_NOT_WORK_WITH_DWARF2
+Define this macro if the linker does not work with dwarf version 2.
+Normally, if the user specifies only @samp{-ggdb}, then GNU CC will use
+dwarf version 2 if available; this macro causes GNU CC to use the format
+specified by @code{PREFERRED_DEBUGGING_TYPE} instead.
+
 @findex PUT_SDB_@dots{}
 @item PUT_SDB_@dots{}
 Define these macros to override the assembler syntax for the special
index d3a3287..ba3bf51 100644 (file)
@@ -4199,7 +4199,7 @@ main (argc, argv, envp)
                          type = PREFERRED_DEBUGGING_TYPE;
                          if (len > 1 && strncmp (str, "ggdb", len) == 0)
                            {
-#ifdef DWARF2_DEBUGGING_INFO
+#if defined (DWARF2_DEBUGGING_INFO) && !defined (LINKER_DOES_NOT_WORK_WITH_DWARF2)
                              type = DWARF2_DEBUG;
 #else
 #ifdef DBX_DEBUGGING_INFO