diff options
author | Richard Biener <rguenther@suse.de> | 2021-09-10 11:25:21 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2021-10-15 09:34:07 +0200 |
commit | 7bfe7d634f60b0a9ba1a456be59a1ee88abf112e (patch) | |
tree | 50172e06f305f746cddd0fa1445a52db391fa249 /gcc/defaults.h | |
parent | 17ffb7a562061c54eb6eb9863271524568761cf6 (diff) | |
download | gcc-7bfe7d634f60b0a9ba1a456be59a1ee88abf112e.zip gcc-7bfe7d634f60b0a9ba1a456be59a1ee88abf112e.tar.gz gcc-7bfe7d634f60b0a9ba1a456be59a1ee88abf112e.tar.bz2 |
Always default to DWARF2_DEBUG if not specified, warn about deprecated STABS
This makes defaults.h choose DWARF2_DEBUG if PREFERRED_DEBUGGING_TYPE
is not specified by the target and errors out if DWARF DWARF is not supported.
It also makes us warn when STABS is enabled but not the preferred
debugging type and removes the corresponding diagnostic from the Ada frontend.
The warnings are pruned from the testsuite output via prune_gcc_output.
The following target configurations now explicitely default to STABS:
pdp11-*-* pdp11 is a.out, dwarf support is difficult
hppa[12]*-*-hpux10* does not support DWARF
hppa[12]*-*-hpux11* likewise
note that the hppa configs have been deprecated.
Targets with DWARF support will now see
> ./cc1 -quiet t.c -gstabs
t.c: warning: STABS debugging information is obsolete and not supported anymore
that is, -gstabs will still generate STABS but use will be diagnosed
on targets where DWARF is available.
I have built all targets from contrib/config-list.mk to make sure we
don't run into the #error and the following makes the STABS usage
explicit for pdp11 and hppa with SOM.
This completes the series of deprecating STABS for GCC 12.
2021-09-21 Richard Biener <rguenther@suse.de>
gcc/
* defaults.h (PREFERRED_DEBUGGING_TYPE): Choose DWARF2_DEBUG
when not set.
* toplev.c (process_options): Warn when STABS debugging is
enabled but not the preferred format.
* config/pa/som.h (PREFERRED_DEBUGGING_TYPE): Define to
DBX_DEBUG.
* config/pdp11/pdp11.h (PREFERRED_DEBUGGING_TYPE): Likewise.
gcc/ada/
* gcc-interface/misc.c (gnat_post_options): Do not warn
about DBX_DEBUG use here.
gcc/testsuite/
* lib/prune.exp: Prune STABS obsoletion message.
Diffstat (limited to 'gcc/defaults.h')
-rw-r--r-- | gcc/defaults.h | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/gcc/defaults.h b/gcc/defaults.h index 04d9bb1..bb68d0d 100644 --- a/gcc/defaults.h +++ b/gcc/defaults.h @@ -899,33 +899,14 @@ 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)) +/* Default to DWARF2_DEBUGGING_INFO. Legacy targets can choose different + by defining PREFERRED_DEBUGGING_TYPE. */ #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 +#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. */ -#define PREFERRED_DEBUGGING_TYPE NO_DEBUG +#error You must define PREFERRED_DEBUGGING_TYPE if DWARF is not supported +#endif #endif #ifndef FLOAT_LIB_COMPARE_RETURNS_BOOL |