When building with both -ffunction-sections and -g, the compiler outputs an invalid warning for each compiled file:
drv/timer.c:1: warning: -ffunction-sections may affect debugging on some targets The code printing this is here: --- gcc/toplev.c --- #ifndef OBJECT_FORMAT_ELF if (flag_function_sections && write_symbols != NO_DEBUG) warning ("-ffunction-sections may affect debugging on some targets"); #endif --- gcc/toplev.c --- A possible fix could be adding elfos.h to the tm_file list for the avr target in config.gcc, which may also lead to simplifications in some parts of config/avr.h. -- Summary: Annoying warning with -ffunction-sections -g Product: gcc Version: 3.4.4 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P2 Component: target AssignedTo: denisc at overta dot ru ReportedBy: bernie at develer dot com CC: gcc-bugs at gcc dot gnu dot org,marekm at amelek dot gda dot pl GCC host triplet: avr http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18553