From patchwork Fri Dec 7 22:46:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Using -ffunction-sections and -p From: Sriraman Tallam X-Patchwork-Id: 204617 Message-Id: To: Jeff Law Cc: Ian Lance Taylor , David Li , GCC Patches Date: Fri, 7 Dec 2012 14:46:41 -0800 I have submitted this patch. * toplev.c (process_options): Do not warn when -ffunction-sections and -fprofile are used together. { Thanks, -Sri. On Tue, Dec 4, 2012 at 1:43 PM, Sriraman Tallam wrote: > On Tue, Dec 4, 2012 at 1:31 PM, Jeff Law wrote: >> On 12/03/2012 01:08 PM, Sriraman Tallam wrote: >>> >>> Hi Jeff, >>> >>> Wondering if you got a chance to do this? >> >> Hmm, thinking more about this, it couldn't have been a 32 bit HPUX issue. >> First that port claims to not support -ffunction-sections -- which is true, >> we can't make arbitrarily named sections, though each function is placed >> into its own $CODE$ section/subspace. >> >> Second, even with each function in its own $CODE$ subspace, profiling works. >> >> So it couldn't have been 32 bit HPUX. >> >> I think Ian's plan of going forward and see if anyone complains is >> reasonable. Regardless, we're talking about OSs that are > 10 years old,. >> the odds of folks building modern versions of GCC is pretty slim. The odds >> they're building modern versions of GCC and care about both >> function-sections and profiling is probably approaching zero. >> >> Jeff >> Index: gcc/toplev.c =================================================================== --- gcc/toplev.c (revision 194306) +++ gcc/toplev.c (working copy) @@ -1478,12 +1478,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)