public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: John David Anglin <dave.anglin@bell.net>
To: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: [committed] hppa: Default to dwarf version 4 on hppa64-hpux
Date: Fri, 1 Oct 2021 13:48:15 -0400	[thread overview]
Message-ID: <0a9f9f34-93ed-54ca-b466-50d053f21ab0@bell.net> (raw)

DWARF5 is not supported by gdb on hpux, so we need to to limit version to 4.

Tested on hppa64-hp-hpux11.11.  Committed to trunk and gcc-11.

Dave
---

Default to dwarf version 4 on hppa64-hpux

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.

diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index 06143023b46..5b3ffd48f4e 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -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)


                 reply	other threads:[~2021-10-01 17:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0a9f9f34-93ed-54ca-b466-50d053f21ab0@bell.net \
    --to=dave.anglin@bell.net \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).