public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <rguenther@suse.de>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] bootstrap/105551 - restore nvptx build
Date: Wed, 11 May 2022 10:49:46 +0200 (CEST)	[thread overview]
Message-ID: <20220511084947.47F5D139F9@imap2.suse-dmz.suse.de> (raw)

The following makes sure to disable var-tracking if only
dwarf2-line debuginfo is present.

Bootstrapped on x86_64-unknown-linux-gnu, and nvptx by Tobias, pushed.

2022-05-11  Richard Biener  <rguenther@suse.de>

	PR bootstrap/105551
	* opts.cc (finish_options): Also disable var-tracking if
	!DWARF2_DEBUGGING_INFO.
---
 gcc/opts.cc | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/gcc/opts.cc b/gcc/opts.cc
index cfac72a2eb0..f0c5c4db955 100644
--- a/gcc/opts.cc
+++ b/gcc/opts.cc
@@ -1334,11 +1334,15 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
 	      || opts->x_flag_selective_scheduling2));
 
   /* We know which debug output will be used so we can set flag_var_tracking
-     and flag_var_tracking_uninit if the user has not specified them.  Note
-     we have not yet initialized debug_hooks so we might uselessly run
-     var-tracking on targets without var_location debug hook support.  */
+     and flag_var_tracking_uninit if the user has not specified them.  */
   if (opts->x_debug_info_level < DINFO_LEVEL_NORMAL
-      || !dwarf_debuginfo_p (opts))
+      || !dwarf_debuginfo_p (opts)
+      /* We have not yet initialized debug hooks so match that to check
+	 whether we're only doing DWARF2_LINENO_DEBUGGING_INFO.  */
+#ifndef DWARF2_DEBUGGING_INFO
+      || true
+#endif
+     )
     {
       if ((opts_set->x_flag_var_tracking && opts->x_flag_var_tracking == 1)
 	  || (opts_set->x_flag_var_tracking_uninit
-- 
2.35.3

                 reply	other threads:[~2022-05-11  8:49 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=20220511084947.47F5D139F9@imap2.suse-dmz.suse.de \
    --to=rguenther@suse.de \
    --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).