https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82005

--- Comment #26 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to rguent...@suse.de from comment #25)
> On February 13, 2018 5:35:22 PM GMT+01:00, simon at pushface dot org
> <gcc-bugzi...@gcc.gnu.org> wrote:
> >https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82005
> >
> >--- Comment #24 from simon at pushface dot org ---
> >(In reply to Richard Biener from comment #22)
> >
> >>                                    These are already implemented
> >> by darwin in darwin_asm_lto_{start,end} where it could simply
> >temporarily
> >> adjust debug_info_level to DINFO_LEVEL_NONE.  Like with the
> >following.
> >
> >I may be missing something, but that patch doesn’t actually adjust 
> >debug_info_level?
> 
> Whoops, sorry. Of course. Add debug_info_level = DINFO_LEVEL_NONE ; or how
> it is spelled.

For completeness here is a fixed diff:

Index: gcc/config/darwin.c
===================================================================
--- gcc/config/darwin.c (revision 257620)
+++ gcc/config/darwin.c (working copy)
@@ -1933,6 +1933,7 @@ static GTY (()) vec<darwin_lto_section_e
    in darwin_end_file.  */
 static FILE *lto_asm_out_file, *saved_asm_out_file;
 static char *lto_asm_out_name;
+static enum debug_info_levels saved_debug_info_level;

 /* Prepare asm_out_file for LTO output.  For darwin, this means hiding
    asm_out_file and switching to an alternative output file.  */
@@ -1941,6 +1942,8 @@ darwin_asm_lto_start (void)
 {
   gcc_assert (! saved_asm_out_file);
   saved_asm_out_file = asm_out_file;
+  saved_debug_info_level = debug_info_level;
+  debug_info_level = DINFO_LEVEL_NONE;
   if (! lto_asm_out_name)
     lto_asm_out_name = make_temp_file (".lto.s");
   lto_asm_out_file = fopen (lto_asm_out_name, "a");
@@ -1959,6 +1962,7 @@ darwin_asm_lto_end (void)
   fclose (lto_asm_out_file);
   asm_out_file = saved_asm_out_file;
   saved_asm_out_file = NULL;
+  debug_info_level = saved_debug_info_level;
 }

 static void

Reply via email to