On September 22, 2015 2:38:34 PM GMT+02:00, David Edelsohn <[email protected]> wrote: >On Tue, Sep 22, 2015 at 4:12 AM, Richard Biener ><[email protected]> wrote: >> On Mon, Sep 21, 2015 at 5:41 PM, David Edelsohn <[email protected]> >wrote: >>> Appended is a patch to support DWARF on AIX and works with GDB and >AIX >>> assembler. The AIX assembler prepends the CU length to the section >>> and does not want the compiler to provide it, so I need to disable >>> those parts of dwarf2out.c. I know it's ugly, but, on the upside, >>> this eventually allows GCC to deprecate Stabs, which I think is >worth >>> the pain. >>> >>> I discovered that -g3 emits the debug_macros section, which AIX also >>> does not like, so I disable that section as well. As I mentioned in >>> v2, I moved the calculation of aranges_length to its one use in the >>> output function instead of calculating it early to avoid an unused >>> function argument. >>> >>> I also switched to XCOFF_DEBUGGING_INFO as the macro to test in >>> dwarf2out.c. I think a target hook or testing that DWARF section >>> names have not been overridden to NULL is overkill. Suggestions >>> welcome, but any solution that disables arbitrary portions of >>> dwarf2out.c is going to be ugly. I doubt that any other system, >>> especially ones based on ELF file format, would ever do this. >> >> Using an existing macro works for me - but as we are working towards >> eliminating conditional compilation can you try using >> >> if (!XCOFF_DEBUGGING_INFO) >> >> ? If the macro is not always defined devise a new one defined from >> XCOFF_DEBUGGING_INFO. > >You prefer that I define a new macro in defaults.h instead of > >#ifndef XCOFF_DEBUGGING_INFO >#define XCOFF_DEBUGGING_INFO 0 >#endif > >in dwarf2out.c?
Or, if that works, add a default for XCOFF_DEBUGGING_INFO. I thought of a dwarf2out.c local define. Richard. > >- David
