From 22fdf6af1487e8920c6bd77c4c4f64ec805f21e1 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 19 Mar 2019 14:57:18 +0000 Subject: [PATCH] re PR debug/88389 (-flto -g -gsplit-dwarf is broken) 2019-03-19 Richard Biener PR debug/88389 * opts.c (finish_options): Disable -gsplit-dwarf when doing LTO. From-SVN: r269800 --- gcc/ChangeLog | 5 +++++ gcc/opts.c | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bb627115a48..94d1e4e950e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-03-19 Richard Biener + + PR debug/88389 + * opts.c (finish_options): Disable -gsplit-dwarf when doing LTO. + 2019-03-19 Jan Hubicka PR lto/87809 diff --git a/gcc/opts.c b/gcc/opts.c index 3161e0b6753..02f6b4656e1 100644 --- a/gcc/opts.c +++ b/gcc/opts.c @@ -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 -- 2.30.2