This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Remove -ffunction-sections debugging warning (PR libstdc++/35597)


	A warning that the -ffunction-sections may affect debugging was
added in 1996.  The warning was disabled for ELF object file format in
1999.  It was disabled for Mach-O object file format in 2006.  The warning
is not appropriate for XCOFF.

	libstdc++ configure tests for -ffunction-sections option using -g
-ffunction-sections -Werror.  Enabling debugging generates the warning on
the remaining object file formats and -Werror converts the warning to an
error, causing the test to fail.

	Many GCC options, such as optimization, may affect debugging, but
GCC does not warn about them.  The warning selectively has been disabled
for almost all object file formats.

	After discussing the situation with Richi, I propose deleting the
warning completely instead of repeatedly patching it for individual object
file formats one by one.

Bootstrapped and regression tested on powerpc-ibm-aix5.3.0.0.

Okay for mainline and 4.3 branch?

Thanks, David


	PR libstdc++/35597
	* toplev.c (process_options): Remove -ffunction-sections debugging
	warning.

Index: toplev.c
===================================================================
*** toplev.c	(revision 133266)
--- toplev.c	(working copy)
*************** process_options (void)
*** 1889,1901 ****
        flag_prefetch_loop_arrays = 0;
      }
  
- #ifndef OBJECT_FORMAT_ELF
- #ifndef OBJECT_FORMAT_MACHO
-   if (flag_function_sections && write_symbols != NO_DEBUG)
-     warning (0, "-ffunction-sections may affect debugging on some targets");
- #endif
- #endif
- 
    /* The presence of IEEE signaling NaNs, implies all math can trap.  */
    if (flag_signaling_nans)
      flag_trapping_math = 1;
--- 1889,1894 ----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]