@@ -274,12 +274,6 @@ gnat_post_options (const char **pfilename ATTRIBUTE_UNUSED)
if (!global_options_set.x_flag_diagnostics_show_caret)
global_dc->show_caret = false;
- /* Warn only if STABS is not the default: we don't want to emit a warning if
- the user did not use a -gstabs option. */
- if (PREFERRED_DEBUGGING_TYPE != DBX_DEBUG && write_symbols == DBX_DEBUG)
- warning (0, "STABS debugging information for Ada is obsolete and not "
- "supported anymore");
-
/* Copy global settings to local versions. */
gnat_encodings = global_options.x_gnat_encodings;
optimize = global_options.x_optimize;
@@ -900,34 +900,15 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define DEFAULT_GDB_EXTENSIONS 1
#endif
-/* If more than one debugging type is supported, you must define
- PREFERRED_DEBUGGING_TYPE to choose the default. */
-
-#if 1 < (defined (DBX_DEBUGGING_INFO) \
- + defined (DWARF2_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO) \
- + defined (VMS_DEBUGGING_INFO))
#ifndef PREFERRED_DEBUGGING_TYPE
-#error You must define PREFERRED_DEBUGGING_TYPE
-#endif /* no PREFERRED_DEBUGGING_TYPE */
-
-/* If only one debugging format is supported, define PREFERRED_DEBUGGING_TYPE
- here so other code needn't care. */
-#elif defined DBX_DEBUGGING_INFO
-#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
-
-#elif defined DWARF2_DEBUGGING_INFO || defined DWARF2_LINENO_DEBUGGING_INFO
+/* We default to DWARF2_DEBUGGING_INFO. */
+#if defined DWARF2_DEBUGGING_INFO || defined DWARF2_LINENO_DEBUGGING_INFO
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
-
-#elif defined VMS_DEBUGGING_INFO
-#define PREFERRED_DEBUGGING_TYPE VMS_AND_DWARF2_DEBUG
-
-#elif defined XCOFF_DEBUGGING_INFO
-#define PREFERRED_DEBUGGING_TYPE XCOFF_DEBUG
-
#else
-/* No debugging format is supported by this target. */
+/* DWARF is not supported by this target. */
#define PREFERRED_DEBUGGING_TYPE NO_DEBUG
#endif
+#endif
#ifndef FLOAT_LIB_COMPARE_RETURNS_BOOL
#define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) false
@@ -90,6 +90,9 @@ proc prune_gcc_output { text } {
# Ignore dsymutil warning (tool bug is actually linker)
regsub -all "(^|\n)\[^\n\]*could not find object file symbol for symbol\[^\n\]*" $text "" text
+ # Ignore stabs obsoletion warnings
+ regsub -all "(^|\n)\[^\n\]*warning: STABS debugging information is obsolete and not supported anymore\[^\n\]*" $text "" text
+
# If dg-enable-nn-line-numbers was provided, then obscure source-margin
# line numbers by converting them to "NN" form.
set text [maybe-handle-nn-line-numbers $text]
@@ -1452,6 +1452,11 @@ process_options (void)
&& ctf_debug_info_level == CTFINFO_LEVEL_NONE)
write_symbols = NO_DEBUG;
+ /* Warn if STABS debug gets enabled. */
+ if (write_symbols & DBX_DEBUG)
+ warning (0, "STABS debugging information is obsolete and not "
+ "supported anymore");
+
if (write_symbols == NO_DEBUG)
;
#if defined(DBX_DEBUGGING_INFO)