In testing patches to support Solaris 9/x86 with Sun as on Solaris 11/x86, I noticed that several testcases with -gdwarf-2 -dA failed, producing invalid assembler output. I could trace this down to dwarf2asm.c (dw2_asm_output_nstring) unconditionally emitting .ascii, which the Solaris 8/x86 as doesn't understand.
This dates back to the initial version of dwarf2asm.c ASM_OUTPUT_ASCII cannot be used as is since w2_asm_output_nstring adds a comment after the string without a preceding newline. My current solution is to add a variant of ASM_OUTPUT_ASCII, ASM_OUTPUT_ASCII_NONL, with an additional fourth arg NONL which controls whether or not the newline is printed. I still have to disentangle the different versions of ASM_OUTPUT_ASCII since the initial version (which changed config/i386/sysv4.h) ysed .byte directives to emit the string, which breaks the corresponding testcases, and didn't emit empty strings at all. -- Summary: gcc -gdwarf-2 -dA unconditionally emits .ascii Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: assemble-failure Severity: normal Priority: P3 Component: debug AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ro at gcc dot gnu dot org GCC build triplet: i386-pc-solaris2* GCC host triplet: i386-pc-solaris2* GCC target triplet: i386-pc-solaris2* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44171