On Tue, Sep 22, 2015 at 9:54 AM, Trevor Saunders <tbsau...@tbsaunde.org> wrote: > On Tue, Sep 22, 2015 at 03:16:28PM +0200, Richard Biener wrote: >> On September 22, 2015 2:38:34 PM GMT+02:00, David Edelsohn >> <dje....@gmail.com> wrote: >> >On Tue, Sep 22, 2015 at 4:12 AM, Richard Biener >> ><richard.guent...@gmail.com> wrote: >> >> On Mon, Sep 21, 2015 at 5:41 PM, David Edelsohn <dje....@gmail.com> >> >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. > > I wouldn't worry about this too much, I have local patches turning the > X_DEBUGGING_INFO macros into 0/1 instead of undef / def, so which I > expect to commit in the next week or so.
XCOFF_DEBUGGING_INFO currently conditionally includes header files and conditionally compiles code that depends on macros only defined for AIX. You addressed all of those dependencies? Thanks, David