http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59447
Bug ID: 59447 Summary: --with-dwarf2 is not propagated correctly, will always create dwarf4 by default Product: gcc Version: 4.8.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap Assignee: unassigned at gcc dot gnu.org Reporter: rose.garcia-eggl2fk at yopmail dot com even if one manages that --with-dwarf2 gets properly redirected to gcc/configure from the toplevel configure script ( i used GCC_DWARF_CONFFLAGS="--with-dwarf2=yes" ; export host_configargs="$GCC_DWARF_CONFFLAGS" ; export target_configargs="$GCC_DWARF_CONFFLAGS" ; export build_configargs="$GCC_DWARF_CONFFLAGS" ; plus i passed it to top-level configure), gcc will still default to DWARF4, and all created binaries will have dwarf4 debug info, unless -gdwarf-2 was passed explicitly on the command line. the culprit is this line gcc-4.8.2/gcc/common.opt:Common Joined UInteger Var(dwarf_version) Init(4) Negative(gstabs) introduced in commit http://repo.or.cz/w/official-gcc.git/commitdiff/052166fd4a8051c7dc4c87d408be091c99aafd55 note that even the command below still talks about dwarf2. i see nothing in the build system that would fill in the required 2 here instead of the 4, and indeed the generated options.c has dwarf_version = 4 in it.