]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
bootstrap/105551 - restore nvptx build
authorRichard Biener <rguenther@suse.de>
Wed, 11 May 2022 08:47:34 +0000 (10:47 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 11 May 2022 08:50:11 +0000 (10:50 +0200)
The following makes sure to disable var-tracking if only
dwarf2-line debuginfo is present.

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

index cfac72a2eb02f0e923454ee95ad31510e84010c2..f0c5c4db95571b46a09096734c29164bdf69a10b 100644 (file)
@@ -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