]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Default to dwarf version 4 on hppa64-hpux
authorJohn David Anglin <danglin@gcc.gnu.org>
Fri, 1 Oct 2021 17:35:45 +0000 (17:35 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Fri, 1 Oct 2021 17:35:45 +0000 (17:35 +0000)
2021-10-01  John David Anglin  <danglin@gcc.gnu.org>

gcc/ChangeLog:

PR debug/102373
* config/pa/pa.c (pa_option_override): Default to dwarf version 4
on hppa64-hpux.

gcc/config/pa/pa.c

index 46194ba395d1980db3c40b400c0b6a77bf04f218..87802ece7b9375ee6743bde5b7a15d68d6faed96 100644 (file)
@@ -541,6 +541,16 @@ pa_option_override (void)
       write_symbols = NO_DEBUG;
     }
 
+  if (TARGET_64BIT && TARGET_HPUX)
+    {
+      /* DWARF5 is not supported by gdb.  Don't emit DWARF5 unless
+        specifically selected.  */
+      if (!global_options_set.x_dwarf_strict)
+       dwarf_strict = 1;
+      if (!global_options_set.x_dwarf_version)
+       dwarf_version = 4;
+    }
+
   /* We only support the "big PIC" model now.  And we always generate PIC
      code when in 64bit mode.  */
   if (flag_pic == 1 || TARGET_64BIT)