Bug 18552 - Annoying warning with -ffunction-sections -g
Annoying warning with -ffunction-sections -g
Status: RESOLVED DUPLICATE of bug 18553
Product: gcc
Classification: Unclassified
Component: target
3.4.4
: P2 normal
: ---
Assigned To: Not yet assigned to anyone
: diagnostic
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-11-18 19:40 UTC by Bernardo Innocenti
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: avr
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernardo Innocenti 2004-11-18 19:40:52 UTC
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.
Comment 1 Andrew Pinski 2004-11-18 20:28:07 UTC

*** This bug has been marked as a duplicate of 18553 ***