summaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authorOlivier Hainque <hainque@adacore.com>2012-04-24 20:34:30 +0000
committerOlivier Hainque <hainque@gcc.gnu.org>2012-04-24 20:34:30 +0000
commit7a9cf7e9c3c4c5b1b27fbf29206bcd3ade31e86f (patch)
tree9284abef1d612ed53ee27cb059198eb1351edd47 /gcc/toplev.c
parentbc9201591d2d677dc21819ff8f11de18983f1f61 (diff)
downloadgcc-7a9cf7e9c3c4c5b1b27fbf29206bcd3ade31e86f.tar.gz
common.opt (gdwarf-): Initialize dwarf_version to -1 instead of 2.
* common.opt (gdwarf-): Initialize dwarf_version to -1 instead of 2. * toplev.c (process_options): Default to dwarf_version 2. * config/vxworks.c (vxworks_override_options): Default to strict-dwarf and dwarf_version 2. From-SVN: r186783
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 3d9e1626b80..fcfdba2aefb 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -1380,6 +1380,10 @@ process_options (void)
if (dwarf_strict < 0)
dwarf_strict = 0;
+ /* And select a default dwarf level. */
+ if (dwarf_version < 0)
+ dwarf_version = 2;
+
/* A lot of code assumes write_symbols == NO_DEBUG if the debugging
level is 0. */
if (debug_info_level == DINFO_LEVEL_NONE)