dwarf: Add -gdwarf{32,64} options
authorJakub Jelinek <jakub@redhat.com>
Fri, 4 Dec 2020 09:54:45 +0000 (10:54 +0100)
committerJakub Jelinek <jakub@redhat.com>
Fri, 4 Dec 2020 09:54:45 +0000 (10:54 +0100)
commit65312dfc64744405326a9f4c243f1b4c8f21de1b
treee9c5a9cae5d303385de694fe1b32e1c12a1e9fc0
parent485b40a5270cf50a7304a9e5cb8aff96bfa3d901
dwarf: Add -gdwarf{32,64} options

The following patch makes the choice between 32-bit and 64-bit DWARF formats
selectable by command line switch, rather than being hardcoded through
DWARF_OFFSET_SIZE macro.

The options themselves don't turn on debug info themselves, so one needs
to use -g -gdwarf64 or similar.

2020-12-04  Jakub Jelinek  <jakub@redhat.com>

* common.opt (-gdwarf32, -gdwarf64): New options.
* config/rs6000/rs6000.c (rs6000_option_override_internal): Default
dwarf_offset_size to 8 if not overridden from the command line.
* dwarf2out.c: Change all occurrences of DWARF_OFFSET_SIZE to
dwarf_offset_size.
* doc/invoke.texi (-gdwarf32, -gdwarf64): Document.
gcc/common.opt
gcc/config/rs6000/rs6000.c
gcc/doc/invoke.texi
gcc/dwarf2out.c