Commit 824a2b3d by Olivier Hainque Committed by Olivier Hainque

vxworks.c (vxworks_override_options): Pick default dwarf version from macro…

vxworks.c (vxworks_override_options): Pick default dwarf version from macro value, VXWORKS_DWARF_VERSION_DEFAULT.

2017-11-22  Olivier Hainque  <hainque@adacore.com>

       * config/vxworks.c (vxworks_override_options): Pick default
	dwarf version from macro value, VXWORKS_DWARF_VERSION_DEFAULT.
       * config/vxworks.h: Define VXWORKS_DWARF_VERSION_DEFAULT and
       DWARF_GNAT_ENCODINGS_DEFAULT.
       * config/vxworksae.h: Likewise.

From-SVN: r255069
parent e54675bb
2017-11-22 Olivier Hainque <hainque@adacore.com>
* config/vxworks.c (vxworks_override_options): Pick default
dwarf version from macro value, VXWORKS_DWARF_VERSION_DEFAULT.
* config/vxworks.h: Define VXWORKS_DWARF_VERSION_DEFAULT and
DWARF_GNAT_ENCODINGS_DEFAULT.
* config/vxworksae.h: Likewise.
2017-11-22 Marc Glisse <marc.glisse@inria.fr>
PR tree-optimization/83104
......@@ -150,11 +150,13 @@ vxworks_override_options (void)
if (flag_pic && !TARGET_VXWORKS_RTP)
error ("PIC is only supported for RTPs");
/* Default to strict dwarf-2 to prevent potential difficulties observed with
non-gdb debuggers on extensions > 2. */
/* VxWorks comes with non-gdb debuggers which only support strict
dwarf up to certain version. Default dwarf control to friendly
values for these. */
if (!global_options_set.x_dwarf_strict)
dwarf_strict = 1;
if (!global_options_set.x_dwarf_version)
dwarf_version = 2;
dwarf_version = VXWORKS_DWARF_VERSION_DEFAULT;
}
......@@ -202,3 +202,13 @@ extern void vxworks_asm_out_destructor (rtx symbol, int priority);
/* The diab linker does not handle .gnu_attribute sections. */
#undef HAVE_AS_GNU_ATTRIBUTE
/* Default dwarf control values, for non-gdb debuggers that come with
VxWorks. */
#undef VXWORKS_DWARF_VERSION_DEFAULT
#define VXWORKS_DWARF_VERSION_DEFAULT (TARGET_VXWORKS7 ? 4 : 2)
#undef DWARF_GNAT_ENCODINGS_DEFAULT
#define DWARF_GNAT_ENCODINGS_DEFAULT \
(TARGET_VXWORKS7 ? DWARF_GNAT_ENCODINGS_MINIMAL : DWARF_GNAT_ENCODINGS_ALL)
......@@ -75,3 +75,12 @@ along with GCC; see the file COPYING3. If not see
#undef VXWORKS_OVERRIDE_OPTIONS
#define VXWORKS_OVERRIDE_OPTIONS vxworks_override_options ()
extern void vxworks_override_options (void);
/* Default dwarf control values, for non-gdb debuggers that come with
VxWorks. */
#undef VXWORKS_DWARF_VERSION_DEFAULT
#define VXWORKS_DWARF_VERSION_DEFAULT 2
#undef DWARF_GNAT_ENCODINGS_DEFAULT
#define DWARF_GNAT_ENCODINGS_DEFAULT DWARF_GNAT_ENCODINGS_ALL
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment