re PR debug/88389 (-flto -g -gsplit-dwarf is broken)
authorRichard Biener <rguenther@suse.de>
Tue, 19 Mar 2019 14:57:18 +0000 (14:57 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 19 Mar 2019 14:57:18 +0000 (14:57 +0000)
2019-03-19  Richard Biener  <rguenther@suse.de>

PR debug/88389
* opts.c (finish_options): Disable -gsplit-dwarf when doing LTO.

From-SVN: r269800

gcc/ChangeLog
gcc/opts.c

index bb627115a486e277118cb07e43bd723bd1104b32..94d1e4e950e3901612c58d585ab7de0c8b43958d 100644 (file)
@@ -1,3 +1,8 @@
+2019-03-19  Richard Biener  <rguenther@suse.de>
+
+       PR debug/88389
+       * opts.c (finish_options): Disable -gsplit-dwarf when doing LTO.
+
 2019-03-19  Jan Hubicka  <hubicka@ucw.cz>
 
        PR lto/87809
index 3161e0b67533545436116a79e40469aa81bfc4bd..02f6b4656e18be8cdee33a91103ccf25a5c936a2 100644 (file)
@@ -1077,6 +1077,14 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
                      "linker plugin");
          opts->x_flag_fat_lto_objects = 1;
        }
+
+      /* -gsplit-dwarf isn't compatible with LTO, see PR88389.  */
+      if (opts->x_dwarf_split_debug_info)
+       {
+         inform (loc, "%<-gsplit-dwarf%> is not supported with LTO,"
+                 " disabling");
+         opts->x_dwarf_split_debug_info = 0;
+       }
     }
 
   /* We initialize opts->x_flag_split_stack to -1 so that targets can set a