summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2015-02-24 09:09:11 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2015-02-24 09:09:11 +0000
commit7ec7cb76dc9ca7c58b962833d19f26ff35d54c9e (patch)
treef1d8d0ed231a872e3c345843e3ced5afde3cd63d
parent08b2dbc4443eee071cbff0168a6c436316ecdda1 (diff)
downloadgcc-7ec7cb76dc9ca7c58b962833d19f26ff35d54c9e.tar.gz
2015-02-24 Richard Biener <rguenther@suse.de>
Backport from mainline 2015-02-11 Richard Biener <rguenther@suse.de> PR lto/65015 * dwarf2out.c (gen_producer_string): Drop -fltrans-output-list and -fresolution. 2015-02-13 Richard Biener <rguenther@suse.de> PR lto/65015 * dwarf2out.c (dwarf2out_finish): Use <artificial> as DW_AT_name for LTO produced CUs. 2015-02-16 Richard Biener <rguenther@suse.de> PR lto/65015 * varasm.c (default_file_start): For LTO produced units emit <artificial> as file directive. 2015-01-17 Jan Kratochvil <jan.kratochvil@redhat.com> * dwarf2out.c (gen_producer_string): Ignore also OPT_fpreprocessed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@220935 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog25
-rw-r--r--gcc/dwarf2out.c12
-rw-r--r--gcc/varasm.c8
3 files changed, 42 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 72b3137eb66..47e91a13528 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,28 @@
+2015-02-24 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2015-02-11 Richard Biener <rguenther@suse.de>
+
+ PR lto/65015
+ * dwarf2out.c (gen_producer_string): Drop -fltrans-output-list
+ and -fresolution.
+
+ 2015-02-13 Richard Biener <rguenther@suse.de>
+
+ PR lto/65015
+ * dwarf2out.c (dwarf2out_finish): Use <artificial> as DW_AT_name
+ for LTO produced CUs.
+
+ 2015-02-16 Richard Biener <rguenther@suse.de>
+
+ PR lto/65015
+ * varasm.c (default_file_start): For LTO produced units
+ emit <artificial> as file directive.
+
+ 2015-01-17 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * dwarf2out.c (gen_producer_string): Ignore also OPT_fpreprocessed.
+
2015-02-23 Oleg Endo <olegendo@gcc.gnu.org>
Backport from mainline
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 23319d0d17d..c7d7181baed 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -19196,6 +19196,9 @@ gen_producer_string (void)
case OPT__sysroot_:
case OPT_nostdinc:
case OPT_nostdinc__:
+ case OPT_fpreprocessed:
+ case OPT_fltrans_output_list_:
+ case OPT_fresolution_:
/* Ignore these. */
continue;
default:
@@ -23984,8 +23987,13 @@ dwarf2out_finish (const char *filename)
gen_remaining_tmpl_value_param_die_attribute ();
/* Add the name for the main input file now. We delayed this from
- dwarf2out_init to avoid complications with PCH. */
- add_name_attribute (comp_unit_die (), remap_debug_filename (filename));
+ dwarf2out_init to avoid complications with PCH.
+ For LTO produced units use a fixed artificial name to avoid
+ leaking tempfile names into the dwarf. */
+ if (!in_lto_p)
+ add_name_attribute (comp_unit_die (), remap_debug_filename (filename));
+ else
+ add_name_attribute (comp_unit_die (), "<artificial>");
if (!IS_ABSOLUTE_PATH (filename) || targetm.force_at_comp_dir)
add_comp_dir_attribute (comp_unit_die ());
else if (get_AT (comp_unit_die (), DW_AT_comp_dir) == NULL)
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 5e590f713a0..9d6f547b6f4 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -6957,7 +6957,13 @@ default_file_start (void)
fputs (ASM_APP_OFF, asm_out_file);
if (targetm.asm_file_start_file_directive)
- output_file_directive (asm_out_file, main_input_filename);
+ {
+ /* LTO produced units have no meaningful main_input_filename. */
+ if (in_lto_p)
+ output_file_directive (asm_out_file, "<artificial>");
+ else
+ output_file_directive (asm_out_file, main_input_filename);
+ }
}
/* This is a generic routine suitable for use as TARGET_ASM_FILE_END