http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57238
Bug ID: 57238 Summary: GCC passes --gdwarf2 to assembler despite -gdwarf-4 on command line Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: driver Assignee: unassigned at gcc dot gnu.org Reporter: ppluzhnikov at google dot com I noticed that compiling t.c with '-gdwarf-4', I get: <15> DW_AT_comp_dir : (indirect string, offset: 0x4e): /tmp But compiling t.s, I get: <24> DW_AT_comp_dir : /tmp Looking at 'as' invocation, t.c build results in: as -v --64 -o t.o /tmp/ccSXi0lI.s while t.s results in: as --gdwarf2 -v --64 -o t.o t.s Given that dwarf-4 is now the default, passing --gdwarf2 to as is the wrong thing to do, especially given -gdwarf-4 on command line. This was with trunk GCC built @r198709, native Linux/x86_64 build, configured with: --enable-linker-build-id --disable-lto --with-linker-hash-style=gnu --enable-languages=c,c++,go