[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc
Subject:    Re: Heads-Up: early LTO debug to land, breaking Mach-O / [X]COFF
From:       Richard Biener <rguenther () suse ! de>
Date:       2017-08-24 9:18:32
Message-ID: alpine.LSU.2.20.1708241117040.14191 () zhemvz ! fhfr ! qr
[Download RAW message or body]

On Wed, 23 Aug 2017, Rainer Orth wrote:

> Hi Richard,
> 
> > On Fri, 12 May 2017, Richard Biener wrote:
> > 
> > > 
> > > This is a heads-up that I am in the process of implementing the last
> > > of Jasons review comments on the dwarf2out parts of early LTO debug
> > > support.  I hope to post final patches early next week after thoroughly
> > > re-testing everything.
> > > 
> > > Note that Mach-O and [X]COFF support in the simple-object machinery
> > > is still missing for the early LTO debug feature so I am going to
> > > break LTOing with DWARF debuginfo on Darwin and Windows (CCing
> > > maintainers).  Mach-O support has been worked on a bit by Iain
> > > and myself but the simple-object piece is still missing.
> > > A workaround is to use stabs on these targets with LTO.
> 
> unfortunately, the patch not only broke LTO on Darwin, but bootstrap
> completely (seen on x86_64-apple-darwin17.0.0):
> 
> /var/gcc/src/hg/trunk/local/gcc/dwarf2out.c: In function 'void \
>                 init_sections_and_labels(bool)':
> /var/gcc/src/hg/trunk/local/gcc/dwarf2out.c:27184:1: error: '%ld' directive writing \
> between 1 and 10 bytes into a region of size 9 [-Werror=format-overflow=] \
> init_sections_and_labels (bool early_lto_debug) ^~~~~~~~~~~~~~~~~~~~~~~~
> /var/gcc/src/hg/trunk/local/gcc/dwarf2out.c:27184:1: note: directive argument in \
> the range [0, 4294967295] In file included from ./tm.h:21:0,
> from /var/gcc/src/hg/trunk/local/gcc/target.h:52,
> from /var/gcc/src/hg/trunk/local/gcc/dwarf2out.c:61:
> /var/gcc/src/hg/trunk/local/gcc/config/darwin.h:759:15: note: 'sprintf' output \
> between 23 and 32 bytes into a destination of size 30 sprintf (LABEL, "*%s%ld", \
> PREFIX, (long)(NUM)); \ ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /var/gcc/src/hg/trunk/local/gcc/dwarf2out.c:27210:4: note: in expansion of macro \
> 'ASM_GENERATE_INTERNAL_LABEL' ASM_GENERATE_INTERNAL_LABEL \
> (debug_skeleton_line_section_label, ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> /var/gcc/src/hg/trunk/local/gcc/dwarf2out.c:27184:1: error: '%ld' directive writing \
> between 1 and 10 bytes into a region of size 7 [-Werror=format-overflow=] \
> init_sections_and_labels (bool early_lto_debug) ^~~~~~~~~~~~~~~~~~~~~~~~
> /var/gcc/src/hg/trunk/local/gcc/dwarf2out.c:27184:1: note: directive argument in \
> the range [0, 4294967295] In file included from ./tm.h:21:0,
> from /var/gcc/src/hg/trunk/local/gcc/target.h:52,
> from /var/gcc/src/hg/trunk/local/gcc/dwarf2out.c:61:
> /var/gcc/src/hg/trunk/local/gcc/config/darwin.h:759:15: note: 'sprintf' output \
> between 25 and 34 bytes into a destination of size 30 sprintf (LABEL, "*%s%ld", \
> PREFIX, (long)(NUM)); \ ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /var/gcc/src/hg/trunk/local/gcc/dwarf2out.c:27229:4: note: in expansion of macro \
> 'ASM_GENERATE_INTERNAL_LABEL' ASM_GENERATE_INTERNAL_LABEL \
> (debug_skeleton_abbrev_section_label, ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> /var/gcc/src/hg/trunk/local/gcc/dwarf2out.c:27184:1: error: '%ld' directive writing \
> between 1 and 10 bytes into a region of size 9 [-Werror=format-overflow=] \
> init_sections_and_labels (bool early_lto_debug) ^~~~~~~~~~~~~~~~~~~~~~~~
> /var/gcc/src/hg/trunk/local/gcc/dwarf2out.c:27184:1: note: directive argument in \
> the range [0, 4294967295] In file included from ./tm.h:21:0,
> from /var/gcc/src/hg/trunk/local/gcc/target.h:52,
> from /var/gcc/src/hg/trunk/local/gcc/dwarf2out.c:61:
> /var/gcc/src/hg/trunk/local/gcc/config/darwin.h:759:15: note: 'sprintf' output \
> between 23 and 32 bytes into a destination of size 30 sprintf (LABEL, "*%s%ld", \
> PREFIX, (long)(NUM)); \ ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /var/gcc/src/hg/trunk/local/gcc/dwarf2out.c:27238:4: note: in expansion of macro \
> 'ASM_GENERATE_INTERNAL_LABEL' ASM_GENERATE_INTERNAL_LABEL \
> (debug_skeleton_line_section_label, ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> /var/gcc/src/hg/trunk/local/gcc/dwarf2out.c:27184:1: error: '%ld' directive writing \
> between 1 and 10 bytes into a region of size 9 [-Werror=format-overflow=] \
> init_sections_and_labels (bool early_lto_debug) ^~~~~~~~~~~~~~~~~~~~~~~~
> /var/gcc/src/hg/trunk/local/gcc/dwarf2out.c:27184:1: note: directive argument in \
> the range [0, 4294967295] In file included from ./tm.h:21:0,
> from /var/gcc/src/hg/trunk/local/gcc/target.h:52,
> from /var/gcc/src/hg/trunk/local/gcc/dwarf2out.c:61:
> /var/gcc/src/hg/trunk/local/gcc/config/darwin.h:759:15: note: 'sprintf' output \
> between 23 and 32 bytes into a destination of size 30 sprintf (LABEL, "*%s%ld", \
> PREFIX, (long)(NUM)); \ ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /var/gcc/src/hg/trunk/local/gcc/dwarf2out.c:27245:4: note: in expansion of macro \
> 'ASM_GENERATE_INTERNAL_LABEL' ASM_GENERATE_INTERNAL_LABEL \
> (debug_skeleton_info_section_label, ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> /var/gcc/src/hg/trunk/local/gcc/dwarf2out.c:27184:1: error: '%ld' directive writing \
> between 1 and 10 bytes into a region of size 7 [-Werror=format-overflow=] \
> init_sections_and_labels (bool early_lto_debug) ^~~~~~~~~~~~~~~~~~~~~~~~
> /var/gcc/src/hg/trunk/local/gcc/dwarf2out.c:27184:1: note: directive argument in \
> the range [0, 4294967295] In file included from ./tm.h:21:0,
> from /var/gcc/src/hg/trunk/local/gcc/target.h:52,
> from /var/gcc/src/hg/trunk/local/gcc/dwarf2out.c:61:
> /var/gcc/src/hg/trunk/local/gcc/config/darwin.h:759:15: note: 'sprintf' output \
> between 25 and 34 bytes into a destination of size 30 sprintf (LABEL, "*%s%ld", \
> PREFIX, (long)(NUM)); \ ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /var/gcc/src/hg/trunk/local/gcc/dwarf2out.c:27290:4: note: in expansion of macro \
> 'ASM_GENERATE_INTERNAL_LABEL' ASM_GENERATE_INTERNAL_LABEL \
> (debug_skeleton_abbrev_section_label, ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> /var/gcc/src/hg/trunk/local/gcc/dwarf2out.c:27184:1: error: '%ld' directive writing \
> between 1 and 10 bytes into a region of size 9 [-Werror=format-overflow=] \
> init_sections_and_labels (bool early_lto_debug) ^~~~~~~~~~~~~~~~~~~~~~~~
> /var/gcc/src/hg/trunk/local/gcc/dwarf2out.c:27184:1: note: directive argument in \
> the range [0, 4294967295] In file included from ./tm.h:21:0,
> from /var/gcc/src/hg/trunk/local/gcc/target.h:52,
> from /var/gcc/src/hg/trunk/local/gcc/dwarf2out.c:61:
> /var/gcc/src/hg/trunk/local/gcc/config/darwin.h:759:15: note: 'sprintf' output \
> between 23 and 32 bytes into a destination of size 30 sprintf (LABEL, "*%s%ld", \
> PREFIX, (long)(NUM)); \ ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /var/gcc/src/hg/trunk/local/gcc/dwarf2out.c:27300:4: note: in expansion of macro \
> 'ASM_GENERATE_INTERNAL_LABEL' ASM_GENERATE_INTERNAL_LABEL \
> (debug_skeleton_line_section_label, ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> /var/gcc/src/hg/trunk/local/gcc/dwarf2out.c:27184:1: error: '%ld' directive writing \
> between 1 and 10 bytes into a region of size 9 [-Werror=format-overflow=] \
> init_sections_and_labels (bool early_lto_debug) ^~~~~~~~~~~~~~~~~~~~~~~~
> /var/gcc/src/hg/trunk/local/gcc/dwarf2out.c:27184:1: note: directive argument in \
> the range [0, 4294967295] In file included from ./tm.h:21:0,
> from /var/gcc/src/hg/trunk/local/gcc/target.h:52,
> from /var/gcc/src/hg/trunk/local/gcc/dwarf2out.c:61:
> /var/gcc/src/hg/trunk/local/gcc/config/darwin.h:759:15: note: 'sprintf' output \
> between 23 and 32 bytes into a destination of size 30 sprintf (LABEL, "*%s%ld", \
> PREFIX, (long)(NUM)); \ ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /var/gcc/src/hg/trunk/local/gcc/dwarf2out.c:27306:4: note: in expansion of macro \
> 'ASM_GENERATE_INTERNAL_LABEL' ASM_GENERATE_INTERNAL_LABEL \
> (debug_skeleton_info_section_label, ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> I hacked around this using the following patch:

Yeah, Uros fixed that already in exactly the same way.  Wonder how it
didn't warn on x86_64 and why there isn't a target specific define
on how much ASM_GENERATE_INTERNAL_LABEL adds to whatever prefix
the caller chooses.

Richard.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic