From dc0e0c6b2e70e9d2b3bbf02664b3f5a670c5c2be Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Thu, 12 Apr 2018 14:18:17 +0000 Subject: re PR target/85238 (lto-wrapper: fatal error: simple_object_copy_lto_debug_sections not implemented: Invalid argument on Cygwin) PR target/85238 * lto-wrapper.c (debug_objcopy): Open the files in binary mode. * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO mode for PE-COFF targets. * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare. (i386_pe_asm_lto_end): Likewise. * config/i386/cygming.h (TARGET_ASM_LTO_START): Define. (TARGET_ASM_LTO_END): Likewise. * config/i386/winnt.c (saved_debug_info_level): New static variable. (i386_pe_asm_lto_start): New function. (i386_pe_asm_lto_end): Likewise. From-SVN: r259347 --- gcc/dwarf2out.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gcc/dwarf2out.c') diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index f52ec45..620e669 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -31820,7 +31820,11 @@ dwarf2out_early_finish (const char *filename) early_dwarf_finished = true; /* Do not generate DWARF assembler now when not producing LTO bytecode. */ - if (!flag_generate_lto && !flag_generate_offload) + if ((!flag_generate_lto && !flag_generate_offload) + /* FIXME: Disable debug info generation for PE-COFF targets since the + copy_lto_debug_sections operation of the simple object support in + libiberty is not implemented for them yet. */ + || TARGET_PECOFF) return; /* Now as we are going to output for LTO initialize sections and labels -- cgit v1.1