From: Richard Biener Date: Mon, 16 Feb 2015 14:53:23 +0000 (+0000) Subject: re PR lto/65015 (LTO produces randomly ordered debug information) X-Git-Tag: releases/gcc-5.1.0~938 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d4df88383829724b4bfcce7aff13ad8662e182a;p=thirdparty%2Fgcc.git re PR lto/65015 (LTO produces randomly ordered debug information) 2015-02-16 Richard Biener PR lto/65015 * varasm.c (default_file_start): For LTO produced units emit as file directive. From-SVN: r220735 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4062b065bad9..e049c99a7916 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-02-16 Richard Biener + + PR lto/65015 + * varasm.c (default_file_start): For LTO produced units + emit as file directive. + 2015-02-16 Richard Biener PR tree-optimization/63593 diff --git a/gcc/varasm.c b/gcc/varasm.c index 0211306dba26..748549937891 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -7043,7 +7043,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, ""); + else + output_file_directive (asm_out_file, main_input_filename); + } } /* This is a generic routine suitable for use as TARGET_ASM_FILE_END