From patchwork Mon Nov 5 04:04:00 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Using -ffunction-sections and -p Date: Sun, 04 Nov 2012 18:04:00 -0000 From: Sriraman Tallam X-Patchwork-Id: 197134 Message-Id: To: GCC Patches , Ian Lance Taylor , David Li , gcc@gcc.gnu.org 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. { Thanks, -Sri. --- 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)