This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Using -ffunction-sections and -p
- From: Sriraman Tallam <tmsriram at google dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>, Ian Lance Taylor <iant at google dot com>, David Li <davidxl at google dot com>, gcc at gcc dot gnu dot org
- Date: Sun, 4 Nov 2012 20:04:00 -0800
- Subject: Using -ffunction-sections and -p
Hi,
Currently, using -ffunction-sections and -p together results in a
warning. I ran into this problem when compiling the kernel. This is
discussed in this thread:
http://gcc.gnu.org/ml/gcc-help/2008-11/msg00128.html
Ian's reply suggests this warning is no longer necessary and can be
removed. Is this patch alright to commit with all tests passing:
* toplev.c (process_options): Do not warn when -ffunction-sections
and -fprofile are used together.
--- toplev.c (revision 193117)
+++ toplev.c (working copy)
@@ -1467,12 +1467,6 @@ process_options (void)
}
}
- if (flag_function_sections && profile_flag)
- {
- warning (0, "-ffunction-sections disabled; it makes profiling
impossible");
- flag_function_sections = 0;
- }
-
#ifndef HAVE_prefetch
if (flag_prefetch_loop_arrays > 0)
{
Thanks,
-Sri.