re PR debug/88389 (-flto -g -gsplit-dwarf is broken)

2019-03-19  Richard Biener  <rguenther@suse.de>

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

From-SVN: r269800
This commit is contained in:
Richard Biener 2019-03-19 14:57:18 +00:00 committed by Richard Biener
parent 2ca6d1813e
commit 22fdf6af14
2 changed files with 13 additions and 0 deletions

View 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

View 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